File size: 647 Bytes
57bb312
 
 
 
 
 
 
1
2
3
4
5
6
7
  import requests  response = requests.post(   'https://api.v6.unrealspeech.com/stream',   
                                            
                                            headers = {     'Authorization' : 'Bearer VqUmMUjnSPfuxttMk4SjWGVR9fbdVLBSwXxpWUq9iwDWYRQDhGQxfQ'   },   
                                            json = {     'Text': '''<YOUR_TEXT>''',     'VoiceId': '<VOICE_ID>',     'Bitrate': '128k',   } )  
with open('audio.mp3', 'wb') as f:     f.write(response.content)     
      
import gradio as grdef greet(name):return "Hello " + name + "!!"iface = gr.Interface(fn=greet, inputs="text", outputs="text")iface.launch()