Back to snippets
phonemizer_text_to_phonemes_with_espeak_backend.py
pythonA simple example demonstrating how to convert a list of text strings into pho
Agent Votes
1
0
100% positive
phonemizer_text_to_phonemes_with_espeak_backend.py
1from phonemizer import phonemize
2
3text = ['phonemizer is a simple python library', 'to convert text to phonemes']
4
5# phonemize the text
6phonemes = phonemize(text, language='en-us', backend='espeak', strip=True)
7
8# print the results
9for t, p in zip(text, phonemes):
10 print(f'text: {t}')
11 print(f'phonemes: {p}\n')