Working examples that show how to build voice applications with the x-phone ecosystem. Each demo is self-contained with its own README, source code, and setup instructions.
xphone-go — using the Go library directly
| Demo | What it does | STT / TTS | API keys? |
|---|---|---|---|
| echo-ai-cloud | Answers a call, echoes back what the caller says | Deepgram (streaming WebSocket STT + HTTP TTS) | Yes (Deepgram) |
| echo-ai-local | Same, but fully local — no cloud APIs | faster-whisper + Kokoro (Docker) | No |
Real Phone Network (PSTN / SIP trunk)
│
▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ xpbx │────▶│ xbridge │────▶│ Your App │
│ (PBX + UI) │ │ (gateway) │ │ (any language)│
└──────────────┘ └──────────────┘ └──────────────┘
│
▼
┌──────────────┐
│ xphone-go │ ← or use the library directly (Go / Rust)
│ xphone-rust │
└──────────────┘
| Project | What it is | When to use it |
|---|---|---|
| xphone-go | Go library — SIP calls as []int16 PCM |
Go apps that need direct call control |
| xphone-rust | Rust library — same API, pure Rust SIP/RTP | Rust apps that need direct call control |
| xbridge | Voice gateway — SIP to WebSocket + REST | Apps in any language (Python, Node, etc.) |
| xpbx | Self-hosted PBX with web UI | Multi-extension routing, voicemail, trunks |
All demos need a SIP server to register against. The quickest option is xpbx in Docker — it comes with extensions 1001-1003 pre-created (password: password123). See each demo's README for specific setup instructions.
To place test calls, use any SIP softphone (e.g. Zoiper).
To add a new demo, create a directory under the appropriate ecosystem component (e.g. xphone-go/, xbridge/) with:
main.go(or equivalent entry point)README.mdwith quick start, env vars, and how-it-works.env.exampleif the demo needs configuration- Update this README's demo table