I'm trying to make an application that'll react when a sharp and loud sound will be heard in my tablets microphone.
What I want to know is if it's possible to trigger such an event and is it possible to set some sort of threshold for the sound level of the input.
Thanks
Check these links out:
StackOverflow answer.
Which leads to this NoiseAlert source code.
But its just a matter of listening on the microphone then triggering your event when sound levels are high enough.
Related
So using openvidu to setup two way calling but I noticed an issue when it’s being used on an android device.
The android phone has multiple volume controls, one of them is the media volume, so if the user watching as a subscriber has their media volume low they can’t hear the publisher speaking until they turn it up, and a few people don’t even know this exists.
By default the volume up hardware button seems to control the phone volume, or rather it seems to control the last one that was used.
It’s a little concerning that many people won’t know about this and will complain they can’t hear anything, unlike on the iPhone where the one button controls the overall volume.
I doubt this is possible but are we able to increase the android media volume
With JavaScript somehow? I very much doubt it but I’m not sure how to solve this problem if we can’t. I know we can control the video element volume itself but that seems to have no impact on the phone volume itself. As in I can turn the phone media volume all the way up but control the video element separate instead of them working together.
In my current project I have an Audio file which plays all the time. As soon as I click the record button the audio stops. When I disable the microphone it works but I actually want to record my own voice (like a karaoke) This Problem only occurs only on Android.
Is there any hack to fix this Problem?
Just worked on a filter where I had to build a karaoke style gameplay, what I noticed was Spark does not like playing audio AND recording on mic as it probably causes weird artifacting if not implemented properly. It seems like something that will be added line.
Possible fixes to get your filter working for now, add instructions to use the filter with headphones, connecting to an external audio device will let you play audio and record using the mic at the same time. This works on android, not on iOS. You have to give players visual cues to sing along or whatever your objective maybe.
Hope this is sorted out and fixed in the coming updates, really handicaps the kind of experiences possible on the platform.
Hope this helped.
Is there a way to increase/decrease the input volume of the Android microphone. I did some research on Google as well as StackOverflow but didn't find a suitable answer.
Here are some links:
How to adjust microphone volume in android?
Adjust Microphone Recording Volume
Is Android capable of managing microphone/input volume?.
Please provide any help/reference.
I had a certain problem where I had to increase the volume (gain) of the sound and also filter out some frequencies I used TarsosDSP library for android it has a particular class called GainProcessor where you can adjust the sound accordingly. Hope it helps.
I have an Android app that is used to play audio via the phone's speaker continuously, including when other apps are in the foreground, or the screen is off.
There is however a problem with that app in that the audio it plays can trigger the "OK Google" hotword detection, which leads to a bit of an endless loop, since the app also rewinds a few seconds upon being paused.
Thus there is no choice for the user but to disable the hotword detection entirely and permanently. That is not optimal.
Is there an API call that the app can use to disable the hotword detection temporarily while it is playing audio?
Hotword detection disabled with accessibly service :
To prevent false positives, hotword detection is disabled when a spoken feedback service is enabled.
You have defined your service as providing all possible types of
feedback, which includes spoken.
A dirty trick could be to keep the microphone busy while playing your audio stream.
You can lock the microphone using an AudioRecord (or a MediaRecorder) and then release it when you are done.
Please take a look at the android:accessibilityFeedbackType. http://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo.html#attr_android:accessibilityFeedbackType
I believe that by changing option of the feedbackSpoken will give you what you want. Haven't really used this feature, but its worth exploring..
You can try even android:accessibilityFeedbackType="feedbackAllMask"
All the best and good luck
I've searched everywhere, including the RootTools source. I can't find anything that manages the microphone, apart from muting it altogether. And there are no hints inside the AudioRecorder.setMicrophoneMute(bool) method either...
There are a few posts about this issue, but none of them ever go anywhere (through no fault of OPs'). Is it (legally) possible to override the OS and get to the mic hardware directly or something?
Thanks,
-tre
You can't directly set the recording volume, but you can change what you do with the byte data you get from AudioRecord (look at the AudioTrack class for reducing the volume of the track)
Edit: I forgot to mention that if you're having trouble with volume spikes you can look at automatic gain control. Some devices activate it automatically, but you can manually enable it.
On occasion, I get a phone or tablet with poorly chosen microphone input volume. Android 4 had it adjustable but not the newer versions. It makes it impossible to use VOIP. It's not just for fancy audio recordings.