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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
|
<?php return [
'version' => '1.0',
'info' => [
'style' => 'RPC',
'product' => 'EduInterpreting',
'version' => '2024-08-28',
],
'directories' => [
'RecognizeAudio',
'SubmitEvaluationTask',
],
'components' => [
'schemas' => [],
],
'apis' => [
'RecognizeAudio' => [
'summary' => '英语口译语音文件识别成英文内容。',
'methods' => [
'post',
],
'schemes' => [
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
'riskType' => 'none',
'chargeType' => 'paid',
'abilityTreeNodes' => [
'FEATUREeduplatformS8LARQ',
],
'tenantRelevance' => 'publicInformation',
],
'parameters' => [
[
'name' => 'AudioFileUrl',
'in' => 'formData',
'schema' => [
'title' => '公网读取的音频文件url',
'description' => '公网读取的音频文件url',
'type' => 'string',
'required' => true,
'example' => 'http://xx.com/abc.mp3',
],
],
[
'name' => 'OuterBizId',
'in' => 'formData',
'schema' => [
'title' => '调用方定义的对本次调用的唯一业务id, 回调时将带上该字段数据和评测结果一并返回, 调用方需要保证该id全局唯一, 且可定位到自身的asr任务. 同时该字段用于幂等控制',
'description' => '调用方定义的对本次调用的唯一业务id, 回调时将带上该字段数据和评测结果一并返回, 调用方需要保证该id全局唯一, 且可定位到自身的asr任务. 同时该字段用于幂等控制',
'type' => 'string',
'required' => true,
'example' => '433c1361-0f6e-48fc-ad51',
],
],
[
'name' => 'CallbackUrl',
'in' => 'formData',
'schema' => [
'title' => 'asr结果的回调地址. 调用方需按照"ASR任务回调接口的模版"的数据结构准备好回调接口',
'description' => 'asr结果的回调地址. 调用方需按照"ASR任务回调接口的模版"的数据结构准备好回调接口',
'type' => 'string',
'required' => false,
'example' => 'https://abc.edu.org.cn/en/callback'."\n",
],
],
[
'name' => 'EnableCallBack',
'in' => 'formData',
'schema' => [
'type' => 'boolean',
'required' => true,
],
],
[
'name' => 'Language',
'in' => 'formData',
'schema' => [
'title' => 'ZH:中文'."\n"
.'EN:英文',
'description' => 'ZH:中文'."\n"
.'EN:英文',
'type' => 'string',
'required' => false,
'example' => 'ZH',
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'AsrResultPopDTO',
'description' => 'AsrResultPopDTO',
'type' => 'object',
'properties' => [
'ItemList' => [
'description' => '识别结果列表',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'BeginTime' => [
'description' => '句子的开始offset(毫秒)',
'type' => 'string',
'example' => '0',
],
'EndTime' => [
'description' => '句子的结束offset(毫秒)',
'type' => 'string',
'example' => '1230',
],
'Text' => [
'description' => '句子的音频文本',
'type' => 'string',
'example' => 'How are you',
],
],
],
],
'RequestId' => [
'description' => '唯一请求ID',
'type' => 'string',
'example' => '38CD0881-BC7B-5ADB-A3EB-FF813927D09A',
],
'TaskId' => [
'description' => '任务id',
'type' => 'string',
'example' => '3ab5c082-2c0e-4f39-b12f-057dd5e373ff',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'Audio.DecodeError',
'errorMessage' => 'Audio decoding error.',
],
[
'errorCode' => 'Audio.DownloadError',
'errorMessage' => 'The audio file url failed to download. check that the file address is valid.',
],
[
'errorCode' => 'Audio.FormatInvalid',
'errorMessage' => 'Audio decoding error. Currently, only wav and mp3 are supported.',
],
[
'errorCode' => 'Audio.InvalidSampleRate',
'errorMessage' => 'Illegal audio sampling rate. Speech Recognition only supports audio with 8000 Hz and 16000 Hz sampling rate formats.',
],
[
'errorCode' => 'Param.Invalid',
'errorMessage' => 'The specified parameter is not valid.',
],
[
'errorCode' => 'Task.TimeOut',
'errorMessage' => 'Task execution exceeds 50s.Task timeout.',
],
],
403 => [
[
'errorCode' => 'ThrottlingRateQuota',
'errorMessage' => 'Algorithm service resource exceeds the quota limit.',
],
],
500 => [
[
'errorCode' => 'InternalError',
'errorMessage' => 'The request processing has failed due to some unknown error.',
],
],
503 => [
[
'errorCode' => 'ServiceUnavailable',
'errorMessage' => 'The request has failed due to a temporary failure of the server.',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"ItemList\\": [\\n {\\n \\"BeginTime\\": \\"0\\",\\n \\"EndTime\\": \\"1230\\",\\n \\"Text\\": \\"How are you\\"\\n }\\n ],\\n \\"RequestId\\": \\"38CD0881-BC7B-5ADB-A3EB-FF813927D09A\\",\\n \\"TaskId\\": \\"3ab5c082-2c0e-4f39-b12f-057dd5e373ff\\"\\n}","type":"json"}]',
'title' => '语音转文字并标记时间',
'responseParamsDescription' => '当开启回调功能时, 返回参数中将只返回RequestId和TaskId, 其余内容将保持原数据格式请求到调用方提供的回调地址中, 请务必保证调用方提供的回调地址可公网访问',
],
'SubmitEvaluationTask' => [
'summary' => '口译评测任务。',
'methods' => [
'post',
],
'schemes' => [
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
'riskType' => 'none',
'chargeType' => 'free',
'autoTest' => true,
'tenantRelevance' => 'publicInformation',
],
'parameters' => [
[
'name' => 'Type',
'in' => 'formData',
'schema' => [
'title' => '评测类型: EN_TO_ZH-英转中 ZH_TO_EN-中转英',
'description' => '评测类型: EN_TO_ZH-英转中 ZH_TO_EN-中转英',
'type' => 'string',
'required' => true,
'example' => 'EN_TO_ZH',
],
],
[
'name' => 'SuggestedAnswer',
'in' => 'formData',
'schema' => [
'title' => '标准答案',
'description' => '标准答案',
'type' => 'string',
'required' => true,
'example' => '聚会一团火,散是满天星',
],
],
[
'name' => 'Text',
'in' => 'formData',
'schema' => [
'title' => '待评测的回答文本',
'description' => '待评测的回答文本',
'type' => 'string',
'required' => true,
'example' => '相聚时大家是一团花火, 分开时在各自领域发光发热',
],
],
[
'name' => 'MaterialText',
'in' => 'formData',
'schema' => [
'title' => '素材文本'."\n",
'description' => '素材文本'."\n",
'type' => 'string',
'required' => true,
'example' => 'As flame of fire we gather, as skyful of stars we scatter.'."\n",
],
],
[
'name' => 'OuterBizId',
'in' => 'formData',
'schema' => [
'title' => '调用方定义的对本次调用的唯一业务id, 回调时将带上该字段数据和评测结果一并返回, 调用方需要保证该id全局唯一, 且可定位到自身的评测任务.同时该字段用于幂等控制.',
'description' => '调用方定义的对本次调用的唯一业务id, 回调时将带上该字段数据和评测结果一并返回, 调用方需要保证该id全局唯一, 且可定位到自身的评测任务.同时该字段用于幂等控制.',
'type' => 'string',
'required' => true,
'example' => '433c1361-0f6e-48fc-ad51'."\n",
],
],
[
'name' => 'AudioUrl',
'in' => 'formData',
'schema' => [
'title' => '待评测的音频文件',
'description' => '待评测的音频文件',
'type' => 'string',
'required' => true,
'example' => 'http://xx.com/abc.mp3'."\n",
],
],
[
'name' => 'CallbackUrl',
'in' => 'formData',
'schema' => [
'title' => '评测结果的回调地址. 由于评测时间较长, 待完成评测后会将结果通知到该接口, 调用方需按照"评测任务回调接口的模版"的数据结构准备好回调接口',
'description' => '评测结果的回调地址. 由于评测时间较长, 待完成评测后会将结果通知到该接口, 调用方需按照"评测任务回调接口的模版"的数据结构准备好回调接口',
'type' => 'string',
'required' => true,
'example' => 'https://abc.edu.org.cn/en/callback'."\n",
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'PopEvaluationTaskResultDTO',
'description' => 'PopEvaluationTaskResultDTO',
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => '唯一请求识别码。',
'type' => 'string',
'example' => 'BA3BB7D0-E098-5F0C-AF25-0BEFAEE7D1F0',
],
'TaskId' => [
'description' => '任务id',
'type' => 'string',
'example' => '8fb75c55-98b5-4b82-ae67-5dbb9a0646cc',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'Param.Invalid',
'errorMessage' => 'The specified parameter is not valid.',
],
],
403 => [
[
'errorCode' => 'ThrottlingRateQuota',
'errorMessage' => 'Algorithm service resource exceeds the quota limit.',
],
],
500 => [
[
'errorCode' => 'InternalError',
'errorMessage' => 'The request processing has failed due to some unknown error.',
],
],
503 => [
[
'errorCode' => 'ServiceUnavailable',
'errorMessage' => 'The request has failed due to a temporary failure of the server.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BA3BB7D0-E098-5F0C-AF25-0BEFAEE7D1F0\\",\\n \\"TaskId\\": \\"8fb75c55-98b5-4b82-ae67-5dbb9a0646cc\\"\\n}","type":"json"}]',
'title' => '提交AI智能评测任务',
'responseParamsDescription' => '> 返回结果将通过异步回调的形式调用方提供的回调地址, 请务必保证调用方提供的回调地址可公网访问, 回调请求的数据格式如下:</br>'."\n"
.'├─ OuterBizId: String (提交评测任务时传入的外部业务id)</br>'."\n"
.'├─ TaskId: String (评测任务id)</br>'."\n"
.' └─ EvaluateResult: Object </br>'."\n"
.' ├─ OverallScore: String (总分: 0-5分)</br>'."\n"
.' ├─ ContentScore: String (内容分: 0-5分)</br>'."\n"
.' ├─ ExpressionScore: String (表达分: 0-5分)</br>'."\n"
.' ├─ CommunicationScore: String (交际分: 0-5分)</br>'."\n"
.' ├─ Comment: String (评语)</br>'."\n"
.' └─ GrammarFeedback: String (语法反馈)</br>',
],
],
'endpoints' => [
[
'regionId' => 'public',
'endpoint' => 'eduinterpreting.aliyuncs.com',
],
],
];
|