Skip to content

Update availableOnDevice and installOnDevice parameters #157

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evanbliu
Copy link
Collaborator

@evanbliu evanbliu commented May 7, 2025

Closes #155

This PR updates the availableOnDevice and installOnDevice parameters to take in a dictionary encapsulating the on-device model options.

@@ -199,6 +199,14 @@ interface SpeechRecognition : EventTarget {
attribute EventHandler onend;
};

dictionary SpeechRecognitionAvailabilityOptions {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What are your thoughts on having separate dictionaries for availability/installation? These two are currently identical, but they allow the availability options to differ from the installation options in the future.

Copy link
Member

Choose a reason for hiding this comment

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

Can you give an example of what those would be?

Besides the language, I can see the following:

  • quality / speed type of thing
  • diarization capability

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some examples of other options might include:

  • LLM-based speech recognition
  • acoustic echo cancellation
  • spoken/unspoken punctuation
  • language identification
  • Emoji-support

I think in most cases it would be fine to have the same dictionary type for availability/installation, but is this something we want to commit to?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could also rename availableOnDevice() and installOnDevice() to available() and install() and include the on-device part (or the options described here: #156 (comment)) in the SpeechRecognitionOptions.

@evanbliu evanbliu requested a review from padenot May 7, 2025 22:50
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.

Consider changing installOnDevice() parameter to InstallOptions
3 participants