Documentation
¶
Overview ¶
Package voice transcribes inbound voice traffic into text messages.
Index ¶
Constants ¶
View Source
const UtteranceSilenceWindow = 1500 * time.Millisecond
UtteranceSilenceWindow matches the current Discord-style utterance timeout.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor collects Discord voice audio into utterances and transcribes them.
func NewProcessor ¶
func NewProcessor( bus *events.Bus, transcriber *openaiaudio.WhisperClient, logger *slog.Logger, emergencySafeWords []string, beforeMainSession func(context.Context, string) (*events.SlackReplyTarget, error), ) *Processor
NewProcessor constructs a voice processor.
type TranscriptionPublisher ¶
type TranscriptionPublisher struct {
// contains filtered or unexported fields
}
TranscriptionPublisher relays transcribed voice text into the shared main session.
func NewTranscriptionPublisher ¶
func NewTranscriptionPublisher( bus *events.Bus, logger *slog.Logger, source events.Source, emergencySafeWords []string, beforeMainSession func(context.Context, string) (*events.SlackReplyTarget, error), ) *TranscriptionPublisher
NewTranscriptionPublisher constructs a reusable voice transcription publisher.
func (*TranscriptionPublisher) PublishTranscription ¶
func (p *TranscriptionPublisher) PublishTranscription(ctx context.Context, text, webSessionID string) (bool, error)
PublishTranscription publishes a transcribed utterance into the main conversation.
Click to show internal directories.
Click to hide internal directories.