AiuiEventListener class
讯飞语音识别的回调映射,有flutter来决定处理所有的回调结果, 会更具有灵活性
Constructors
- AiuiEventListener({void onResult(AiuiEvent event)?, void onIatResult(IatResult result, int responseTime)?, void onNlpResult(NlpResult result, int responseTime)?, void onTppResult(AiuiEvent event)?, void onTtsResult(TtsResult result)?, void onITransResult(ITransResult result)?, void onError(int errorCode, String message)?, void onStateChange(int stateCode)?, void onWakeup(WakeupType type, String? message)?, void onSleep(SleepType type)?, void onVad(VadEventType type, [int? volume])?, void onCmdReturn(int cmd, int result, String? message)?, VoidCallback? onPreSleep, VoidCallback? onRecordStart, VoidCallback? onRecordStop, VoidCallback? onConnectedToServer, VoidCallback? onServerDisconnected, VoidCallback? onTts})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onCmdReturn → void Function(int cmd, int result, String? message)?
-
某条CMD命令对应的返回事件
final
- onConnectedToServer → VoidCallback?
-
与服务端建立起连接事件
final
- onError → void Function(int errorCode, String message)?
-
出错事件
final
- onIatResult → void Function(IatResult result, int responseTime)?
-
听写结果事件
final
- onITransResult → void Function(ITransResult result)?
-
翻译结果事件
final
- onNlpResult → void Function(NlpResult result, int responseTime)?
-
语义结果事件
final
- onPreSleep → VoidCallback?
-
准备休眠事件
final
- onRecordStart → VoidCallback?
-
抛出该事件通知外部录音开始,用户可以开始说话
final
- onRecordStop → VoidCallback?
-
通知外部录音停止
final
- onResult → void Function(AiuiEvent event)?
-
原始结果事件
final
- onServerDisconnected → VoidCallback?
-
与服务端断开连接事件
final
- onSleep → void Function(SleepType type)?
-
休眠事件
final
- onStateChange → void Function(int stateCode)?
-
状态变更事件
final
- onTppResult → void Function(AiuiEvent event)?
-
后处理服务结果事件
final
- onTts → VoidCallback?
-
语音合成事件
final
- onTtsResult → void Function(TtsResult result)?
-
云端tts结果事件
final
- onVad → void Function(VadEventType type, [int? volume])?
-
VAD事件
final
- onWakeup → void Function(WakeupType type, String? message)?
-
唤醒事件
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited