Open Bug 1597760 Opened 5 years ago Updated 2 years ago

Mic button shows listening feedback animation until a string is returned from the API

Categories

(Core :: Web Speech, defect, P3)

Desktop
All
defect

Tracking

()

Tracking Status
firefox71 --- disabled
firefox72 --- affected

People

(Reporter: danibodea, Unassigned)

References

Details

Note

  • When the user taps the mic button and speaks into the microphone if he pauses for about 1 second, the audio capturing will stop, but the mic button's "listening" animation will only stop after the API returns a string. This way, the user may be caught speaking for another 5 seconds before realizing that audio capture has stopped somewhere along the way.

Affected versions

  • Nightly v72.0a1
  • Other channels don't have the API yet.

Affected platforms

  • All

Steps to reproduce

  1. Open the browser and flip the following prefs to "true":
  • media.webspeech.recognition.enable
  • media.webspeech.recognition.force_enable
  1. Go to https://translate.google.com/
  2. Select English as the input language, click the mic button and speak into the mic.

Expected result

  • The mic button's "listening" feedback animation should stop when sound capture actually stops.

Actual result

  • The mic button's "listening" feedback animation only stops when the string is returned (a few seconds later).

Additional notes

Summary: Mic button shows listening feedback until the a string is returned from the API → Mic button shows listening feedback animation is displayed until the a string is returned from the API
Summary: Mic button shows listening feedback animation is displayed until the a string is returned from the API → Mic button shows listening feedback animation until a string is returned from the API

The priority flag is not set for this bug.
:anatal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(anatal)
Flags: needinfo?(anatal)
Priority: -- → P3

Looking at the Web Speech API Demonstration (https://www.google.com/intl/en/chrome/demos/speech.html) only, how it stops the animation on end event, instead of on audioend event, this bug is most probably wrongly attributed to the web speech api.

Excerpt from https://www.google.com/intl/en/chrome/demos/speech.html:

  recognition.onstart = function() {
    recognizing = true;
    showInfo('info_speak_now');
    start_img.src = '/intl/en/chrome/assets/common/images/content/mic-animate.gif';
  };
...
  recognition.onend = function() {
    recognizing = false;
    if (ignore_onend) {
      return;
    }
    start_img.src = '/intl/en/chrome/assets/common/images/content/mic.gif';
...

Can you help with a proposition for a better component? Or maybe redirect this question to someone who knows? Thanks.

Flags: needinfo?(luka.zitnik)

Daniel, I'm anticipating two ways in which this bug can be resolved.

If this modified Web Speech API Demonstration matches your expected behavior, we can say that the bug is in the examples and the bug should be readdressed to their authors.

However, because the examples were written for continuous mode, that is dictation instead of voice commands, and continuous mode is not yet implemented in Firefox (see https://bugzilla.mozilla.org/show_bug.cgi?id=1185233), we can say that the bug is really a manifestation of the missing feature and that the bug depends on it.

What are your thoughts?

Flags: needinfo?(luka.zitnik) → needinfo?(daniel.bodea)

I understand the cause of the issue now. I do not think that a fix will be needed until the Web Speech API will be fully implemented and released.
This bug may not be necessary considering that the cause is an unimplemented part of the feature, but, in the long run, it's better to have these bugs logged and verify them when the parts are there.

I am not equipped to decide how this bug is going to be fixed, only the verification.

Flags: needinfo?(daniel.bodea)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.