fix: preserve case in GPT-SoVITS synthesis parameters - #10099
Open
xiongyuyang wants to merge 1 commit into
Open
xiongyuyang wants to merge 1 commit into
xiongyuyang wants to merge 1 commit into
Conversation
kilisamemarisaaa
approved these changes
Sep 16, 2026
kilisamemarisaaa
left a comment
There was a problem hiding this comment.
Verified commit e102780 locally from the PR tarball on Windows/Python 3.12: python -m pytest tests/unit/test_gsv_selfhosted_source.py -q passed (6 passed; only the existing audioop deprecation warning). Ruff check passed for both changed files. The implementation preserves string casing, serializes numeric values as strings, and keeps booleans lowercase for the GPT-SoVITS API. No additional issues found.
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.
Modifications
GPT-SoVITS default parameters currently lowercase every value. For example,
/Voices/Alice.WAVbecomes/voices/alice.wav, which can break reference audio lookup on case-sensitive filesystems. Prompt text such asHello NASAis also modified before sending it to the server.Preserve string casing while retaining string serialization for numeric values and lowercase
true/falsefor booleans. Add parameterized regression coverage for reference audio paths, prompt text, both boolean values, integers and floats.Screenshots or Test Results
Verification:
python -m pytest tests/unit/test_gsv_selfhosted_source.py -q -p no:cacheproviderBefore the fix: 2 failed (path and prompt casing), 4 passed.
After the fix: 6 passed, 1 existing audioop deprecation warning on Windows/Python 3.12.
Ruff check and commit hooks passed. These tests exercise request parameter construction; a running GPT-SoVITS server/model was not used.
Checklist
Summary by Sourcery
Preserve GPT-SoVITS synthesis parameter values without altering user-provided string casing.
Bug Fixes:
Tests: