Local CoreML Smart Turn
Local Smart Turn detection on Apple Silicon using CoreML
Overview
LocalCoreMLSmartTurnAnalyzer
runs Smart Turn inference directly on your Mac using Apple’s CoreML framework. This provides low-latency inference without external API dependencies, making it ideal for development and applications where network access is limited or latency is critical.
Installation
Requirements
- Apple Silicon Mac (M1/M2/M3 series)
- macOS 11.0 or later
Local Model Setup
To use the LocalCoreMLSmartTurnAnalyzer
, you need to set up the CoreML model locally:
-
Install Git LFS (Large File Storage):
-
Initialize Git LFS
-
Clone the Smart Turn model repository:
-
Set the environment variable to the cloned repository path:
Configuration
Constructor Parameters
Path to the directory containing the Smart Turn model files
Audio sample rate (will be set by the transport if not provided)
Configuration parameters for turn detection. See SmartTurnParams for details.
Example
Performance Considerations
- Latency: Very low latency since inference happens locally
- Resource Usage: Uses local CPU/GPU resources
- Reliability: No dependency on external services or network connectivity
Notes
- Optimal for development environments and latency-sensitive applications
- The CoreML model is optimized for Apple Silicon but will work on Intel Macs with reduced performance
- First inference may be slower as the model is loaded and compiled