TextToSpeech / text_to_ipa.py
Najeeb1's picture
Upload folder using huggingface_hub
acf2dde verified
raw
history blame contribute delete
328 Bytes
from phonemizer import phonemize
# Your transcription text
transcription = "'''I need some paracetamol for my headache. '''"
# Convert to IPA
ipa_transcription = phonemize(
transcription,
language='en-us', # Specify the language
backend='espeak' # Specify the phonemization backend
)
print(ipa_transcription)