Repository navigation
server: return 400 for an inline voice_ref that is not a WAV - #1255
Merged
0xShug0 merged 1 commit intoNov 10, 2026
Merged
Conversation
Valid Base64 that decoded to something other than a WAV reached the WAV reader's generic error and became HTTP 500. It is now a request error (HTTP 400), like an unreadable audio_base64, and the docs say which voice_ref problems return 400.
Owner
|
@magnus-dev-melin Thanks! PR 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.
Follow-up to #1252. Valid Base64 that decoded to bytes other than a WAV reached the WAV reader's generic error and returned HTTP 500, although the PR and the API docs said invalid
voice_refvalues return 400. It is now a request error (HTTP 400, "voice_ref base64 data is not a readable WAV (…)"), as an unreadableaudio_base64already is. The docs now say exactly which cases return 400: a malformedvoice_ref, or inline data that is not a readable WAV. A server-local path that can't be read keeps its existing behavior.Validation (macOS, M1 Max, Metal,
chatterbox_q8_0as"task": "vc"):cli_request_options_testgains the case (valid Base64 of plain text); onmainthe test aborts withstd::runtime_error: invalid WAV RIFF header, with this change it passes./v1/tasks/runwithaudio_base64andvoice_ref: {"type": "base64", "data": <Base64 of plain text>}: HTTP 400 "voice_ref base64 data is not a readable WAV (invalid WAV RIFF header)"; an inline WAV still returns HTTP 200 and the converted audio.Thanks for catching it.