Skip to content

fix: preserve case in GPT-SoVITS synthesis parameters - #10099

Open
xiongyuyang wants to merge 1 commit into
AstrBotDevs:masterfrom
xiongyuyang:fix/gsv-preserve-parameter-case
Open

xiongyuyang wants to merge 1 commit into
AstrBotDevs:masterfrom
xiongyuyang:fix/gsv-preserve-parameter-case

Conversation

@xiongyuyang

@xiongyuyang xiongyuyang commented Sep 15, 2026

Copy link
Copy Markdown

Modifications

GPT-SoVITS default parameters currently lowercase every value. For example, /Voices/Alice.WAV becomes /voices/alice.wav, which can break reference audio lookup on case-sensitive filesystems. Prompt text such as Hello NASA is also modified before sending it to the server.

Preserve string casing while retaining string serialization for numeric values and lowercase true/false for booleans. Add parameterized regression coverage for reference audio paths, prompt text, both boolean values, integers and floats.

  • This is NOT a breaking change.

Screenshots or Test Results

Verification: python -m pytest tests/unit/test_gsv_selfhosted_source.py -q -p no:cacheprovider

Before 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

  • Changes are tested and verification steps/results are provided above.
  • No new dependencies.
  • No malicious code.
  • New feature discussion: not applicable (bug fix).

Summary by Sourcery

Preserve GPT-SoVITS synthesis parameter values without altering user-provided string casing.

Bug Fixes:

  • Preserve the casing of GPT-SoVITS string synthesis parameters while continuing to serialize booleans as lowercase and numeric values as strings.

Tests:

  • Add parameterized regression coverage for reference audio paths, prompt text, booleans, integers, and floats.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@kilisamemarisaaa kilisamemarisaaa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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