summaryrefslogtreecommitdiff
path: root/data/zh_cn/nls-filetrans/2018-08-17/api-docs.php
blob: 204682329dc29604439293cc9696e5ce67e47aee (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<?php return [
    'version' => '1.0',
    'info' => [
        'style' => 'RPC',
        'product' => 'nls-filetrans',
        'version' => '2018-08-17',
    ],
    'directories' => [
        [
            'id' => 208121,
            'title' => '其它',
            'type' => 'directory',
            'children' => [
                'SubmitTask',
                'GetTaskResult',
            ],
        ],
    ],
    'components' => [
        'schemas' => [],
    ],
    'apis' => [
        'SubmitTask' => [
            'summary' => '提交文件到调度系统,生成对应的任务',
            'methods' => [
                'post',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
                [
                    'BearerToken' => [],
                ],
            ],
            'operationType' => 'readAndWrite',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'free',
                'abilityTreeNodes' => [
                    'FEATUREnls90XY1V',
                ],
            ],
            'parameters' => [
                [
                    'name' => 'Task',
                    'in' => 'query',
                    'schema' => [
                        'description' => '任务信息。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => '{\\"app_key\\":\\"kOxdqg6xwqvRg8zc\\",\\"file_link\\":\\"https://xxxx-cn.oss-cn-chengdu.aliyuncs.com/2025/5/20/16257504630/xxxxxx.m4a\\"}',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'TaskId' => [
                                'description' => '任务id。',
                                'type' => 'string',
                                'example' => '45b9130064944a7086a51e30671exxxxx',
                            ],
                            'RequestId' => [
                                'description' => '请求id。',
                                'type' => 'string',
                                'example' => '9347BDEF-069C-5A8F-8024-XXXXXXXXXX',
                            ],
                            'StatusText' => [
                                'description' => '任务状态text。',
                                'type' => 'string',
                                'example' => 'SUCCESS',
                            ],
                            'StatusCode' => [
                                'description' => '状态码。',
                                'type' => 'integer',
                                'format' => 'int32',
                                'example' => '21050000',
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"TaskId\\": \\"45b9130064944a7086a51e30671exxxxx\\",\\n  \\"RequestId\\": \\"9347BDEF-069C-5A8F-8024-XXXXXXXXXX\\",\\n  \\"StatusText\\": \\"SUCCESS\\",\\n  \\"StatusCode\\": 21050000\\n}","type":"json"}]',
            'title' => '提交任务',
        ],
        'GetTaskResult' => [
            'summary' => '获取任务结果。',
            'methods' => [
                'get',
            ],
            'schemes' => [
                'http',
                'https',
            ],
            'security' => [
                [
                    'AK' => [],
                ],
            ],
            'operationType' => 'read',
            'deprecated' => false,
            'systemTags' => [
                'operationType' => 'none',
                'riskType' => 'none',
                'chargeType' => 'free',
                'abilityTreeNodes' => [
                    'FEATUREnls90XY1V',
                ],
            ],
            'parameters' => [
                [
                    'name' => 'TaskId',
                    'in' => 'query',
                    'schema' => [
                        'description' => '任务ID,仅支持传单个ID,和SubmitTask返回TaskId一致。',
                        'type' => 'string',
                        'required' => true,
                        'docRequired' => true,
                        'example' => '6391f5f7669642d5992f1f23ecxxxxxx',
                    ],
                ],
            ],
            'responses' => [
                200 => [
                    'schema' => [
                        'type' => 'object',
                        'properties' => [
                            'TaskId' => [
                                'description' => '任务id。',
                                'type' => 'string',
                                'example' => '4321c5c1c9834384b9d3d6a10bxxxxxx',
                            ],
                            'RequestId' => [
                                'description' => '唯一请求识别码。',
                                'type' => 'string',
                                'example' => 'CA4939D7-5D7B-5B74-AD17-XXXXXXXXXXXX',
                            ],
                            'StatusText' => [
                                'description' => '任务状态标签。',
                                'type' => 'string',
                                'example' => 'SUCCESS',
                            ],
                            'BizDuration' => [
                                'description' => '识别的音频文件总时长,单位:毫秒。',
                                'type' => 'integer',
                                'format' => 'int32',
                                'example' => '267500',
                            ],
                            'SolveTime' => [
                                'description' => '任务获取转换成功的时间。',
                                'type' => 'integer',
                                'format' => 'int64',
                                'example' => '12345',
                            ],
                            'StatusCode' => [
                                'description' => '状态码。',
                                'type' => 'integer',
                                'format' => 'int32',
                                'example' => '21050000',
                            ],
                            'Result' => [
                                'description' => '任务处理的结果。不同的任务类型会有不同的返回信息,请以实际为准。',
                                'type' => 'object',
                                'properties' => [
                                    'Words' => [
                                        'description' => '词列表',
                                        'type' => 'array',
                                        'items' => [
                                            'type' => 'object',
                                            'properties' => [
                                                'EndTime' => [
                                                    'description' => '字结束时间戳,单位毫秒。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '610',
                                                ],
                                                'Word' => [
                                                    'description' => '文本内容。',
                                                    'type' => 'string',
                                                    'example' => '化学',
                                                ],
                                                'BeginTime' => [
                                                    'description' => '字开始时间戳,单位毫秒。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '1180',
                                                ],
                                                'ChannelId' => [
                                                    'description' => '声道id。第一声道为0,第二声道为1,依此类推。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '0',
                                                ],
                                            ],
                                        ],
                                    ],
                                    'Paragraphs' => [
                                        'description' => '段信息列表。',
                                        'type' => 'array',
                                        'items' => [
                                            'type' => 'object',
                                            'properties' => [
                                                'EndTime' => [
                                                    'description' => '本句结束时间戳,单位毫秒。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '9800',
                                                ],
                                                'BeginTime' => [
                                                    'description' => '本句开始时间戳,单位毫秒。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '610',
                                                ],
                                                'ChannelId' => [
                                                    'description' => '声道id。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '0',
                                                ],
                                                'Text' => [
                                                    'description' => '段落文本',
                                                    'type' => 'string',
                                                    'example' => '化学是一门中学基础学科。从初二开始学习,属于理科功课。',
                                                ],
                                            ],
                                        ],
                                    ],
                                    'Sentences' => [
                                        'description' => '句信息列表。',
                                        'type' => 'array',
                                        'items' => [
                                            'type' => 'object',
                                            'properties' => [
                                                'EndTime' => [
                                                    'description' => '本句结束时间戳,单位毫秒。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '4300',
                                                ],
                                                'BeginTime' => [
                                                    'description' => '本句开始时间戳,单位毫秒。',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '610',
                                                ],
                                                'ChannelId' => [
                                                    'description' => '声道id',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                ],
                                                'EmotionValue' => [
                                                    'description' => '情绪能量值。',
                                                    'type' => 'number',
                                                    'format' => 'float',
                                                    'example' => '7.0',
                                                ],
                                                'Text' => [
                                                    'description' => '转写内容。',
                                                    'type' => 'string',
                                                    'example' => '化学是一门中学基础学科。',
                                                ],
                                                'SpeechRate' => [
                                                    'description' => '语速',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                    'example' => '98',
                                                ],
                                                'SpeakerId' => [
                                                    'description' => '语话人id。当前是声道id+1',
                                                    'type' => 'string',
                                                ],
                                                'SilenceDuration' => [
                                                    'description' => '句前的静音时长',
                                                    'type' => 'integer',
                                                    'format' => 'int32',
                                                ],
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                            'RequestTime' => [
                                'description' => '请求时间',
                                'type' => 'integer',
                                'format' => 'int64',
                                'example' => '1735956700661',
                            ],
                        ],
                    ],
                ],
            ],
            'responseDemo' => '[{"errorExample":"","example":"{\\n  \\"TaskId\\": \\"4321c5c1c9834384b9d3d6a10bxxxxxx\\",\\n  \\"RequestId\\": \\"CA4939D7-5D7B-5B74-AD17-XXXXXXXXXXXX\\",\\n  \\"StatusText\\": \\"SUCCESS\\",\\n  \\"BizDuration\\": 267500,\\n  \\"SolveTime\\": 12345,\\n  \\"StatusCode\\": 21050000,\\n  \\"Result\\": {\\n    \\"Words\\": [\\n      {\\n        \\"EndTime\\": 610,\\n        \\"Word\\": \\"化学\\",\\n        \\"BeginTime\\": 1180,\\n        \\"ChannelId\\": 0\\n      }\\n    ],\\n    \\"Paragraphs\\": [\\n      {\\n        \\"EndTime\\": 9800,\\n        \\"BeginTime\\": 610,\\n        \\"ChannelId\\": 0,\\n        \\"Text\\": \\"化学是一门中学基础学科。从初二开始学习,属于理科功课。\\"\\n      }\\n    ],\\n    \\"Sentences\\": [\\n      {\\n        \\"EndTime\\": 4300,\\n        \\"BeginTime\\": 610,\\n        \\"ChannelId\\": 0,\\n        \\"EmotionValue\\": 7,\\n        \\"Text\\": \\"化学是一门中学基础学科。\\",\\n        \\"SpeechRate\\": 98,\\n        \\"SpeakerId\\": \\"\\",\\n        \\"SilenceDuration\\": 0\\n      }\\n    ]\\n  },\\n  \\"RequestTime\\": 1735956700661\\n}","type":"json"}]',
            'title' => '查询任务结果',
        ],
    ],
    'endpoints' => [
        [
            'regionId' => 'cn-beijing',
            'endpoint' => 'nls-filetrans.cn-beijing.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-shanghai',
            'endpoint' => 'nls-filetrans.cn-shanghai.aliyuncs.com',
        ],
        [
            'regionId' => 'cn-shenzhen',
            'endpoint' => 'nls-filetrans.cn-shenzhen.aliyuncs.com',
        ],
    ],
];