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

Updates to Voice list in settings: removing duplicates, other languages #189

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

e28eta
Copy link

@e28eta e28eta commented Feb 5, 2025

This might be a partial fix for #149. There are other ideas in that issue that I haven't looked at.

This PR does the following:

  • Add all of the voices that exactly match the current language & region
  • Add any voices that match the current language, from a different region, that aren't already in the list.
  • Filters out voices that are for other languages
  • Filters out duplicate entries
  • Only show voice "quality" if it's non-Default. Should be more clear what's happening.
  • This PR also uses the system default voice by default, and only uses the in-app voice list if the user has specifically chosen & saved a voice in Enchanted.

After:

Screenshot 2025-02-04 at 6 24 17 PM

Before (truncated Picker list, it's 3-4x longer):

Screenshot 2025-02-04 at 7 28 43 PM

Side note:
in order to build & test, I had to do something with swift-markdown-ui. I didn't see #154 / #155 , but made a similar change locally.

* Some voices match the current language *and* region - show all of them
* Some voices match the current language, but are from a different region. Add them if we
don't already have that voice. For example, in english, there might be voices with accents
from Australia or India. The user might want to use one of those.
* Some voices are provided for multiple languages & regions. I don't think it's worth
exposing that complexity in the UI.
* Some voices have the same name, but differing quality levels. Shows each quality level
available for each voice.
* Don't show voices that don't match the current language.

Looks like this app doesn't have any localization done (yet?). So this is driven off the
system language & region. I think that is the best choice, but there might be room to
improve! Especially if we knew the LLM was using a different language.
As a new user, "Default" looked like it was the default voice choice, and that was super
confusing because > 95% of my installed voices had that text. Take a cue from Apple, and
only show the quality if it is Enhanced or Premium.
…xplicit choice

A better default than the first voice is the voice currently chosen in System Settings.
As soon as the user chooses & saves a different voice, the app will stick with that one.

Unless that voice is uninstalled. Then the in-app Settings display picker gets out of
order (showing nothing selected and logging an error). However, the SpeechSynthesizer
class will correctly use whatever the currently selected system voice is.
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.

1 participant