-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Since the WebSpeechVoiceManager instance is a singleton so that you, and the engine, can access the same, on init it parses all browser voices by default, and keep them in memory so that one can filter from the entire list of voices if needed – including novelty and low-quality, duplicates, etc.
Alternatively, you can pass an array of BCP-47 languages to limit the number of voices parsed and kept in memory.
The assumption for the latter is that you should know the list of languages before init’ing WebSpeechVoiceManager – either directly or through the WebSpeechEngine –, and that it is unlikely you will discover them after the fact, and need to extend this list.
There may be cases where this is not true, and you need to request additional voices dynamically.
Since we can only request all browser voices, we always have access to the complete list, so the method would simply re-parse with additional languages, and add to the existing array of parsed voices.
But then maybe if you can request additional voices, you may also want to remove some that are no longer needed, or that you are sure you won’t use so that they don’t waste memory… so it could be tricky to design something reasonably balanced if/once we go there.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status