# Repository Briefing: neural-maze/realtime-phone-agents-course
> Source: https://repoforai.com/repo/neural-maze/realtime-phone-agents-course (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/neural-maze/realtime-phone-agents-course
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: B (57/100 · Maintenance 6/35 · Adoption 20/25 · Releases 11/20 · License 20/20)
- **Latest Release**: week4 (2025-12-14) — https://github.com/neural-maze/realtime-phone-agents-course/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, GPU, API
- **Momentum**: 1,126 ★ total (+0 24h / +0 7d) · 255 forks
- **When to Use**: Best for: Engineering teams prototyping a real-estate phone agent or learning how to connect telephony, interchangeable speech backends, structured search, and tracing in one application. Skip if: You need an offline phone system, a turnkey managed contact center, or demonstrated latency, concurrency, and availability guarantees before adoption.

## Overview
```text
### Architecture & Core Mechanics
This Python 3.11+ application separates the call interface, speech backends, and domain retrieval. FastAPI serves the call-center application, Twilio connects inbound and outbound phone calls, and FastRTC runs the voice conversation. Gradio provides a separate browser entry point for testing without Twilio. The agent pipeline transcribes caller audio, uses the resulting text for the LLM response and any tool calls, then synthesizes the reply.

The package lives under `src/realtime_phone_agents`. The `stt/` and `tts/` modules separate local, API, and RunPod implementations. `agent/tools/property_search.py` exposes domain search to the agent, while `infrastructure/superlinked/` houses the retrieval integration. The agent stack declares LangChain and LangChain-Groq, and retrieval uses Superlinked with Qdrant. The avatar registry loads YAML personas, while Opik instrumentation in `agent/fastrtc_agent.py` traces the conversation stages.

### Key Capabilities & Differentiators
Property search goes beyond embedding similarity: Superlinked combines text similarity, numeric, and categorical spaces in one index and lets queries adjust their relative weights. The supplied `data/properties.csv` supports an end-to-end test in which the caller asks for an apartment in Barrio de Salamanca for at most €900,000. The example demonstrates handling a location and price constraint together; it does not establish a live listing feed.

Speech recognition can use Moonshine locally, Whisper through Groq, or Faster Whisper large-v3 on RunPod. Speech synthesis offers local Kokoro and Orpheus through Together AI or a RunPod deployment of Orpheus 3B. Gradio lets users mix and match STT and TTS backends. The `week4` release adds eight YAML-defined avatars with distinct styles and voices, prompt versioning, and Opik traces for transcription, LLM responses, tool calls, and synthesis, including complete conversation threads.

### Trade-offs & Limitations
Compared with a managed voice-agent platform, this stack gives engineers more control over speech backend selection, retrieval ranking, prompts, and traces, but leaves them responsible for integrating and operating those components. Local speech options reduce dependence on hosted speech APIs and avoid their network round trips, at the cost of local model compute. Hosted APIs reduce model-serving work; RunPod lets teams operate their own endpoints, but adds GPU cost and capacity planning. There are no established latency or concurrency results to size a deployment from; measure end-to-end turn latency and behavior under overlapping calls with the chosen backends.

For semantic search with fixed filters, a conventional vector index may be simpler. Superlinked earns its place when numeric and categorical attributes also need to influence ranking. Treat this as an engineering reference rather than a verified production call center: the Compose health check is not an availability or load guarantee. Twilio remains an external dependency, and complete Opik conversation traces make transcript access and retention explicit deployment decisions. The MIT code license does not replace model licenses or provider terms.

### Hardware & Deployment Guide
For browser testing, configure `.env` from `.env.example`, install the Python 3.11+ dependencies, and run `make start-gradio-application`. Install ffmpeg if `ffprobe` is missing. For telephony testing, `make start-call-center` launches the Docker Compose stack on port 8000 with local Qdrant. The app mounts `./data`, caches Hugging Face assets in a named volume, and exposes a `/health` endpoint for the container health check. `make start-ngrok-tunnel` provides a public URL for Twilio during development.

For self-managed speech inference on RunPod, `Dockerfile.faster_whisper` uses the `speaches-ai/speaches` base and pre-downloads large-v3; `Dockerfile.orpheus` uses a CUDA-enabled llama.cpp server. Run `make create-faster-whisper-pod` or `make create-orpheus-pod`, then put the returned endpoint URLs in `.env`. Cloud configuration also covers Twilio, Qdrant Cloud, Opik, and the selected speech providers. The releases build in layers: `week2` adds retrieval, `week3` adds interchangeable speech backends and model containers, and `week4` adds personas, tracing, and cloud deployment configuration.
```

## Key Capabilities
```text
- Telephony: FastRTC handles voice conversations, Twilio supports inbound and outbound calls, and Gradio provides a browser test path.
- Property search: Superlinked combines text, numeric, and categorical spaces with query-time weighting; Qdrant backs the retrieval stack.
- Speech recognition: Choose local Moonshine, Groq's Whisper API, or Faster Whisper large-v3 on RunPod.
- Speech synthesis: Choose local Kokoro or Orpheus via Together AI or RunPod; the Orpheus 3B container uses a CUDA-enabled llama.cpp server.
- Persona and traces: Eight YAML-defined avatars configure prompts and voices; Opik captures pipeline stages and conversation threads.
- Deployment: Docker Compose runs the FastAPI app with Qdrant, and separate Dockerfiles package the two RunPod speech backends.
```

## Quick Start / Clone
```bash
make start-gradio-application
```
