Documentation
¶
Index ¶
- Constants
- func PCM16MonoFloat32(frame *model.AudioFrame) ([]float32, error)
- func SmartTurnAudioWindow(audio []float32, nSeconds int, sampleRate int) []float32
- type FeatureExtractor
- type Plugin
- type ProbabilityEstimator
- type SmartTurn
- func (s *SmartTurn) PredictEndOfTurnAudio(ctx context.Context, frames []*model.AudioFrame) (float64, error)
- func (s *SmartTurn) PredictEndpoint(ctx context.Context, audio []float32) (SmartTurnResult, error)
- func (s *SmartTurn) PredictFrame(ctx context.Context, frame *model.AudioFrame) (SmartTurnResult, error)
- type SmartTurnONNXOptions
- type SmartTurnOption
- type SmartTurnPrediction
- type SmartTurnResult
- type WhisperFeatureExtractor
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)
Types ¶
type ProbabilityEstimator ¶
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 (*SmartTurn) PredictEndpoint ¶
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
Click to show internal directories.
Click to hide internal directories.