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
|
<?php return [
'version' => '1.0',
'info' => ['style' => 'RPC', 'product' => 'EduInterpreting', 'version' => '2024-08-28'],
'directories' => ['RecognizeAudio', 'SubmitEvaluationTask'],
'components' => [
'schemas' => [],
],
'apis' => [
'RecognizeAudio' => [
'summary' => 'Recognizes English speech audio files and converts them into English text.',
'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' => '', 'description' => 'The URL of the audio file that can be accessed over the Internet.', 'type' => 'string', 'required' => true, 'example' => 'http://xx.com/abc.mp3'],
],
[
'name' => 'OuterBizId',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The unique business ID defined by the caller for this request. This ID is returned with the callback along with the evaluation results. The caller must ensure that this ID is globally unique and can be traced back to its own ASR task. This field is also used for idempotence control.', 'type' => 'string', 'required' => true, 'example' => '433c1361-0f6e-48fc-ad51'],
],
[
'name' => 'CallbackUrl',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The callback URL for ASR results. The caller must prepare the callback endpoint based on the data structure of the ASR task callback API template.', 'type' => 'string', 'required' => false, 'example' => 'https://abc.edu.org.cn/en/callback'."\n"],
],
[
'name' => 'EnableCallBack',
'in' => 'formData',
'schema' => ['type' => 'boolean', 'required' => true, 'description' => '', 'title' => '', 'example' => ''],
],
[
'name' => 'Language',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'Valid values:'."\n"
.'- ZH: Chinese.'."\n"
.'- EN: English.', 'type' => 'string', 'example' => 'ZH', 'required' => false],
],
],
'responses' => [
200 => [
'schema' => [
'title' => '',
'description' => 'AsrResultPopDTO',
'type' => 'object',
'properties' => [
'ItemList' => [
'description' => 'The list of recognition results.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'BeginTime' => ['description' => 'The start offset of the sentence, in milliseconds.', 'type' => 'string', 'example' => '0', 'title' => ''],
'EndTime' => ['description' => 'The end offset of the sentence, in milliseconds.', 'type' => 'string', 'example' => '1230', 'title' => ''],
'Text' => ['description' => 'The recognized text of the sentence.', 'type' => 'string', 'example' => 'How are you', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
'RequestId' => ['description' => 'The unique request ID.', 'type' => 'string', 'example' => '38CD0881-BC7B-5ADB-A3EB-FF813927D09A', 'title' => ''],
'TaskId' => ['description' => 'The task ID.', 'type' => 'string', 'example' => '3ab5c082-2c0e-4f39-b12f-057dd5e373ff', 'title' => ''],
],
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'Audio.DecodeError', 'errorMessage' => 'Audio decoding error.', 'description' => ''],
['errorCode' => 'Audio.DownloadError', 'errorMessage' => 'The audio file url failed to download. check that the file address is valid.', 'description' => ''],
['errorCode' => 'Audio.FormatInvalid', 'errorMessage' => 'Audio decoding error. Currently, only wav and mp3 are supported.', 'description' => ''],
['errorCode' => 'Audio.InvalidSampleRate', 'errorMessage' => 'Illegal audio sampling rate. Speech Recognition only supports audio with 8000 Hz and 16000 Hz sampling rate formats.', 'description' => ''],
['errorCode' => 'Param.Invalid', 'errorMessage' => 'The specified parameter is not valid.', 'description' => ''],
['errorCode' => 'Task.TimeOut', 'errorMessage' => 'Task execution exceeds 50s.Task timeout.', 'description' => ''],
],
403 => [
['errorCode' => 'ThrottlingRateQuota', 'errorMessage' => 'Algorithm service resource exceeds the quota limit.', 'description' => ''],
],
500 => [
['errorCode' => 'InternalError', 'errorMessage' => 'The request processing has failed due to some unknown error.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The request has failed due to a temporary failure of the server.', 'description' => ''],
],
],
'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' => 'Convert speech to text with timestamps',
'responseParamsDescription' => 'When the callback feature is enabled, only RequestId and TaskId are returned in the response. The remaining content is sent in the original data format to the callback URL provided by the invoker. Ensure that the callback URL allows public network access.',
'changeSet' => [],
],
'SubmitEvaluationTask' => [
'summary' => 'Submits an interpretation evaluation task.',
'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' => '', 'description' => 'The evaluation type. Valid values:'."\n"
.'- EN_TO_ZH: English to Chinese.'."\n"
.'- ZH_TO_EN: Chinese to English.', 'type' => 'string', 'required' => true, 'example' => 'EN_TO_ZH'],
],
[
'name' => 'SuggestedAnswer',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The ground truth.', 'type' => 'string', 'required' => true, 'example' => '聚会一团火,散是满天星'],
],
[
'name' => 'Text',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The response text to be evaluated.', 'type' => 'string', 'required' => true, 'example' => '相聚时大家是一团花火, 分开时在各自领域发光发热'],
],
[
'name' => 'MaterialText',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The source material text.', 'type' => 'string', 'required' => true, 'example' => 'As flame of fire we gather, as skyful of stars we scatter.'."\n"],
],
[
'name' => 'OuterBizId',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The unique business ID defined by the caller for this call. This field is returned together with the evaluation result in the callback. The caller must ensure that this ID is globally unique and can be used to locate the corresponding evaluation task. This field is also used for idempotence control.', 'type' => 'string', 'required' => true, 'example' => '433c1361-0f6e-48fc-ad51'."\n"],
],
[
'name' => 'AudioUrl',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The URL of the audio file to be evaluated.', 'type' => 'string', 'required' => true, 'example' => 'http://xx.com/abc.mp3'."\n"],
],
[
'name' => 'CallbackUrl',
'in' => 'formData',
'schema' => ['title' => '', 'description' => 'The callback URL for the evaluation result. Because the evaluation takes a long time, the result is sent to this URL after the evaluation is complete. The caller must prepare the callback endpoint based on the data structure of the evaluation task callback template.', 'type' => 'string', 'required' => true, 'example' => 'https://abc.edu.org.cn/en/callback'."\n"],
],
],
'responses' => [
200 => [
'schema' => [
'title' => '',
'description' => 'PopEvaluationTaskResultDTO',
'type' => 'object',
'properties' => [
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'BA3BB7D0-E098-5F0C-AF25-0BEFAEE7D1F0', 'title' => ''],
'TaskId' => ['description' => 'The task ID.', 'type' => 'string', 'example' => '8fb75c55-98b5-4b82-ae67-5dbb9a0646cc', 'title' => ''],
],
'example' => '',
],
],
],
'errorCodes' => [
400 => [
['errorCode' => 'Param.Invalid', 'errorMessage' => 'The specified parameter is not valid.', 'description' => ''],
],
403 => [
['errorCode' => 'ThrottlingRateQuota', 'errorMessage' => 'Algorithm service resource exceeds the quota limit.', 'description' => ''],
],
500 => [
['errorCode' => 'InternalError', 'errorMessage' => 'The request processing has failed due to some unknown error.', 'description' => ''],
],
503 => [
['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The request has failed due to a temporary failure of the server.', 'description' => ''],
],
],
'staticInfo' => ['returnType' => 'synchronous'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BA3BB7D0-E098-5F0C-AF25-0BEFAEE7D1F0\\",\\n \\"TaskId\\": \\"8fb75c55-98b5-4b82-ae67-5dbb9a0646cc\\"\\n}","type":"json"}]',
'title' => 'Submit an AI intelligent evaluation task',
'responseParamsDescription' => '> The result is sent to the callback URL provided by the caller through an asynchronous callback. Make sure that the callback URL is publicly accessible. The data format of the callback request is as follows:</br>'."\n"
.'├─ OuterBizId: String (The external business ID passed when the evaluation task was submitted)</br>'."\n"
.'├─ TaskId: String (The evaluation task ID)</br>'."\n"
.' └─ EvaluateResult: Object </br>'."\n"
.' ├─ OverallScore: String (Overall score: 0-5)</br>'."\n"
.' ├─ ContentScore: String (Content score: 0-5)</br>'."\n"
.' ├─ ExpressionScore: String (Expression score: 0-5)</br>'."\n"
.' ├─ CommunicationScore: String (Communication score: 0-5)</br>'."\n"
.' ├─ Comment: String (Comment)</br>'."\n"
.' └─ GrammarFeedback: String (Grammar feedback)</br>.',
'changeSet' => [],
],
],
'endpoints' => [
['regionId' => 'public', 'regionName' => 'Public network', 'areaId' => 'other', 'areaName' => 'Other', 'public' => 'eduinterpreting.aliyuncs.com', 'endpoint' => 'eduinterpreting.aliyuncs.com', 'vpc' => ''],
],
'errorCodes' => [],
'changeSet' => [],
];
|