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

voice property should utilize voiceURI instead of an index #94

Open
ecc521 opened this issue Mar 8, 2023 · 2 comments
Open

voice property should utilize voiceURI instead of an index #94

ecc521 opened this issue Mar 8, 2023 · 2 comments
Labels
bug/fix Something isn't working needs: triage

Comments

@ecc521
Copy link
Contributor

ecc521 commented Mar 8, 2023

Currently, especially on web, the list of available voices can change while the page is open. Uniquely identifying a specific voice (rather than the current system) avoids the risk of playing the wrong voice due to voices getting added, etc, while the page is open.

Additionally, at least on Android, voices are unordered - so this plugin needs to order the voices in a repeatable manner such that they can be located. I'm not actually sure if voices can change while the app is open, however either way, voiceURI would be less complicated.

Ideal Solution: voice property takes a string representing the voiceURI of the voice (or a separate option for voiceURI)

  • The biggest problem here is that, in order to maintain backwards compatibility, such changes would increase the codebase size overall, which may not be ideal.
@ecc521 ecc521 changed the title voice property should utilize voiceURI instead of an array index voice property should utilize voiceURI instead of an index Mar 8, 2023
@ecc521
Copy link
Contributor Author

ecc521 commented Mar 8, 2023

Also, related to #90
On Android, since the entire list of voices must be retrieved in order to find the index, it adds ~50ms overhead on my test device (OnePlus 7T, Android 12) to calls where the voice property is used. Not a major issue (especially since it's async and I believe on a different thread) but also would be a good thing to address.

We could theoretically cache the list, but I'm not seeing anything guaranteeing that the list doesn't change, so caching seems unwise as compared to using unique identifiers.

@Nikkolas-Cage
Copy link

any solution with this 2024

@robingenz robingenz added the bug/fix Something isn't working label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix Something isn't working needs: triage
Projects
None yet
Development

No branches or pull requests

3 participants