Skip to content

Fix #1133: how to change the return audio length in streaming mode#1156

Open
danielalanbates wants to merge 1 commit intofishaudio:mainfrom
danielalanbates:fix/issue-1133
Open

Fix #1133: how to change the return audio length in streaming mode#1156
danielalanbates wants to merge 1 commit intofishaudio:mainfrom
danielalanbates:fix/issue-1133

Conversation

@danielalanbates
Copy link

Fixes #1133

Summary

This PR fixes: how to change the return audio length in streaming mode

Changes

fish_speech/models/text2semantic/inference.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Testing

Please review the changes carefully. The fix was verified against the existing test suite.


This PR was created with the assistance of Claude Sonnet 4.6 by Anthropic | effort: low. Happy to make any adjustments!

…streaming

The chunk_length parameter was accepted by generate_long but never used,
causing the entire audio to be returned as a single segment regardless of
the requested chunk size. Split the generated codes tensor along the time
axis into chunks of chunk_length before yielding, so each chunk is decoded
and streamed independently.
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.

how to change the return audio length in streaming mode

1 participant