-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.py
63 lines (59 loc) · 1.5 KB
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
APPId = "9d3813fc"
APIKey = "e9e735265d4890aa8238a5a7b1fe4680"
APISecret = "NWYyMTMyZWI3OWQxN2IxNDJhNzgzMGZh"
# 请求数据
request_data = {
"header": {
"app_id": "123",
"status":0
},
"parameter": {
"oral": {
"oral_level": "high",
"spark_assist": 1,
"scenarized": 0
},
"tts": {
"vcn": "x4_lingxiaoxuan_oral",
"volume": 50,
"speed": 50,
"pitch": 50,
"bgs": 0,
"rhy": 0,
"audio": {
"encoding": "lame",
"sample_rate": 16000,
"channels": 1,
"bit_depth": 16,
"frame_size": 0
},
"pybuf": {
"encoding": "utf8",
"compress": "raw",
"format": "plain"
}
}
},
"payload": {
"text": {
"encoding": "utf8",
"compress": "raw",
"format": "plain",
"status": 0,
"seq": 0,
"text": "./resource/input/1.txt"
},
"user_text": {
"encoding": "utf8",
"compress": "raw",
"format": "plain",
"status": 0,
"seq": 0,
"text": "./resource/input/1.txt"
}
}
}
# 请求地址
request_url = "ws://cbm01.cn-huabei-1.xf-yun.com/v1/private/medd90fec"
# 用于快速定位响应值
response_path_list = ['$..payload.pybuf', '$..payload.audio', ]