Skip to content
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

Any way to 'buffer' the next text? #538

Open
2 tasks done
secoldPrivate opened this issue Oct 15, 2024 · 0 comments
Open
2 tasks done

Any way to 'buffer' the next text? #538

secoldPrivate opened this issue Oct 15, 2024 · 0 comments

Comments

@secoldPrivate
Copy link

secoldPrivate commented Oct 15, 2024

🚀 Feature Requests

Basically I have an array of strings and they are fed into flutter tts using the onComplete handler to speak the next element in the array.
But I noticed that there's a slight unpleasant delay of 0.5-1 second between sentences which throws off the flow of the text. This i suspect is a result of just time to convert the text to speech.

Why this is happening is because I'm only calling 'speak' after the previous statement is finished. I'd like to be able to 'queue' the array directly, or just call speak many times in succession without waiting and have it automatically synthesize asynchronously, and have the speech 'ready to go' by the time the first sentence finishes talking so the second one can just start immediately without having to do the synthesization on the fly.

I'm not sure if this can be achieved with some combination of existing functionality, or whether I should just synthesize each string in the array to a file, and play the files in order one after the other to eliminate the delay. (but then i'd need file storage permissions which adds bulk/clutter).

Platforms affected (mark all that apply)

  • 📱 iOS
  • 🤖 Android
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

No branches or pull requests

1 participant