事件参考
使用 `client.on(event, callback)` 订阅。返回值是一个取消订阅函数。
const unsub = client.on('botReady', () => {
console.log('机器人已准备就绪');
});
// 之后
unsub();
// 或者
client.off('botReady', handler);连接事件
connect
connectclient.on('connect', () => {
console.log('传输已连接');
});botReady
botReadyclient.on('botReady', () => {
client.sendUserTextMessage('你好!');
});disconnect
disconnectstateChange
stateChangeerror
error对话事件
conversationStart
conversationStartturnEnd
turnEndmessage
messagemessagesChange
messagesChangeuserTranscriptionChange
userTranscriptionChange发言事件
speakingChange
speakingChangebotOutput
botOutputbotTtsStarted
botTtsStartedbotTtsStopped
botTtsStoppedbotTtsText
botTtsText麦克风事件
userMuteStarted
userMuteStarteduserMuteStopped
userMuteStoppedBlendshape / lipsync 事件
blendshapes
blendshapesblendshapeStatsReceived
blendshapeStatsReceived动作事件
actionResponse
actionResponse服务器响应事件
serverResponse
serverResponseinteractionCreated
interactionCreated字段
类型
说明
会话事件
idleWarning
idleWarningllmNoResponse
llmNoResponsemetrics
metrics音频轨道(WebSocket 传输)
botAudioTrack
botAudioTrack事件速查
事件
负载
当
最后更新于
这有帮助吗?