-
Notifications
You must be signed in to change notification settings - Fork 1
Speech

AO ≥ 1.28 advertises speech on WebSocket hello. After SessionBridge.start, the bridge uses:
-
speechClient.transcribe→ Ada STT sidecar:8090 -
speechClient.synthesize→ Ada TTS sidecar:8091
OpenAI-compatible HTTP. PCM leaves the Pi over LAN — same trust boundary as CPAI. See ADR 0003.
On the AI server:
python speech/stt_server.py --host 0.0.0.0 --port 8090 --model base --device cuda
AGENTIC_SPEECH_TTS_MODEL_DIR=… python speech/tts_server.py --host 0.0.0.0 --port 8091
export AGENTIC_SPEECH_ENABLED=1
export AGENTIC_SPEECH_ADVERTISE_STT_URL=http://<ada-lan-ip>:8090
export AGENTIC_SPEECH_ADVERTISE_TTS_URL=http://<ada-lan-ip>:8091Confirm WS hello includes "speech": { "enabled": true, "sttBaseUrl": "...", "ttsBaseUrl": "..." }.
| Service | Unit | Port | Script |
|---|---|---|---|
| STT | comstar-stt |
127.0.0.1:8090 |
scripts/stt_server_whisper.py --model tiny --beam-size 5 |
| TTS | comstar-tts |
127.0.0.1:8091 |
scripts/tts_server.py |
Bridge uses $COMSTAR_STT_URL / $COMSTAR_TTS_URL when speechClient == null.
Use Python 3.12 for .venv-stt — PyAV/faster-whisper struggle on 3.14.

mic → comstar-audio (VAD) → bridge PCM → Reach SpeechClient or HttpSttClient → transcript
STT is batch after VAD end, not streaming.
Debug WAV: /tmp/comstar-last-utterance.wav
Pi archive: /opt/comstar/testdata/stt/live/
Do not score product STT by replaying one golden WAV ten times — that only proves determinism.
python3 -m unittest discover -s testdata/stt -p 'test_*.py'
COMSTAR_STT_BENCH=1 python3 -m testdata.stt.bench_stt --trials 1 --require-live 10Labeled fixtures need source: bridge and path: audio→bridge→stt. Parecord/synthetic fixtures are smoke-only.
{
"file": "utterance.wav",
"transcript": "How are you doing today",
"source": "bridge",
"path": "audio→bridge→stt"
}
| Stage | Budget |
|---|---|
| STT (Ada GPU or local tiny) | ~1–5 s |
| TTS | ~1 s (first chunk can start earlier) |
Full budget: Latency Budget.
COMSTAR AI — Not a mystical AI. A tool you engineered — transparent, hackable, fast.
Home · Architecture · Admin Console · Runbook · Contracts
Apache-2.0 · Pre-alpha · Raspberry Pi 4 terminal + local AI server
COMSTAR AI
Start here
Product
Build & configure
Interfaces
- Contracts Overview
- Bridge ↔ Kiosk
- Bridge ↔ Audio
- CodeProject.AI
- AO Reach
- MCP Tools
- Attention State Machine
Features
- Speech (STT/TTS)
- Vision & Face Enrollment
- Directory Identity
- Wake Word
- MCP Topology
- Terminal Control
- Google Workspace
Decisions (ADRs)
- ADR Index
- 0001 Audio Routing
- 0002 Render Path
- 0003 Speech on Ada
- 0004 Terminal Control
- 0005 LDAP Identity
- 0006 House Presence
- 0007 Full-Duplex AEC
- 0008 TTS Engine
- 0009 Proactivity
- 0010 Text Channel
- 0011 Road VPN
- 0012 Admin Network
- 0013 AO mTLS
- 0014 Fallback Hotspot
Operate
Plan
Meta