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

Standardized output for languages() #3

Open
HadrienGardeur opened this issue Aug 2, 2024 · 0 comments
Open

Standardized output for languages() #3

HadrienGardeur opened this issue Aug 2, 2024 · 0 comments
Assignees

Comments

@HadrienGardeur
Copy link
Member

Following up on the implementation of voices(), we'll be in a position to also work on languages() where the standardized output should be:

  • language as a BCP-47 language tag
  • count as the number of available voices for that language

As pointed out in #2, we'll need to be extra careful with the format for language since some browsers do not return proper BCP-47 language tags.

For the output, we can leverage the list of voices returned by voices() to list all languages and calculate a count.

We can also implement the following filters for this method:

  • quality, which would be a minimum required
  • recommended voices (a boolean)
  • and offline availability (a boolean)

The default should be the same than voices() which means that quality is set to low as the minimum, we don't filter exclusively on recommended voices and we don't filter out voices that require the user to be online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In review
Development

No branches or pull requests

2 participants