Skip to content

Instantly share code, notes, and snippets.

@wfng92
Created May 26, 2022 09:05
Show Gist options
  • Save wfng92/07bc7ba5834510954a7463a9fca3e0fc to your computer and use it in GitHub Desktop.
Save wfng92/07bc7ba5834510954a7463a9fca3e0fc to your computer and use it in GitHub Desktop.
from phonemizer.backend import EspeakBackend
backend = EspeakBackend('en-us', preserve_punctuation=True, with_stress=True)
text = ["Hello, world!", "Welcome to Medium!"]
phonemized = backend.phonemize(text, strip=True)
print(phonemized)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment