pkg

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func (b *Pipeline) AddParticipant(ctx context.Context, name string, chunks <-chan AudioChunk) error

func (*Pipeline) Start

func (b *Pipeline) Start(ctx context.Context) (<-chan AudioChunk, error)

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

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

type TextContentChunk struct {
	Text   string
	Source string
}

func NewTextContentChunk

func NewTextContentChunk(text, source string) *TextContentChunk

func (*TextContentChunk) Type

func (c *TextContentChunk) Type() TextChunkType

type TextControlChunk

type TextControlChunk struct {
	Code   string
	Source string
}

func (*TextControlChunk) Type

func (c *TextControlChunk) Type() TextChunkType

type TextProcessor

type TextProcessor interface {
	Process(ctx context.Context, question <-chan TextChunk) (<-chan TextChunk, error)
}

type TextToSpeech

type TextToSpeech interface {
	Synthesize(ctx context.Context, text <-chan TextChunk) (<-chan AudioChunk, error)
}

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 через циклический буфер.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL