local_smart_turn_v2
Local PyTorch turn analyzer for on-device ML inference using the smart-turn-v2 model.
This module provides a smart turn analyzer that uses PyTorch models for local end-of-turn detection without requiring network connectivity.
- class pipecat.audio.turn.smart_turn.local_smart_turn_v2.LocalSmartTurnAnalyzerV2(*, smart_turn_model_path: str, **kwargs)[source]
Bases:
BaseSmartTurnLocal turn analyzer using the smart-turn-v2 PyTorch model.
Provides end-of-turn detection using locally-stored PyTorch models, enabling offline operation without network dependencies. Uses Wav2Vec2 architecture for audio sequence classification.
Deprecated since version 0.0.106: LocalSmartTurnAnalyzerV2 is deprecated and will be removed in a future version. Use LocalSmartTurnAnalyzerV3 instead.
- __init__(*, smart_turn_model_path: str, **kwargs)[source]
Initialize the local PyTorch smart-turn-v2 analyzer.
- Parameters:
smart_turn_model_path – Path to directory containing the PyTorch model and feature extractor files. If empty, uses default HuggingFace model.
**kwargs – Additional arguments passed to BaseSmartTurn.