pipecat

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginTitle   = "rtp-agent.plugins.pipecat"
	PluginVersion = "v0.1.2"
	PluginPackage = "rtp-agent.plugins.pipecat"
)

Variables

This section is empty.

Functions

func PCM16MonoFloat32

func PCM16MonoFloat32(frame *model.AudioFrame) ([]float32, error)

func SmartTurnAudioWindow

func SmartTurnAudioWindow(audio []float32, nSeconds int, sampleRate int) []float32

Types

type FeatureExtractor

type FeatureExtractor func(context.Context, []float32) ([]float32, error)

type Plugin

type Plugin struct{}

func (Plugin) DownloadFiles

func (Plugin) DownloadFiles() error

type ProbabilityEstimator

type ProbabilityEstimator func(context.Context, []float32) (float64, error)

type SmartTurn

type SmartTurn struct {
	// contains filtered or unexported fields
}

func NewLocalSmartTurn

func NewLocalSmartTurn(opts ...SmartTurnOption) (*SmartTurn, error)

func NewSmartTurn

func NewSmartTurn(opts ...SmartTurnOption) *SmartTurn

func NewSmartTurnWithONNX

func NewSmartTurnWithONNX(options SmartTurnONNXOptions, opts ...SmartTurnOption) (*SmartTurn, error)

func (*SmartTurn) PredictEndOfTurnAudio

func (s *SmartTurn) PredictEndOfTurnAudio(ctx context.Context, frames []*model.AudioFrame) (float64, error)

func (*SmartTurn) PredictEndpoint

func (s *SmartTurn) PredictEndpoint(ctx context.Context, audio []float32) (SmartTurnResult, error)

func (*SmartTurn) PredictFrame

func (s *SmartTurn) PredictFrame(ctx context.Context, frame *model.AudioFrame) (SmartTurnResult, error)

type SmartTurnONNXOptions

type SmartTurnONNXOptions struct {
	ModelPath          string
	ONNXRuntimeLibPath string
	FeatureExtractor   FeatureExtractor
}

type SmartTurnOption

type SmartTurnOption func(*SmartTurn)

func WithProbabilityEstimator

func WithProbabilityEstimator(estimator ProbabilityEstimator) SmartTurnOption

type SmartTurnPrediction

type SmartTurnPrediction int
const (
	SmartTurnIncomplete SmartTurnPrediction = 0
	SmartTurnComplete   SmartTurnPrediction = 1
)

type SmartTurnResult

type SmartTurnResult struct {
	Prediction  SmartTurnPrediction
	Probability float64
}

type WhisperFeatureExtractor

type WhisperFeatureExtractor struct {
	// contains filtered or unexported fields
}

func NewWhisperFeatureExtractor

func NewWhisperFeatureExtractor() *WhisperFeatureExtractor

func (*WhisperFeatureExtractor) Extract

func (e *WhisperFeatureExtractor) Extract(ctx context.Context, audio []float32) ([]float32, error)

Jump to

Keyboard shortcuts

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