typesdigital commited on
Commit
6f2a96f
·
1 Parent(s): 9afcefa

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+
3
+ url = "https://cloudlabs-text-to-speech.p.rapidapi.com/synthesize"
4
+
5
+ payload = {
6
+ "voice_code": "en-US-1",
7
+ "text": "hello, Yes. I'm RED NATION!",
8
+ "speed": "1.00",
9
+ "pitch": "1.00",
10
+ "output_type": "audio_url"
11
+ }
12
+ headers = {
13
+ "content-type": "application/x-www-form-urlencoded",
14
+ "X-RapidAPI-Key": "21253d4ad8mshc858b5f3ba04919p1b5a03jsna381170f15fe",
15
+ "X-RapidAPI-Host": "cloudlabs-text-to-speech.p.rapidapi.com"
16
+ }
17
+
18
+ response = requests.post(url, data=payload, headers=headers)
19
+
20
+ print(response.json())