tommy24 commited on
Commit
018b3e1
1 Parent(s): 23e39a8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import requests
3
+ import os
4
+
5
+ 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
+ return response.content
10
+
11
+ gr.Interface(text_to_speech, inputs="text", outputs="audio").launch()