Skip to content

A lightweight package to convert text to IPA (International Phonetic Alphabet) symbols.

License

Notifications You must be signed in to change notification settings

fred913/ipa-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPA Engine

A lightweight package to convert text to IPA (International Phonetic Alphabet) symbols.

Demo usage

import logging

from ipa_engine import IPAEngine

logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)

# Create an instance of IPASession
# ipa_session = IPASession(languages=["zh_hans"])
logger.debug("Initializing IPA session...")
ipa_session = IPAEngine(languages=["fr_FR"])
logger.debug("IPA session initialized.")

# Translate a sentence
sentence = "Ça va bien?"
ipa_result = ipa_session.translate_ipa(sentence)
logger.debug(
    "IPA translation: %s",
    "".join(ipa_result))  # Output will be a list of IPA transcriptions

About

A lightweight package to convert text to IPA (International Phonetic Alphabet) symbols.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages