Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests response = requests.post( 'https://api.v6.unrealspeech.com/stream',
|
2 |
+
|
3 |
+
headers = { 'Authorization' : 'Bearer VqUmMUjnSPfuxttMk4SjWGVR9fbdVLBSwXxpWUq9iwDWYRQDhGQxfQ' },
|
4 |
+
json = { 'Text': '''<YOUR_TEXT>''', 'VoiceId': '<VOICE_ID>', 'Bitrate': '128k', } )
|
5 |
+
with open('audio.mp3', 'wb') as f: f.write(response.content)
|
6 |
+
|
7 |
+
import gradio as grdef greet(name):return "Hello " + name + "!!"iface = gr.Interface(fn=greet, inputs="text", outputs="text")iface.launch()
|