NERtc Unity SDK V.5.4.128
载入中...
搜索中...
未找到
nertc.IVoiceEngineCallback接口 参考

Public 成员函数

void OnAuth (RtcErrorCode errorCode)
 
void OnRecordCompleted (RtcErrorCode errorCode, string filePath)
 
void OnPlayCompleted (RtcErrorCode errorCode, string filePath)
 
void OnUploadCompleted (RtcErrorCode errorCode, string filePath, string fileID)
 
void OnDownloadCompleted (RtcErrorCode errorCode, string filePath, string fileID, RtcVoiceAuditStatus auditStatus, int auditResult, string auditDetail)
 
void OnSpeechToTextCompleted (RtcErrorCode errorCode, string fileID, string text, RtcVoiceAuditStatus auditStatus, int auditResult, string auditDetail)
 
void OnRecordingVolume (int volume)
 
void OnPlayingVolume (int volume)
 

详细描述

语音消息事件接口。
此接口类监听语音消息相关接口的事件。

成员函数说明

◆ OnAuth()

void nertc.IVoiceEngineCallback.OnAuth ( RtcErrorCode errorCode)

鉴权回调。
该回调方法表示音频模块的鉴权结果,如果出现错误需要重新鉴权。

参数
errorCode错误码。详细信息请参考 RtcErrorCode

◆ OnRecordCompleted()

void nertc.IVoiceEngineCallback.OnRecordCompleted ( RtcErrorCode errorCode,
string filePath )

录制结果回调。
该回调方法表示音频模块语音录制结果。

参数
errorCode错误码。详细信息请参考 RtcErrorCode
filePath录制文件路径。

◆ OnPlayCompleted()

void nertc.IVoiceEngineCallback.OnPlayCompleted ( RtcErrorCode errorCode,
string filePath )

播放结果回调。
该回调方法表示音频模块语音播放结果。

参数
errorCode错误码。详细信息请参考 RtcErrorCode
filePath播放文件路径。

◆ OnUploadCompleted()

void nertc.IVoiceEngineCallback.OnUploadCompleted ( RtcErrorCode errorCode,
string filePath,
string fileID )

上传结果回调。
该回调方法表示音频模块上传文件结果。

参数
errorCode错误码。详细信息请参考 RtcErrorCode
filePath文件路径。
fileID上传成功后的文件 ID,用于下载和其他文件映射时使用。

◆ OnDownloadCompleted()

void nertc.IVoiceEngineCallback.OnDownloadCompleted ( RtcErrorCode errorCode,
string filePath,
string fileID,
RtcVoiceAuditStatus auditStatus,
int auditResult,
string auditDetail )

下载结果回调。
该回调方法表示音频模块下载文件结果。

参数
errorCode错误码。详细信息请参考 RtcErrorCode
filePath文件路径。
fileID文件 ID。
auditStatus语音转文字审核状态。参考 {@RtcVoiceAuditStatus}。
auditResult语音转文字审核结果,仅审核完成后有效。
auditDetail语音转文字审核详情,参见审核服务说明。

◆ OnSpeechToTextCompleted()

void nertc.IVoiceEngineCallback.OnSpeechToTextCompleted ( RtcErrorCode errorCode,
string fileID,
string text,
RtcVoiceAuditStatus auditStatus,
int auditResult,
string auditDetail )

语音转文字结果回调。
该回调方法表示音频模块语音转文字结果。

参数
errorCode错误码。详细信息请参考 RtcErrorCode
fileID文件 ID。
text语音转文字结果。
auditStatus语音转文字审核状态。参考 {@RtcVoiceAuditStatus}。
auditResult语音转文字审核结果,仅审核完成后有效。
auditDetail语音转文字审核详情,参见审核服务说明。

◆ OnRecordingVolume()

void nertc.IVoiceEngineCallback.OnRecordingVolume ( int volume)

实时采集音量回调。
该回调方法返回当前正在录制的音量。

参数
volume音量值,范围 0-100。

◆ OnPlayingVolume()

void nertc.IVoiceEngineCallback.OnPlayingVolume ( int volume)

实时播放音量回调。
该回调方法返回当前正在播放的音量。

参数
volume音量值,范围 0-100。

该接口的文档由以下文件生成: