Avoid crash on duplicate voice names
Repository details (talkie)
- Project page
- talkie
- Project log category
- talkie (725 entries)
- Repository
- @joelpurra/talkie
- Owner
- @joelpurra
- Issues
- Issues on Github
- Contributors
- Contributors on Github
- Project status
- ⏲️ This project has had recent commits.
- 📂 This project is open.
- 🌠 This project is popular.
- Repository activity period
- 🗓—
- Commits
- 770 commits
- Stars
- 75 stars
Commit details (35b4d225)
- Author
- Joel Purra
- Authored at
- Committer
- Joel Purra
- Committed at
Commit message
Avoid crash on duplicate voice names
- In some cases, the list of voices provided by the browser/system contain voices with non-unique names.
- Previously, name collisions were ignored (probably silently) but added strictness when upgrading to typescript added throwing an error.
- The thrown error may be uncaught, apart from top-level error reporters, which went undetected during testing on systems without name collisions.
- This commit reduces the error to a log entry, effectively masking the error, and consistently selects the first (if any) voice in the list of matches by name.
- Masking the error may lead to confusion, if the colliding voices are different enough for users to notice.
- Currently assumed to affect macos systems, perhaps due to the system voice settings allowing upgrading the quality of user-preferred voices.
- Requires testing on a macos system.
- A proper fix requires further work:
- Introducing testing/development voice name collisions.
- Detecting voice differences, apart from name; perhaps
voiceURI
.- Informing the user of potential collisions; modifying the voice names, voice list indicators, and/or other user interface changes.
- If differences are detectable, perhaps automatically selecting high-quality voices.
See
Raw text
Avoid crash on duplicate voice names - In some cases, the list of voices provided by the browser/system contain voices with non-unique names. - Previously, name collisions were ignored (probably silently) but added strictness when upgrading to typescript added throwing an error. - The thrown error may be uncaught, apart from top-level error reporters, which went undetected during testing on systems without name collisions. - This commit reduces the error to a log entry, effectively masking the error, and consistently selects the first (if any) voice in the list of matches by name. - Masking the error may lead to confusion, if the colliding voices are different enough for users to notice. - Currently assumed to affect macos systems, perhaps due to the system voice settings allowing upgrading the quality of user-preferred voices. - Requires testing on a macos system. - A proper fix requires further work: - Introducing testing/development voice name collisions. - Detecting voice differences, apart from name; perhaps `voiceURI`. - Informing the user of potential collisions; modifying the voice names, voice list indicators, and/or other user interface changes. - If differences are detectable, perhaps automatically selecting high-quality voices. See - https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisVoice/voiceURI