How bert2/dtmfdetection works
Core Components (DtmfDetection Library)
• Goertzel Algorithm Implementation (Goertzel.cs)
• DTMF Analyzer (Analyzer.cs)
• DTMF Detector (Detector.cs)
• Configuration System (Config.cs)
NAudio Integration Layer (DtmfDetection.NAudio)
• Components:
• Audio File Handler (AudioFile.cs)
• Audio Stream Handler (AudioStream.cs)
• Background Analyzer (BackgroundAnalyzer.cs)
• Integration points with NAudio framework
Input/Output Flow
• Raw PCM Data
• Audio Files (MP3, WAV, etc.)
• Live Audio Streams (Microphone, System Audio)
• Output formats:
• DTMF Changes (DtmfChange.cs)
• DTMF Tones (DtmfTone.cs)
Processing Pipeline
• Audio Input → Sample Processing → DTMF Detection → Event Generation
• Sample block processing (26ms blocks as mentioned in README)
Specific Design Guidelines:
Use a layered architecture approach
• [Input Sources Layer]
• ↓
• [NAudio Integration Layer]
• ↓
• [Core Detection Layer]
• ↓
• [Output/Events Layer]
Component Relationships
• Clear dependencies between modules
• Extensibility points (custom implementations)
• Configuration flow
Processing Details
• Sample block size (26ms)
• Threshold configuration
• Multi-channel support
• Goertzel algorithm implementation