Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start TTS generation as soon as 1 sentence worth of tokens are generated. #3343

Closed
chrishart0 opened this issue Jun 21, 2024 · 0 comments
Closed

Comments

@chrishart0
Copy link

chrishart0 commented Jun 21, 2024

Is your feature request related to a problem? Please describe.
The new audio generation features are awesome, but audio could generation much closer to real time. As it stands, text does not get sent to the audio generation API until the full response has been received. Preventing anything like a real time chat experience.

Describe the solution you'd like
Since the TTS functionality already sends 1 sentence at a time to get generated, we should send the first sentence out to the audio API as soon as it has streamed in. That way, we can get audio back withing seconds of the message being sent instead of waiting for the whole response to come back.

Describe alternatives you've considered
None

Additional context

Technical Notes

There are two places audio is generated which will need to be touched. The regular chat interface and the call interface. We will need to figure out how to tap into stream and, I suppose use the same sentence chunker which is already written chunking text to send to the TTS API for chunking the stream. I've only glanced at the code but this doesn't sound too hard.

@open-webui open-webui locked and limited conversation to collaborators Jun 21, 2024
@tjbck tjbck converted this issue into discussion #3345 Jun 21, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant