Skip to content

omnivoice: declare options in the model spec (schema v1) - #789

Closed
Navier8 wants to merge 1 commit into
0xShug0:mainfrom
Navier8:omnivoice-spec-v1
Closed

Navier8 wants to merge 1 commit into
0xShug0:mainfrom
Navier8:omnivoice-spec-v1

Conversation

@Navier8

@Navier8 Navier8 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

This follows up #775 and #787: OmniVoice's spec moves to schema_version: 1 and declares its options. #787 serves an empty list for families on the older format, and OmniVoice is one of them.

What changes

model_specs/omnivoice.json gets schema_version: 1 and an options block. It declares exactly the keys src/models/omnivoice/session.cpp reads, with defaults taken from OmniVoiceGenerationOptions and the session constants:

  • 18 request options: seed, num_inference_steps, guidance_scale, speed, duration, t_shift, denoise, preprocess_prompt, postprocess_output, layer_penalty_factor, position_temperature, class_temperature, audio_chunk_duration, audio_chunk_threshold, text_chunk_size, text_chunk_mode (preset text_chunk_mode_full, default tag_aware), reference_text, instruction.
  • 10 session options: mem_saver, perf_mode (preset perf_mode_flash_attention), weight_type, generator_weight_type, audio_tokenizer_weight_type (preset weight_type_full), and the five *_graph_arena_mb / *_weight_context_mb sizes.
  • load: [].

src/models/omnivoice/loader.cpp: inspect() takes the CLI help from the contract. When a GGUF embeds the pre-v1 spec and no v1 contract is available, it keeps the old hard-coded help, following the pattern from #685.

docs/models/omnivoice.md: one line pointing to the spec for the full option list.

What deliberately doesn't change

  • No request or session validation is added. OmniVoice accepts any key today. Rejecting unknown keys would break clients that send extras, so that's left as a separate decision. I'm happy to add validate_spec_backed_request_options here or in a follow-up if you'd like it.
  • Two declarations are needed by the server. With a contract, the server forwards speed and injects a voice preset's reference_text only when the spec declares them (refresh_model_option_flags). Without these two rows, speed would fail with "speed is not supported by this model".
  • Legacy aliases are left out of the spec but still work. The runtime still accepts instruct, chunk_size, chunk_mode and bare mem_saver, following the "no UI-only aliases" note in docs/maintainers/model_specs.md.
  • No GGUF regeneration. Published GGUFs embed the old spec. The installed or built-in v1 spec takes precedence ("Using the current schema-v1 model contract…"). The fallback path above covers a GGUF used without it.

Runtime validation

Windows 11, CPU release build, omnivoice-q8_0.gguf from audio-cpp/audio.cpp-gguf, served with --config. I built this branch alone and also combined with #787 to read the options back over HTTP.

Check Result
tools/check_loader_catalog_sync.py --self-test and the full check OK, in sync
Server registers OmniVoice with the v1 spec Yes; it passes the typed validator
With #787: GET /v1/models?include_params=true 18 rows; text_chunk_mode lists the preset values
TTS: seed: 7, speed: 1.1, options.num_inference_steps: 16 HTTP 200; Moonshine transcribes it back word for word
Clone: base64 voice_ref and reference_text HTTP 200; transcribed word for word
Design: instructions: "female, low pitch", guidance_scale: 2.5 HTTP 200; transcribed word for word
Same TTS request with the old spec via model_spec_override params: [] (no contract); WAV byte-identical to the v1-spec output
Same TTS request on this branch built without #787 WAV byte-identical again
CLI: --num-inference-steps 8 --seed 3 --request-option speed=1.2 WAV written

The byte-identical outputs are the main evidence that this is a metadata change: synthesis is unaffected. I didn't test CUDA, Vulkan or Metal; nothing here touches backend code.

🤖 Generated with Claude Code

Move model_specs/omnivoice.json to schema_version 1 and declare the
options OmniVoice's session reads: 18 request options (sampling and
schedule controls, chunking, reference_text, instruction) and 10 session
options (mem_saver, perf_mode, weight types, arena sizes), with the
defaults from OmniVoiceGenerationOptions and the session constants.

The loader's CLI help now comes from the contract. A GGUF that embeds the
pre-v1 spec, with no v1 contract available, keeps the old help.

No request validation is added: OmniVoice still accepts any key, as it
does today, so no existing client breaks. With a contract the server
forwards speed and injects a preset's reference_text only when the spec
declares them, so both are declared. Legacy aliases (instruct, chunk_size,
chunk_mode, bare mem_saver) stay accepted and are left out of the spec.

Synthesis is unchanged: with the same seed, the WAV from the v1 spec and
from the legacy spec (via model_spec_override) are byte-identical.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@0xShug0

0xShug0 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

@Navier8 Ah, I just opened this PR to make your proposal easier to implement. #786. Could you check whether this PR is sufficient for your use case?

@Navier8

Navier8 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, #786 covers it, and more completely than this PR: it adds language and the Qwen3 families, and has CUDA validation. I'll close this one in its favour.

One thing was needed on my side. #787 only read options.request from specs on schema_version: 1, so with #786 it returned "params": [] for OmniVoice and Qwen3-ASR. I've pushed a commit to #787 that reads the options from the resolved spec whatever its version. Rows that aren't objects are skipped, since older-format specs skip the typed validator, and a preset is expanded only when the framework knows it.

Tested on a Windows CPU build of #786 plus #787, serial and --parallel-jobs. GET /v1/models?include_params=true returns OmniVoice's 19 rows, identical to #786's spec plus the expanded text_chunk_mode values; Qwen3-ASR returns 7 and Moonshine 3. Transcription is unchanged.

So for my use case the pair is #786 + #787.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants