tommy24 commited on
Commit
67b57f5
1 Parent(s): f16e341

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,7 +6,8 @@ def text_to_speech(text):
6
  test = os.environ.get("test")
7
  endpoint = f"https://api.voicerss.org/?key={test}&src={text}&hl=en-us"
8
  response = requests.get(endpoint)
9
- print(response.content)
10
- return "hello"
 
11
 
12
  gr.Interface(text_to_speech, inputs="text", outputs="audio").launch()
 
6
  test = os.environ.get("test")
7
  endpoint = f"https://api.voicerss.org/?key={test}&src={text}&hl=en-us"
8
  response = requests.get(endpoint)
9
+ with open("output.mp3", "wb") as f:
10
+ f.write(response.content)
11
+ return "output.mp3"
12
 
13
  gr.Interface(text_to_speech, inputs="text", outputs="audio").launch()