Documentation
¶
Index ¶
- type AsrListener
- func (listener *AsrListener) OnFail(response *asr.SpeechRecognitionResponse, err error)
- func (listener *AsrListener) OnRecognitionComplete(response *asr.SpeechRecognitionResponse)
- func (listener *AsrListener) OnRecognitionResultChange(response *asr.SpeechRecognitionResponse)
- func (listener *AsrListener) OnRecognitionStart(response *asr.SpeechRecognitionResponse)
- func (listener *AsrListener) OnSentenceBegin(response *asr.SpeechRecognitionResponse)
- func (listener *AsrListener) OnSentenceEnd(response *asr.SpeechRecognitionResponse)
- type AsrWorker
- type Engine
- type Handler
- type HandlerConstructor
- type Message
- func (m *Message) Context() context.Context
- func (m *Message) Interrupt()
- func (m *Message) Interrupted() bool
- func (m *Message) OnOut() func(m *Message) error
- func (m *Message) String() string
- func (m *Message) WithOnOut(f func(m *Message) error) *Message
- func (m *Message) WithTurnID(id string) *Message
- type TTSWorker
- type Turn
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsrListener ¶
type AsrListener struct {
// contains filtered or unexported fields
}
AsrListener implementation of SpeechRecognitionListener
func (*AsrListener) OnFail ¶
func (listener *AsrListener) OnFail(response *asr.SpeechRecognitionResponse, err error)
OnFail implementation of SpeechRecognitionListener
func (*AsrListener) OnRecognitionComplete ¶
func (listener *AsrListener) OnRecognitionComplete(response *asr.SpeechRecognitionResponse)
OnRecognitionComplete implementation of SpeechRecognitionListener
func (*AsrListener) OnRecognitionResultChange ¶
func (listener *AsrListener) OnRecognitionResultChange(response *asr.SpeechRecognitionResponse)
OnRecognitionResultChange implementation of SpeechRecognitionListener
func (*AsrListener) OnRecognitionStart ¶
func (listener *AsrListener) OnRecognitionStart(response *asr.SpeechRecognitionResponse)
OnRecognitionStart implementation of SpeechRecognitionListener
func (*AsrListener) OnSentenceBegin ¶
func (listener *AsrListener) OnSentenceBegin(response *asr.SpeechRecognitionResponse)
OnSentenceBegin implementation of SpeechRecognitionListener
func (*AsrListener) OnSentenceEnd ¶
func (listener *AsrListener) OnSentenceEnd(response *asr.SpeechRecognitionResponse)
OnSentenceEnd implementation of SpeechRecognitionListener
type Engine ¶
type Engine struct {
*engine.BotEngine
Turns map[string]*Turn
// contains filtered or unexported fields
}
Engine TODO
type HandlerConstructor ¶
HandlerConstructor ...
type Message ¶
type Message struct {
SessionID string
ConversationID string // 会话ID
TurnID string // 轮次ID
ID string // 消息ID
Payload any // 消息内容(当前)
Question string // 消息内容(本轮/文本)
Answer string // 回复内容(本轮/文本)
// contains filtered or unexported fields
}
Message ...
Click to show internal directories.
Click to hide internal directories.