Speech-to-code pipeline
End-to-end flow: audio or transcript → Oratio (vox-oratio, optional peak normalize + contextual phrase rerank) → optional routing intents (token-aware classifier) → MCP tools (vox_speech_to_code orchestrates transcribe + vox_generate_code; or use vox_oratio_* + vox_generate_code separately; validate_file for explicit checks) → full frontend validation (including HIR) via vox_lsp::validate_document_with_hir → MENS training data (asr_refine, speech_to_code mix formats).
Ingress: HTTP vox-audio-ingress (/api/audio/transcribe JSON path body, /api/audio/transcribe/upload multipart) plus edge capture doc: speech-capture-architecture.md.
Failure-oriented notes
- Schema SSOT: telemetry traces use
contracts/speech-to-code/speech_trace.schema.json; supervised export addsvox_codeviaspeech_trace.mens.schema.json(mens/schemas/speech_to_code_trace.schema.jsonre-exports).failure_categorymatchesfailure-taxonomy.schema.jsonandSpeechFailureCategoryin Rust. - Grammar hints, not grammar guarantees:
contracts/speech-to-code/vox_grammar_artifact.jsonis lexicon surface for prompt hints; hard gate remains compiler validation + bounded repair (stall detection on repeated diagnostics). - Benchmark fixtures:
contracts/speech-to-code/benchmark-fixtures.manifest.txtlists frozen paths undertests/speech-to-code/fixtures/(validated in integration tests + HIR smoke on expected.vox).
KPIs and contracts
- JSON schemas:
contracts/speech-to-code/ - Failure taxonomy:
SpeechFailureCategoryinvox-oratio::failure_taxonomy - Correlation IDs:
vox-oratio::trace::new_correlation_id()(propagate in MCP responses)
Validation parity
- LSP-fast path:
validate_document— lex, parse, typecheck (plus mesh warnings). - CLI / speech gate:
validate_document_with_hir— same plus HIR structural validation (matchesvox-clirun_frontend_strfor type/HIR diagnostics).
MCP vox_validate_file joins relative paths to the MCP repository root, then canonicalizes and rejects paths outside that root (absolute paths must still resolve under the bound workspace). vox_generate_code MCP input schema is strict (additionalProperties: false) for prompt, optional validate, max_retries, and session_id.
MCP validate_file and generate_vox_code validation retries use validate_document_with_hir.
Corpus mix
record_format: speech_to_code— seecrates/vox-corpus/src/corpus/mix.rsandmens/schemas/speech_to_code_trace.schema.json.
Deterministic speech helpers
- Lexicon (
SpeechLexicon::from_json_slice+apply): project aliases → identifiers. - Normalize (
speech_normalize): spoken symbols (fat arrow→=>) and casing commands (camel case foo bar→ identifiers).