sreejang commited on
Commit
b19be2d
·
verified ·
1 Parent(s): a4cb895

Create tts.py

Browse files
Files changed (1) hide show
  1. tts.py +7 -0
tts.py ADDED
@@ -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