Documentation
¶
Overview ¶
Package inworld is an STT WebSocket client for the Inworld realtime API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a bidirectional streaming STT session (one websocket for the lifetime of the client).
func New ¶
New dials Inworld STT with cfg.API.Key as Basic auth credential and configures the session.
func (*Client) SendEndTurn ¶
SendEndTurn notifies the recognizer that the user finished an utterance.
type Event ¶
type Event struct {
Text string `json:"text"`
IsFinal bool `json:"isFinal"`
VoiceProfile VoiceProfile `json:"voice_profile"`
}
Event is the merged STT transcription event produced from API envelopes.
type VoiceProfile ¶
type VoiceProfile struct {
Age []VoiceProfileBucket `json:"age"`
Accent []VoiceProfileBucket `json:"accent"`
Emotion []VoiceProfileBucket `json:"emotion"`
VocalStyle []VoiceProfileBucket `json:"vocal_style"`
Pitch []VoiceProfileBucket `json:"pitch"`
}
VoiceProfile contains optional categorical facets emitted by STT.
type VoiceProfileBucket ¶
type VoiceProfileBucket struct {
Label string `json:"label"`
Confidence float64 `json:"confidence"`
}
VoiceProfileBucket is one bucket in a categorical voice facet.
Click to show internal directories.
Click to hide internal directories.