Files
settled-reach/server/src/voice/mod.rs
T
jpmschweitzerandClaude Opus 4.6 0b0fa8c04e refactor(voice): replace HTTP with stdin/stdout IPC for sr-voice workers
Gemma 2 T&C compliance: exposed HTTP ports allow mods or external code
to reach the model, complicating license enforcement. Switch to piped
stdin/stdout (JSONL protocol) so the model is only reachable through
the game server's internal queue.

- worker.rs: VoicePipe owns Child + piped stdin/stdout, VoiceProcessConfig
  replaces port-based config, workers spawn their own sr-voice child
- hardware.rs: remove VoiceInstanceManager (port/process lifecycle),
  replace with evaluate_scaling() free function + HardwareProbe::voice_config()
- sr-voice: add --stdio flag to serve command, new stdio.rs JSONL mode
- Remove ureq dependency from server crate (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:57:32 +01:00

21 lines
810 B
Rust

//! Voice pipeline integration (D-138, Spike 2).
//!
//! Translates culture-neutral semantic base text into character-voiced output
//! via an LLM re-voicing pipeline. The pipeline is a background runtime
//! enhancement — the game is complete and functional without it.
//!
//! ## Components
//!
//! - `prompt_builder` — composition engine: NPC data + culture + tell state → prompt string
//! - `cache` — MessagePack voice cache (store/retrieve, length-gated variants)
//! - `queue` — crossbeam work queue with priority + backpressure
//! - `worker` — inference worker pool (each worker owns a piped sr-voice child process)
//! - `hardware` — hardware detection + dynamic scaling decisions
pub mod cache;
pub mod hardware;
pub mod lookup;
pub mod prompt_builder;
pub mod queue;
pub mod worker;