Skip to main content

Translation Callback Information (TranslatorResult)

Data Structure

FINTLTranslatorResult: Inherited from FINTLBaseResult, contains basic information

translatorResp Text Translation

ParametersTypeExplanation
translatorRespstringProcessing results returned by the translation service, which need to be handled independently by the game side. See translatorResp for details

Code Example:

{
"debugInfo":null,
"message":"Success",
"result":[
{
"id":"xxxx",
"output":"xxx",
"text":"xxx"
}
],
"retCode":"0"
}

translatorResp

retCodemessageExplanation
0SuccessSuccess
1001ParamsErrorParameter Error
1002ServiceInternalErrorInternal Service Error
1003PermissionErrorPermission error, the entered appId may not exist or the token is invalid
1007rate limit reachedDaily PV or QPM exceeded limit

asrRsp Speech-to-Text

ParameterTypeDescription
asrRspstringProcessing result returned by the translation service. The ASR speech-to-text translation needs to be handled on the Project side. See asr_rsp for details.

Example code:

{
"message": "",
"result": {
"voiceTextStr": "Dude, what's going on with the map?"
},
"retCode": 0,
"traceId": ""
}

asr_rsp

NameTypeDescription
traceIdstringA unique request ID can be set for tracking requests.
messagestringtranslator result message
resultlist of result objectobject
retCodestringThe Service return code. Valid values include: "0" - success, "1001" - parameter error, "1002" - internal Service error.

result

ParameterTypeDescription
voiceTextStrstringASR speech text result