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