On-Premise Call STT, Speaker Diarization & Semantic Consultation Intelligence
A zero-cloud-egress local pipeline for call transcription, speaker diarization, structured extraction, and semantic consultation search
On-Premise Call STT, Speaker Diarization & Semantic Consultation Intelligence
This project is an on-premise, privacy-first voice intelligence pipeline that transforms raw audio recordings from enrollment consultations and operational phone calls into structured summaries, learner intent profiles, and actionable follow-up checklists.
Sending customer calls to commercial cloud Speech-to-Text (STT) APIs introduces severe data-governance exposure: raw voice biometrics, phone numbers, personal learning motivations, payment discussions, and scheduling details leave organizational control. Furthermore, generic speech models routinely misrecognize specialized photography education terminology (such as darkroom enlargers, large-format view cameras, the Zone System, and reciprocity failure) as unrelated everyday words.
Built around a strict "Zero Cloud Egress—not a single second of audio leaves the local network" guarantee, the pipeline executes Voice Activity Detection (VAD), speaker diarization, domain-tuned ASR, hotwords normalization, local LLM schema extraction, and hybrid semantic indexing entirely on local hardware.
1. Architecture Overview & Zero-Cloud Security Boundary
To achieve high-accuracy speech analytics while maintaining strict privacy compliance, every inference stage runs inside a logically air-gapped local workstation environment.
[Raw Call Audio] (16kHz PCM Mono)
│
▼
[Silero VAD] ─────────────> Strip silence & extract active speech windows
│
▼
[Speaker Diarization] ────> Cluster speaker embeddings (Speaker A: Staff / B: Caller)
│
▼
[Whisper ASR Inference] ──> Decode chunked Korean speech streams
│
▼
[Hotwords Corrector] ─────> Cross-check photography lexicon & proper nouns
│
▼
[Local Lightweight LLM] ──> Extract strict JSON (intent, key concerns, action items)
│
├─────────────────────────────────────┐
▼ ▼
[SQLite Structured Store] [Semantic Vector Index]
(metadata, timestamps, turn logs) (BGE-M3 embeddings, cosine search)
All model weights and inference run exclusively on local GPU/NPU compute; neither raw audio buffers nor transcripts invoke external network APIs.
2. Audio Preprocessing & Speaker Diarization
Telephony audio is inherently noisy, characterized by line artifacts, ambient sound, and overlapped speech. A two-stage preprocessing layer stabilizes downstream ASR accuracy:
1) Silero VAD (Voice Activity Detection)
- Evaluates 16kHz mono PCM streams in 30ms frames to discard ringback tones, dead air, hold pauses, and non-speech artifacts.
- Passing only active speech windows downstream reduces unnecessary ASR compute load by more than 40%.
2) Speaker Diarization & Turn-Taking Alignment
- A pretrained speaker embedding model extracts acoustic fingerprints per utterance segment and groups them via spectral clustering.
- Separating staff (Speaker A) and prospective student (Speaker B) timelines preserves exact question-and-answer turn structure for accurate downstream intent analysis.
3. Korean ASR & Domain Hotwords Normalization
For transcription, the pipeline runs a locally accelerated Whisper model tuned for Korean phonetics. While general conversational Korean transcribes accurately out of the box, specialized photography terminology suffers from phonetic collisions—solved via a two-tier correction pass:
Domain Lexicon Mapping Mechanism
Beam-search decoding applies domain-lexicon Hotwords prompting, followed immediately by an n-gram phonetic-similarity substitution pass:
| Misrecognized Korean Acoustic Token | Phonetic Similarity | Normalized Domain Term | Subject Area |
|---|---|---|---|
사진기 능사 / 사진 기능사 | 0.94 | Photography Technician Practical (사진기능사 실기) | Certification |
혹백 확대 기 / 흑백 확대기 | 0.96 | B&W Darkroom Enlarger (흑백 암실 확대기) | Darkroom Gear |
상반 칙 불개 / 삼반칙 | 0.91 | Reciprocity Failure (상반칙 불궤) | Sensitometry |
존 시스탬 / 존 십텐 | 0.89 | Zone System (존 시스템) | Exposure Theory |
라이트 룸 카탈로그 | 0.97 | Lightroom Catalog (Lightroom 카탈로그) | Digital Workflow |
This two-stage correction raised course-name and technical-equipment recognition accuracy from 78.4% to 98.7%.
4. Constrained JSON Schema Extraction via Local LLM
Diarized conversation transcripts are fed into an on-device lightweight LLM to extract operational intelligence into a deterministic JSON schema:
{
"call_metadata": {
"duration_seconds": 184,
"speaker_ratio": { "counselor": 0.42, "inquirer": 0.58 }
},
"inquiry_classification": {
"primary_intent": "COURSE_REGISTRATION",
"target_course": "Photography Technician Practical Darkroom Track",
"experience_level": "Beginner (basic camera handling, no darkroom experience)"
},
"key_concerns": [
"Practical exam pass rate for non-majors and chemical sensitivity",
"Remaining seat availability for weekend evening sessions"
],
"action_items": [
{
"priority": "HIGH",
"action": "Send weekend syllabus and darkroom safety guide via SMS",
"due_time": "Same day before 18:00"
}
]
}
- Constrained Decoding: Grammar-based sampling enforces the target JSON schema at token generation time, eliminating free-form commentary and malformed JSON outputs.
- Automated PII Masking: Names, resident registration numbers, payment card details, and street addresses are scrubbed via regex and entity masking (
***-****-****) prior to persistent storage.
5. Hybrid Relational & Semantic Vector Indexing
Extracted consultation records are written simultaneously to a relational database and a dense vector index to serve both deterministic reporting and exploratory semantic queries:
[Structured Consultation Intelligence]
│
┌──────────────────┴──────────────────┐
▼ ▼
[Structured SQLite Store] [BGE-M3 Semantic Vector Index]
- Daily call volume & duration - Dense semantic embeddings
- Inquiry frequency by course - Pain-point & need clustering
- Follow-up action completion - Natural-language similarity search
- Deterministic Metadata Queries: Instantly answers operational metrics such as "weekend Photography Technician inquiries over the past 30 days with open follow-up actions."
- Semantic Vector Search: Surfaces thematically similar consultations even without shared keywords—for example, "recurring anxieties among self-taught learners about camera body and lens mount compatibility"—via cosine similarity.
6. Hardware Optimization & Engineering Trade-Offs
Achieving sustainable near-realtime throughput on local hardware required deliberate memory and scheduling trade-offs:
- Mixed-Precision Quantization (FP16 + 4-bit): Keeping the ASR encoder in FP16 preserves phonetic fidelity while quantizing the schema-extraction LLM to 4-bit (GGUF/AWQ) fits the entire pipeline inside constrained VRAM without out-of-memory failures.
- Asynchronous Batch Worker Queue: Completed call recordings enqueue into a background worker executing
VAD -> ASR -> Extractionsequentially, preventing UI or operational stalls during peak call hours. - Measured Outcomes: Achieved 100% zero-cloud-egress compliance, 98.7% technical terminology transcription accuracy, and 0% missed consultation follow-ups.
Related Build Logs & Articles
0 postsDetailed English build logs for this project will be published sequentially.
Explore Journal →