text-convert / app.py
tommy24's picture
Create app.py
018b3e1
raw
history blame
319 Bytes
import gradio as gr
import requests
import os
def text_to_speech(text):
test = os.environ.get("test")
endpoint = f"https://api.voicerss.org/?key={test}&src={text}&hl=en-us"
response = requests.get(endpoint)
return response.content
gr.Interface(text_to_speech, inputs="text", outputs="audio").launch()