Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
prasanth345
/
voicekkk
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
d0c3e80
voicekkk
/
utils
/
tts.py
prasanth345
Create utils/tts.py
090be3b
verified
2 months ago
raw
Copy download link
history
blame
Safe
178 Bytes
from
gtts
import
gTTS
import
os
def
text_to_speech
(
text
):
tts = gTTS(text=text, lang=
"en"
)
output_path =
"response.mp3"
tts.save(output_path)
return
output_path