pipecat

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 16 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 (
	PluginTitle   = "rtp-agent.plugins.pipecat"
	PluginVersion = "v0.9.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) (agent.AudioTurnResult, 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