server/guardrails/noop.py implements the Guardrail interface with an
always-allow stub so the Pipecat pipeline has the pluggable hook from
SLICE-02. Swapping to CustomerServiceGuardrail (SLICE-03 TASK-03-04)
requires no pipeline change (D-019). The session-start disclaimer text
(RESEARCH.md safety baseline) is defined here so the pipeline can play
it as the first AI utterance even before the real ruleset lands.
---ci---
phase: 1
milestone: v0.1
plan: 02
task: 02-07
status: execute
persona: backend-engineer
requirements:
covered: [REQ-ORCH-02]
---/ci---
server/llm/ollama_cloud.py wraps the Ollama Cloud direct API
(https://ollama.com/api/chat + bearer, stream=True) behind LLMProvider.
chat() streams LLMStreamChunk (is_first flag for TTFT measurement);
chat_full() accumulates for the debrief / branch classifier (offline).
Two models: gemma4:cloud (roleplay_model) + deepseek-v4-flash:cloud
(debrief_model, no_think mode for latency, D-020). Resolves R6 — the
adapter confirms the direct API + bearer path; a live first-token
confirmation is pending the R3 probe with a real key. Graceful no-key
degradation (no chunks, no crash). 6 unit tests pass (mocked httpx
streaming response + env model selection + chat_full accumulation).
---ci---
phase: 1
milestone: v0.1
plan: 02
task: 02-03
status: execute
persona: backend-engineer
requirements:
covered: [REQ-LLM-01, REQ-LLM-02]
---/ci---
server/tts/cartesia_tts.py wraps the raw Cartesia Sonic WebSocket API
(wss://api.cartesia.ai/tts/websocket) — streaming PCM s16le, one voice
(CARTESIA_VOICE_ID, D-006). server/tts/piper_tts.py wraps piper-tts
self-hosted synthesis (R4 mitigation, open-weights). Both implement
TTSProvider (synthesize streaming + synthesize_all). Both degrade
gracefully (no audio, no crash) when the API key / voice model is absent.
PRAXIS_TTS=cartesia|piper selects the adapter via the registry with no
pipeline change (D-014). 7 unit tests pass (mock streams + env selection
+ graceful missing-key/model handling).
---ci---
phase: 1
milestone: v0.1
plan: 02
task: 02-02
status: execute
persona: backend-engineer
requirements:
covered: [REQ-VOICE-02]
---/ci---
docs/latency-report.md documents the SLICE-01 spike status: probe
infrastructure is built and ready; live measurements are pending API key
provisioning (only GITEA_TOKEN exists at EXECUTE time). Includes the latency
budget, the TTS decision matrix (Cartesia vs Piper, pending live R4 numbers),
the SLICE-01 go/no-go gate no-go actions per G-003, Piper pre-staging
instructions, and the R6 resolution (Pipecat OLLamaLLMService accepts custom
base_url + bearer). TTS decision recorded as 'pending live measurement —
Piper pre-staged as R4 mitigation per ARCHITECTURE.md'.
---ci---
phase: 1
milestone: v0.1
plan: 01
task: 01-06
status: execute
persona: lead-developer
requirements:
covered: [REQ-VOICE-03, REQ-NFR-LAT-01, REQ-LLM-01, REQ-LLM-02]
---/ci---
scripts/probe_e2e.py runs the integrated path: ASR-transcript-in → Ollama
gemma4:cloud streaming → Cartesia TTS streaming; measures end-to-end
(transcript-in → first-audio-out) over N iterations (default 10). Prints
per-segment (LLM TTFT, TTS first-audio) + e2e summaries, and a budget
comparison vs the 600ms target. The Piper leg is optional (--piper) and
documents the pre-staged R4 mitigation if the voice model isn't provisioned.
If keys are missing, prints KEY_MISSING and exits 0.
---ci---
phase: 1
milestone: v0.1
plan: 01
task: 01-05
status: execute
persona: backend-engineer
requirements:
covered: [REQ-VOICE-03, REQ-NFR-LAT-01, REQ-LLM-01, REQ-LLM-02]
---/ci---
scripts/probe_ollama.py calls https://ollama.com/api/chat with bearer auth,
stream=True, for gemma4:cloud (role-play) and deepseek-v4-flash:cloud
(no_think mode, D-020). Measures time-to-first-token over N iterations
(default 20), prints min/median/p95/mean tables for both models, and logs
any error/throttle events (R5). Also resolves R6 — a successful probe
confirms the direct API + bearer token path works. If OLLAMA_API_KEY is
missing, prints KEY_MISSING and exits 0.
---ci---
phase: 1
milestone: v0.1
plan: 01
task: 01-04
status: execute
persona: backend-engineer
requirements:
covered: [REQ-LLM-01, REQ-LLM-02, REQ-VOICE-03, REQ-NFR-LAT-01]
---/ci---
scripts/probe_cartesia.py opens a WebSocket to Cartesia Sonic, requests TTS
for a sample customer-service utterance, and measures first-audio-byte
latency over N iterations (default 20). Prints min/median/p95/mean. Uses the
raw Cartesia WS API (no SDK coupling). If CARTESIA_API_KEY is missing, prints
KEY_MISSING and exits 0. Also fixes the R1 Deepgram probe to use the raw WS
API instead of the churn-prone SDK listen client.
---ci---
phase: 1
milestone: v0.1
plan: 01
task: 01-03
status: execute
persona: backend-engineer
requirements:
covered: [REQ-VOICE-03, REQ-NFR-LAT-01]
---/ci---
scripts/probe_deepgram.py opens a streaming WebSocket to Deepgram Nova-3,
sends synthesized 16kHz mono PCM in 100ms chunks, and measures
first-partial-transcript latency over N iterations (default 20). Prints
min/median/p95/mean. If DEEPGRAM_API_KEY is missing, prints a clear
KEY_MISSING banner and exits 0 — the probe infrastructure is the deliverable;
live numbers come when keys are provisioned.
---ci---
phase: 1
milestone: v0.1
plan: 01
task: 01-02
status: execute
persona: backend-engineer
requirements:
covered: [REQ-VOICE-03, REQ-NFR-LAT-01]
---/ci---