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()