Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continues Speech Recognition beep sound after Google Search update

I have an app that keeps on listening to voice and converting it to commands using Google Voice API.

I have been using setStreamMute(AudioManager.STREAM_SYSTEM, true) to mute the beep and it worked until a couple of days ago before "Google Search" new update. Is there any workaround fix for it?

I know I can use setRingerMode(AudioManager.RINGER_MODE_SILENT), but maybe there is another method?

like image 955
duduhayo Avatar asked Feb 11 '14 12:02

duduhayo


People also ask

Does Google have speech recognition?

Unlike the on-screen keyboard, the Add-on works only within a Google Doc; the Chrome OS on-screen keyboard works with all text fields. To install the Speech Recognition Add-on, open a Google Doc, choose Add-ons, and then select Get add-ons.

Which algorithm is used in Google speech recognition?

Which Algorithm is Used in Speech Recognition? The algorithms used in this form of technology include PLP features, Viterbi search, deep neural networks, discrimination training, WFST framework, etc. If you are interested in Google's new inventions, keep checking their recent publications on speech.


3 Answers

In the update they switched the output of the 'beep' to the media stream.

So you'll need to mute the AudioManager.STREAM_MUSIC

There's an enhancement request about it here

like image 169
brandall Avatar answered Oct 22 '22 08:10

brandall


Mute the beep by muting the notification sound:

(getSystemService(Context.AUDIO_SERVICE) as AudioManager).adjustStreamVolume(AudioManager.STREAM_NOTIFICATION, AudioManager.ADJUST_MUTE,0)

Make sure to unmute it after you start listening:

(getSystemService(Context.AUDIO_SERVICE) as AudioManager).adjustStreamVolume(AudioManager.STREAM_NOTIFICATION, AudioManager.ADJUST_UNMUTE,0)

Please note that there's a beep sound when the listening stops.

like image 31
Geeky bean Avatar answered Oct 22 '22 07:10

Geeky bean


The beep sound can be muted by using AudioManager

AudioManager mAudioManager =(AudioManager)getSystemService(Context.AUDIO_SERVICE);
mAudioManager.setStreamMute(AudioManager.STREAM_MUSIC, true);

To unmute sound

AudioManager mAudioManager =(AudioManager)getSystemService(Context.AUDIO_SERVICE);
mAudioManager.setStreamMute(AudioManager.STREAM_MUSIC, false);

Also add permission to Manifest.xml

<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
like image 35
Daniel X Avatar answered Oct 22 '22 09:10

Daniel X