Repository navigation
Studio: say so when the Audio page stops speech at Max tokens - #12583
danielhanchen merged 4 commits into
Conversation
NilayYadav
left a comment
There was a problem hiding this comment.
Review + reproduction evidence
Pinned review: 284d0b2cc0. 2 findings, fixed in d433d7820c and 284d0b2cc0.
I reproduced the Audio page flow on fresh upstream main (Modal Linux, NVIDIA L4, real install.sh --local, password login, Chromium 1440x900): load a TTS model from "Select audio model", set Max tokens under Advanced, paste a 162 word paragraph, press Generate.
- main
faca4e2: Orpheus 3B GGUF at Max tokens 512 returns a 6.14 s clip withfinish_reason: "stop"and nothing on the page says it was cut. Same for Orpheus Safetensors (6.14 s) and Spark TTS 0.5B at 256 (5.1 s). A 484 word text at the 8192 ceiling stops at 1:31, also with no notice. - PR as submitted
67fa100: Orpheus GGUF and Safetensors now return"length"and show the warning. Spark TTS (BiCodec) and Oute TTS (DAC) Safetensors still returned"stop"with no warning, and at 8192 the toast told the user to raise a field that is already at its maximum. - PR head
284d0b2: all four models return"length"with the warning when cut (Spark 5.1 s, Oute 1.32 s, Orpheus 6.14 s); at 8192 the toast says to split the text instead. A 7 word text that ends on its own returns"stop"with no toast on every model, on both sides.
- Tests: the new tests fail on main and pass on the PR (3 FIXED); with the two fixes, 7 FIXED and 31 passed, including new BiCodec and DAC cases.
- Adjacent:
/v1/audio/speechreturns 200 with audio on both sides, the/audio/generateresponse keys are unchanged, and model switching across the four models works. - Speed: Orpheus GGUF, 512 tokens, 5 runs each: main median 11.93 s (11.65 to 12.96), PR 11.44 s (11.39 to 11.91).
- Actions A/B on a fork mirror did not get a runner in time (the fork queue was saturated), so CI evidence here is the test differential above; upstream CI on this head is still running.
Conclusion: real silent truncation on the default Audio page path, fixed for Orpheus (GGUF and Safetensors), Spark and Oute. CSM, native and audio.cpp models report nothing, as before.
Codex coverageCodex does not answer
Status: converged on the reviewed commit. |
|
Review record for #12583, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#336. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
audio-page.tsx: main's Max tokens toast (unslothai#12583) now lives in use-speech-generation, where the stack moved TTS generation. TTS generation keeps both main's stats_holder and the stack's run inputs.
…hai#12583) * Say so when the Audio page stops speech at Max tokens * Report the Max tokens cut for Spark and Oute TTS too * Suggest splitting the text when Max tokens is already at its ceiling * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

On the Audio page, text to speech stops when it reaches the Max tokens setting, which sits under Advanced and starts at 2048. On Orpheus TTS 3B that is about 25 seconds of speech, so a paragraph of a hundred words or more comes back cut short and is saved to the gallery as if it were complete. Nothing on the page says the limit was hit, so it looks like the model skipped the rest of the text.
Now the page shows a warning when a clip stopped at Max tokens, and points to the setting under Advanced so the rest can be spoken. Clips that finish on their own look the same as before, and the default is unchanged.
This covers Orpheus in both the safetensors and GGUF versions, and any GGUF speech model, since llama-server already reports when it stopped at the limit. The response from the audio generate route now says "length" instead of "stop" in that case.
Before / after
Audio page with Orpheus 3B GGUF, Max tokens set to 256, speaking a paragraph that needs far more than 256 tokens. Left is the merge base, right is this PR. Both clips stop at 0:03; only the PR says so.
/api/inference/audio/generatefinish_reason for the same requests: cut paragraphstop->length, short sentencestopon both.