Spaces:
Runtime error
Runtime error
File size: 239 Bytes
ee57c43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# IMPORTANT
# !pip install gTTS
# IMPORTS
from gtts import gTTS
from IPython.display import Audio
# MAIN FUNCTION
def TextToAudio(txt_str):
tts = gTTS(txt_str)
audio_file = 'txtToAudio.wav'
tts.save(audio_file)
return audio_file |