Background
The current project uses cloud-based speech recognition services (Alibaba Cloud Tingwu, Volcengine), which presents the following issues:
- Requires uploading audio to the cloud, posing privacy risks
- Depends on network connectivity, cannot be used offline
- Incurs continuous API call costs
- Response latency affected by network conditions
Goals
Replace cloud-based ASR providers with local WhisperKit to achieve fully offline speech recognition capabilities.
Technical Solution 1. Architecture Changes
Current Cloud Provider Flow:
Recording → Upload Audio to OSS → Cloud
ASR → Download Results → Result Fusion
Local Whisper Flow:
Recording → Local Audio Preprocessing →
WhisperKit Inference → Result Fusion
- Core Components
- LocalWhisperService : Implements TranscriptionService protocol, providing a unified transcription interface
- WhisperModelManager : Manages model download, loading, caching, and lifecycle
- LocalWhisperParser : Parses WhisperKit transcription results
- MeetingPipelineManager : Supports local execution path, skipping OSS upload step 3. Model Management
- Download Whisper models from Hugging Face (supports HF Mirror for acceleration)
- Model state machine: Cold (not downloaded) → Warm (downloaded) → Hot (loaded)
- Automatic caching and expiration management
- Offline mode support ( HF_HUB_OFFLINE ) 4. Audio Processing
- Automatic resampling to 16kHz
- Mono channel conversion
- Audio chunking for long audio support
Benefits
- Privacy Protection : Audio data processed entirely locally, no cloud upload
- Offline Availability : Works without network connectivity
- Cost Reduction : No API call fees
- Faster Response : Local inference without network latency
- Greater Control : Customizable models and inference parameters
Implementation Plan
- Integrate WhisperKit framework
- Implement LocalWhisperService
- Implement WhisperModelManager
- Update MeetingPipelineManager to support local path
- Add model download and management UI
- Implement result fusion algorithm
- Fix model download timeout issues
- Performance optimization and testing
- Update user documentation
- Gradually remove cloud provider dependencies
Open Issues
- Model Download : Current tests show model download timeout issues, need to optimize download strategy
- Performance Optimization : Long audio inference performance needs further optimization
- Model Selection : Need to determine default model size (base/small/medium)
- Compatibility : Ensure compatibility with existing features (speaker diarization, AI analysis)
References
Background
The current project uses cloud-based speech recognition services (Alibaba Cloud Tingwu, Volcengine), which presents the following issues:
Goals
Replace cloud-based ASR providers with local WhisperKit to achieve fully offline speech recognition capabilities.
Technical Solution 1. Architecture Changes
Current Cloud Provider Flow:
Local Whisper Flow:
Benefits
Implementation Plan
Open Issues
References