thewh1teagle
latest
96c9fde
raw
history blame contribute delete
510 Bytes
"""
High level phonemize functions
"""
from .phonemize import Phonemizer
from .utils import normalize # noqa: F401
from typing import Callable
phonemizer = Phonemizer()
def phonemize(
text: str,
preserve_punctuation=True,
preserve_stress=True,
fallback: Callable[[str], str] = None,
) -> str:
phonemes = phonemizer.phonemize(
text,
preserve_punctuation=preserve_punctuation,
preserve_stress=preserve_stress,
fallback=fallback,
)
return phonemes