Skip to content

Exclude iOS joke voices from ReadAloud#1545

Draft
cdrini wants to merge 1 commit into
internetarchive:masterfrom
cdrini:feature/exclude-ios-joke-voices
Draft

Exclude iOS joke voices from ReadAloud#1545
cdrini wants to merge 1 commit into
internetarchive:masterfrom
cdrini:feature/exclude-ios-joke-voices

Conversation

@cdrini
Copy link
Copy Markdown
Contributor

@cdrini cdrini commented May 15, 2026

Before:

Loads of novelty voices for things like "Bubbles", which play a bubbly sound. Funny, but not super helpful :P . Or very old low quality synthesized voices like "Grandma". Most user's won't want these, so disable them.

image

After:

...

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.99%. Comparing base (fa1108a) to head (6a96b6b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1545      +/-   ##
==========================================
+ Coverage   68.96%   68.99%   +0.02%     
==========================================
  Files          65       65              
  Lines        5559     5564       +5     
  Branches     1231     1233       +2     
==========================================
+ Hits         3834     3839       +5     
  Misses       1691     1691              
  Partials       34       34              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR filters Web Speech API voices used by ReadAloud to hide known Apple novelty or low-quality voice families.

Changes:

  • Adds WebTTSEngine.isGoodVoice() to reject selected Apple voice URI prefixes.
  • Applies the filter in getVoices().
  • Adds a Jest test covering the new voice filtering behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/plugins/tts/WebTTSEngine.js Adds and applies voice filtering for Web TTS voices.
tests/jest/plugins/tts/WebTTSEngine.test.js Adds coverage for filtering known Apple novelty voice prefixes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +33
// Exclude known novelty/undesired macOS voice families (e.g. joke/system variants)
'com.apple.speech.synthesis.voice.',
'com.apple.eloquence.',
'com.apple.voice.super-compact.',
];

return (
voice.voiceURI
&& !badVoicePrefixes.some(prefix => voice.voiceURI.startsWith(prefix))
];

return (
voice.voiceURI
Comment on lines +101 to 102
const voices = speechSynthesis.getVoices().filter(WebTTSEngine.isGoodVoice);
if (voices.filter(v => v.default).length != 1) {
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

Successfully merging this pull request may close these issues.

2 participants