fix(tts): report unknown-provider fallback truthfully - #77932
Open
rungmc357 wants to merge 1 commit into
Open
Conversation
Contributor
|
Verified against current main ( Evidence (live probe, venv python 3.11):
Adversarial checks passed:
This PR can merge as-is. (Vox Lockin lane 05 ships #78202 for the other class members: piper lazy-install parity, probe install-safety, null-config guards.) |
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
Unknown TTS provider names have historically fallen back to Edge TTS. The fallback worked, but the success payload still reported the unknown configured provider as the backend that generated the file.
This keeps the fallback behavior for compatibility while reporting it truthfully:
provideris nowedge, the backend that actually synthesized audio.fallback_fromrecords the unresolved configured or overridden provider name.provider: "neutts"while preservingfallback_from.Regression coverage
Adds an end-to-end dispatch regression that configures an unregistered provider, stubs Edge generation, and verifies that the successful response identifies Edge while retaining the unresolved name in
fallback_from.An independent path review also exercised configured and explicit built-ins, registered plugins, command providers, explicit unknown overrides, fallback generation failure, Edge-to-NeuTTS fallback, and the no-backend-available path.
Validation
pytest -q tests/tools/test_tts_plugin_dispatch.py tests/tools/test_tts_command_providers.py tests/agent/test_tts_registry.py tests/tools/test_tts_opus_routing.py83 passedruff check tools/tts_tool.py tests/tools/test_tts_plugin_dispatch.pygit diff --check origin/main...HEAD