Documentation
¶
Index ¶
Constants ¶
View Source
const ( SpeechControlSpeechStarted = "SpeechStarted" SpeechControlSpeechEnded = "SpeechEnded" )
View Source
const (
TextControlClear = "Clear"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioChunk ¶
type AudioChunk = []byte
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func NewPipeline ¶
func NewPipeline( audioToText SpeechToText, textProcessor TextProcessor, textToAudio TextToSpeech, ) *Pipeline
func (*Pipeline) AddParticipant ¶
type SpeechChunk ¶
type SpeechChunk interface {
Type() SpeechChunkType
}
type SpeechChunkType ¶
type SpeechChunkType int
const ( SpeechChunkTypeText SpeechChunkType = iota SpeechChunkTypeControl )
type SpeechControlChunk ¶
type SpeechControlChunk struct {
Code string
}
func (*SpeechControlChunk) Type ¶
func (c *SpeechControlChunk) Type() SpeechChunkType
type SpeechTextChunk ¶
type SpeechTextChunk struct {
Text string
}
func (*SpeechTextChunk) Type ¶
func (c *SpeechTextChunk) Type() SpeechChunkType
type SpeechToText ¶
type SpeechToText interface {
Transcribe(ctx context.Context, r <-chan AudioChunk) (<-chan SpeechChunk, error)
}
type TextChunk ¶
type TextChunk interface {
Type() TextChunkType
}
type TextChunkType ¶
type TextChunkType int
const ( TextChunkTypeText TextChunkType = iota TextChunkTypeControl )
type TextContentChunk ¶
func NewTextContentChunk ¶
func NewTextContentChunk(text, source string) *TextContentChunk
func (*TextContentChunk) Type ¶
func (c *TextContentChunk) Type() TextChunkType
type TextControlChunk ¶
func (*TextControlChunk) Type ¶
func (c *TextControlChunk) Type() TextChunkType
type TextProcessor ¶
type TextToSpeech ¶
type TextToSpeech interface {
Synthesize(ctx context.Context, text <-chan TextChunk) (<-chan AudioChunk, error)
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
deepgram/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
text_processor
|
|
|
chatgpt/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
deepgram/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
utils
|
|
|
audiotranscoder
Package audiotranscoder provides a real‑time Linear16 → Opus transcoder that keeps wall‑clock time.
|
Package audiotranscoder provides a real‑time Linear16 → Opus transcoder that keeps wall‑clock time. |
|
int16reader/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
opussampleprovider
Package opussampleprovider adapts a Linear16 io.Reader to LiveKit's lksdk.SampleProvider interface, emitting Opus packets in real‑time using audiotranscoder.OpusStreamer.
|
Package opussampleprovider adapts a Linear16 io.Reader to LiveKit's lksdk.SampleProvider interface, emitting Opus packets in real‑time using audiotranscoder.OpusStreamer. |
|
ringreader
Package ringreader позволяет читать из io.Reader через циклический буфер.
|
Package ringreader позволяет читать из io.Reader через циклический буфер. |
Click to show internal directories.
Click to hide internal directories.