Offline Conversion Callback Interface
Description
This interface is provided by the OIAP for a third-party system to return the ASR offline conversion result to the ODFS.
This interface is a system-level third-party interface. For details about the authentication mode, see the third point in "NOTE" in C3 OIAP Interface Authentication.
Interface Method
POST
URI
https://IP:PORT/oifde/rest/sysapi/asrcallback
Message Header
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
Content-Type |
String |
Yes |
The value is fixed at application/json; charset=UTF-8. |
2 |
userName |
String |
Yes |
For details, see the appKey description in the third point in "NOTE" in C3 OIAP Interface Authentication. |
3 |
token |
String |
Yes |
For details about the generation mode, see C3 OIAP Interface Authentication. |
Request
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
Body |
Object |
Yes |
Result to be written back. Table 3 describes the parameters of this object. |
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1.1 |
state |
Object |
Yes |
Conversion status. Table 4 describes the parameters of this object. |
1.2 |
Body |
Object |
Yes |
Writeback result body. Table 5 describes the parameters of this object. |
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1.1.1 |
code |
String |
Yes |
Conversion result code. |
1.1.2 |
success |
Boolean |
Yes |
Whether the conversion is successful. The options are true (success) and false (failure). |
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1.2.1 |
aid |
String |
Yes |
Unique ID of an audio file, which is passed by the client. |
1.2.2 |
lattices |
List |
Yes |
Conversion result. Table 6 describes the parameters of this object. |
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1.2.2.1 |
lid |
Integer |
Yes |
Sequence number of a segment. |
1.2.2.2 |
begin |
Integer |
Yes |
Start time of a segment. |
1.2.2.3 |
end |
Integer |
Yes |
End time of a segment. |
1.2.2.4 |
onebest |
String |
Yes |
Text after conversion. |
1.2.2.5 |
spk |
Integer |
Yes |
Role of the speaker. |
Response
- Status code: 200
Table 7 Parameters in the response body No.
Parameter
Type
Description
1
retCode
String
Result code. The value 0 indicates success and other values indicates failure.
2
retMsg
String
Failure cause.
- Status code: 400
Incorrect request. Check the request path and parameters.
- Status code: 401
Unauthorized operation.
1. Check whether you have purchased related services.
2. Contact customer service to check the status of your account.
- Status code: 404
The requested content is not found. Check the request path.
- Status code: 500
Business failure. Check the values of parameters in the request.
Error Codes
None
Example
Request header:
Content-Type:application/json; charset=UTF-8 userName:ODFS_SYS_OPENAPI token:********************
{ "body": { "state": { "code": 0, "success": true }, "body": { "aid": "FJKkMeepk8l", "lattices": [{ "begin": 4360, "end": 5970, "lid": 0, "onebest": "Hello, is the call connected?", "spk": 0 }] } } }
{ "retCode": "0", "retMsg": "success" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot