Subbu1304 commited on
Commit
d74fa35
Β·
verified Β·
1 Parent(s): 565da89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -8,7 +8,7 @@ def speak(text):
8
  tts = gTTS(text=text, lang='en')
9
  # Save the speech to a temporary audio file
10
  tts.save("output.mp3")
11
- # Play the saved audio file
12
  os.system("mpg321 output.mp3")
13
 
14
  # Function to listen to user voice input using SpeechRecognition
@@ -53,4 +53,3 @@ iface = gr.Interface(fn=voice_login, inputs=[], outputs="text", live=True)
53
 
54
  # Launch the interface
55
  iface.launch()
56
-
 
8
  tts = gTTS(text=text, lang='en')
9
  # Save the speech to a temporary audio file
10
  tts.save("output.mp3")
11
+ # Play the saved audio file (works locally with mpg321)
12
  os.system("mpg321 output.mp3")
13
 
14
  # Function to listen to user voice input using SpeechRecognition
 
53
 
54
  # Launch the interface
55
  iface.launch()