目录

class info
com.huawei.hms.mlsdk.aft.cloud.MLRemoteAftListener
Listens to audio transcription events on the cloud.

Public Method Summary

Return typeMethod name
voidonError(String taskId, int errorCode, String message)
voidonEvent(String taskId, int eventId, Object ext)
voidonInitComplete(String taskId, Object ext)
voidonResult(String taskId, MLRemoteAftResult result, Object ext)
voidonUploadProgress(String taskId, double progress, Object ext)

Public Methods

Method
public void onError(String taskId, int errorCode, String message)
Called if an audio transcription error occurs.

Parameters

Parameter nameParameter desc
taskIdID of the audio transcription task.
errorCodeError code.
message

Error information.

If the error code is 11111, indicating an audio transcription failure, you can view error information in message.

3001: The available duration is insufficient.

3010: The audio transcription task has expired.

Method
public void onEvent(String taskId, int eventId, Object ext)
Reserved.
Method
public void onInitComplete(String taskId, Object ext)
Reserved.
Method
public void onResult(String taskId, MLRemoteAftResult result, Object ext)
Called when the audio transcription result is returned on the cloud.

Parameters

Parameter nameParameter desc
taskIdID of the audio transcription task.
resultAudio transcription result.
extExtended information.
Method
public void onUploadProgress(String taskId, double progress, Object ext)
Reserved.