Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
sreejang
/
voice2VoiceAI
like
1
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
sreejang
commited on
Feb 4
Commit
b19be2d
·
verified
·
1 Parent(s):
a4cb895
Create tts.py
Browse files
Files changed (1)
hide
show
tts.py
+7
-0
tts.py
ADDED
Viewed
@@ -0,0 +1,7 @@
1
+
# tts.py
2
+
from gtts import gTTS
3
+
4
+
def text_to_speech(text, output_path="reply.wav"):
5
+
tts = gTTS(text=text, lang="en")
6
+
tts.save(output_path)
7
+
return output_path