Closed Bug 1132922 Opened 10 years ago Closed 10 years ago

The voice input launches directly with the error 'Audio problem'

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox41+ verified, firefox42+ verified, fennec+)

VERIFIED FIXED
Firefox 42
Tracking Status
firefox41 + verified
firefox42 + verified
fennec + ---

People

(Reporter: cos_flaviu, Assigned: karim)

References

Details

Attachments

(3 files, 1 obsolete file)

Attached image audio problem.png
Environment: Device: Samsung Galaxy R (Android 2.3.4); Build: Nightly 38.0a1 (2015-02-13); Steps to reproduce: 1. Launch fennec; 2. Tap on the url bar to enter edit mode; 3. Tap on the microphone icon from the url bar; Expected result: The voice input is successfully launched. Actual result: The voice input launches directly with the error 'Audio problem'. Notes: Please check the attached screenshot. Exception thrown in logcat: Audio capture error com.google.android.voicesearch.speechservice.AudioBuffer$AudioException: Audio capture threw exception at com.google.android.voicesearch.speechservice.AudioBuffer.getByteBuffer(AudioBuffer.java:272) at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.recordAndSend(RecognitionControllerImpl.java:522) at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.runRecognitionMainLoop(RecognitionControllerImpl.java:611) at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.startRecognition(RecognitionControllerImpl.java:395) at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.access$100(RecognitionControllerImpl.java:82) at com.google.android.voicesearch.speechservice.RecognitionControllerImpl$1.handleMessage(RecognitionControllerImpl.java:251) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.os.HandlerThread.run(HandlerThread.java:60) Caused by: java.io.IOException: couldn't start recording at com.google.android.voicesearch.endpointer.MicrophoneInputStream.ensureStarted(MicrophoneInputStream.java:81) at com.google.android.voicesearch.endpointer.MicrophoneInputStream.read(MicrophoneInputStream.java:99) at com.google.android.voicesearch.endpointer.ResampleInputStream.read(ResampleInputStream.java:94) at com.google.android.voicesearch.endpointer.ResampleInputStream.read(ResampleInputStream.java:69) at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:140) at java.io.BufferedInputStream.read(BufferedInputStream.java:324) at com.google.android.voicesearch.endpointer.EndpointerInputStream.read(EndpointerInputStream.java:343) at android.media.AmrInputStream.read(AmrInputStream.java:88) at com.google.android.voicesearch.speechservice.AudioBuffer.captureLoop(AudioBuffer.java:136) at com.google.android.voicesearch.speechservice.AudioBuffer.access$000(AudioBuffer.java:34) at com.google.android.voicesearch.speechservice.AudioBuffer$1.run(AudioBuffer.java:107) State change: RECOGNIZING -> ERROR ERROR_AUDIO AudioFocus abandonAudioFocus() from android.media.AudioManager@40685430 State change: ERROR -> CANCELED Closing the HTTP client. Closing the HTTP client.
Sounds like the feature needs a capability check
tracking-fennec: --- → ?
Unless there is a sane way to fix this, just turn it off for Gingerbread.
Assignee: nobody → jhugman
tracking-fennec: ? → 38+
Feature detection is happening at http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/toolbar/ToolbarEditText.java#479 This appears to be a problem with com.google.android.voicesearch on older devices. We can turn it off in Gingerbread, but I get the sense that this may be happening on more current, though still old devices. Is this more widespread than this one device, or API level?
Flags: needinfo?(flaviu.cos)
This disables voice search in Pre-Honeycomb devices. Needs testing on Honeycomb.
Attachment #8568633 - Flags: review?(michael.l.comella)
Attachment #8568633 - Flags: review?(mhaigh)
Comment on attachment 8568633 [details] [diff] [review] Disable voice search in Gingerbread. Review of attachment 8568633 [details] [diff] [review]: ----------------------------------------------------------------- r+ w/ Versions class. ::: mobile/android/base/toolbar/ToolbarEditText.java @@ +485,5 @@ > setOnTouchListener(new VoiceSearchOnTouchListener()); > } > > private boolean supportsVoiceRecognizer() { > + if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD) { Use Versions. https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/AppConstants.java.in?rev=f457684b3610#34
Attachment #8568633 - Flags: review?(michael.l.comella) → review+
Addresses feed back from mcomella r+. Changed to disable in preICS, as the number of Honeycomb devices are no longer significant enough to be counted in https://developer.android.com/about/dashboards/index.html .
Attachment #8568633 - Attachment is obsolete: true
Attachment #8568633 - Flags: review?(mhaigh)
Attachment #8569144 - Flags: review?(mhaigh)
(In reply to James Hugman [:jhugman] [@jhugman] from comment #3) > > We can turn it off in Gingerbread, but I get the sense that this may be > happening on more current, though still old devices. Is this more widespread > than this one device, or API level? Tested on Acer Iconia (Android 3.2.1) and the bug is not reproducible.
Flags: needinfo?(flaviu.cos)
Comment on attachment 8569144 [details] [diff] [review] Use Versions instead of android.os.Build. Review of attachment 8569144 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me - ship it! ::: mobile/android/base/toolbar/ToolbarEditText.java @@ +484,5 @@ > setOnTouchListener(new VoiceSearchOnTouchListener()); > } > > private boolean supportsVoiceRecognizer() { > + if (Versions.preICS) { Yay - good riddance pre ICS devices!
Attachment #8569144 - Flags: review?(mhaigh) → review+
We're holding this in Nightly, so AIUI 38 is unaffected. Tracking 39+ instead of 38+.
tracking-fennec: 38+ → 39+
tracking-fennec: 39+ → +
Assignee: jhugman → nobody
Looks like this was never landed. Karim - Can you pick this up, rebase, and land it?
Flags: needinfo?(kbenhmida)
Bug 1132922 ? Disable voice search for pre ICS devices.
Flags: needinfo?(kbenhmida)
Attachment #8627812 - Flags: review?(liuche)
Comment on attachment 8569144 [details] [diff] [review] Use Versions instead of android.os.Build. Review of attachment 8569144 [details] [diff] [review]: ----------------------------------------------------------------- If we turn on voice in 41, this will need to be uplifted.
[Tracking Requested - why for this release]: If we turn on voice to ride the trains with 41 (it's still behind a nightly flag but is in 41), we'll need to uplift this too.
Blocks: 1178500
Comment on attachment 8627812 [details] MozReview Request: Bug 1132922 ? Disable voice search for pre ICS devices. https://reviewboard.mozilla.org/r/12285/#review10793 Ship It!
Attachment #8627812 - Flags: review?(liuche) → review+
Assignee: nobody → kbenhmida
Are there any updates on whether voice will be turned on in 41? See comment 13
Flags: needinfo?(liuche)
We've been baking this on Nightly for a short while, but we definitely plan to turn this on in 41, barring any catastrophes on Nightly - it seems to be okay though, so I'm assigning bug 1178500.
Flags: needinfo?(liuche)
Sounds good! Tracking for 42 Nightly and 41 Aurora.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Comment on attachment 8627812 [details] MozReview Request: Bug 1132922 ? Disable voice search for pre ICS devices. Approval Request Comment [Feature/regressing bug #]: Voice Search is tracking Fx41 [User impact if declined]: Bad behavior, potentially holding back the feature [Describe test coverage new/current, TreeHerder]: [Risks and why]: Low risk. We are just blocking Voice Search on Gingerbread [String/UUID change made/needed]: none
Attachment #8627812 - Flags: approval-mozilla-aurora?
Comment on attachment 8627812 [details] MozReview Request: Bug 1132922 ? Disable voice search for pre ICS devices. Patch seems simple, will request QE to test this feature for FF41 if not already planned.
Attachment #8627812 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified as fixed in builds: - 42.0a1 2015-07-16; - 41.0a2 2015-07-16; Device: Samsung Galaxy R (Android 2.3.4).
Status: RESOLVED → VERIFIED
Based on comment 23, I'll remove the qe-verify flag, thanks.
Flags: qe-verify+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: