-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
🔖 Feature description
Currently, whenever the tts is clicked for a message a new request is sent. This increases loading
A user cannot abort the tts request midway once requested, so once the tts request is resolved from the server, the audio starts playing irrespective that the user may be in a different conversation page.
🎤 Why is this feature needed ?
To eliminate the waiting time for successive tts requests for the same message.
To let the user cancel the request sent
The user doesn't want stale request audio to be played when the user has moved on to another page. This is necessary since the default TTS (google tts) takes a lot of time for long texts.
✌️ How do you aim to achieve this?
By caching the received audio in the audio ref.
By implementing an abort controller to abort the request midway the request.
By stopping the audio playback when the component is unmounted/ when the user moves to a different conversation.
🔄️ Additional Information
No response
👀 Have you spent some time to check if this feature request has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
Yes I am willing to submit a PR!