ProjectBuild an AI Voice Receptionist: the explanation · Module 3: Choosing models and infrastructure · part 5 of 23
Part 5 · Module 3: Choosing models and infrastructure

Module 3: Choosing models and infrastructure

23 min read·
About 40 minutes · Needs: Module 1 (the requirements), Module 2 (the voice loop) · Code: research/stt.py, research/tts.py, backend/app/core/config.py, docker-compose.yml, .env.example

Where this fits

WHERE THIS FITS The Medilane voice receptionist this module CLIENT React API LAYER FastAPI SAFETY SPEECH IN BRAIN LangGraph SPEECH OUT KNOWLEDGE AND DATA pgvector OPERATIONS Langfuse, Prometheus Caller app browser mic Staff app desk and admin REST API staff, sessions Voice socket audio both ways Auth + RBAC staff roles, voice tokens Guardrails emergency, PII VAD Silero, turns Whisper speech to text Language en, hi, Hinglish Agent tools, confirm Open models Groq: gpt-oss, Qwen Kokoro TTS en + hi voices Retrieval multilingual Ingestion clinic documents PostgreSQL clinic, calls, vectors Redis events, limits Front desk live events, hand-offs Observability traces, metrics Evaluation WER, safety, latency
The parts whose technology this module chooses (blue): speech to text, the models, the voice, search and the two data stores.

Module 2 named the stages of a turn. This module chooses what runs each one: which speech recogniser, which language models, which voice, which embedding model, which databases, and where each of them runs. The highlighted parts are the ones a choice here decides. Every choice was made by measuring, in a short experiment before the build and in evaluations after it, and every one can be changed with a setting.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan