fix(supertonic): honor voice preset sent as a request option - #302
Merged
Conversation
The WebUI supertonic voice picker (webui/configs/model_params.json) sends the selected preset as a plain request option (options.voice), but SupertonicSession::generation_options_from_request only read the structured request.voice.speaker.cached_voice_id and otherwise fell back to the load-time default M1, so the picker had no effect. Read the 'voice' / 'supertonic.voice' option as a fallback. The structured cached_voice_id still takes precedence; unknown ids are rejected downstream by the voice-style loader.
Contributor
Author
|
Code and PR assisted and written by DeepSeekv4 flash and ox alpha through cline |
Owner
|
@drzsdrtfg Thank you for the fix! PR validated and merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The WebUI voice picker for Supertonic 3 (defined in
webui/configs/model_params.json) lets you choose one of 10 presets (M1–M5, F1–F5) and sends that choice as a plain request option (options.voice). However,SupertonicSession::generation_options_from_requestonly read the structuredrequest.voice.speaker.cached_voice_idfield and otherwise used the load-time defaultM1. The picker appeared to do nothing — output was always M1.Fix
In
src/models/supertonic/session.cpp, read thevoice(orsupertonic.voice) request option as a fallback when no structuredcached_voice_idis present. The structured field keeps precedence; unknown ids are still rejected downstream by the voice-style loader (runtime.cpp->require_file("voice_style_<id>.json")).Verification workflow
WebUI → Supertonic 3 → voice = F1/M3/etc → synthesize → output now matches the selected preset. The UI already sends
options.voice(requestOptions merges advancedValues), so no frontend change is required.