Disable noise cancellation for microphone in Android (1.5)?

Noise filters in audio recording sources on Android vary greatly from device to device. It isn’t until Ice Cream Sandwich that any sort of definition was put into the device compatibility document defining a method for not having filtering. That method id to use the MediaRecorder.AudioSource.VOICE_RECOGNITION audio source. Before that it’s just choose a setting … Read more

Converting WAV to any compressed audio format in client-side JavaScript

I’ve made an audio recorder that records to mp3 directly from the browser combining RecorderJS and libmp3lame.js You can find the gitHub project here: https://github.com/nusofthq/Recordmp3js and a more detailed explanation of the implementation: http://nusofthq.com/blog/recording-mp3-using-only-html5-and-javascript-recordmp3-js/

get duration of audio file

MediaMetadataRetriever is a lightweight and efficient way to do this. MediaPlayer is too heavy and could arise performance issue in high performance environment like scrolling, paging, listing, etc. Furthermore, Error (100,0) could happen on MediaPlayer since it’s a heavy and sometimes restart needs to be done again and again. Uri uri = Uri.parse(pathStr); MediaMetadataRetriever mmr … Read more

Android AudioRecord vs. MediaRecorder for recording audio

If you want to do your analysis while recording is still in progress, you need to use AudioRecord, as MediaRecorder automatically records into a file. AudioRecord has the disadvantage, that after calling startRecording() you need to poll the data yourself from the AudioRecord instance. Also, you must read and process the data fast enough such … Read more

Detect & Record Audio in Python

As a follow up to Nick Fortescue’s answer, here’s a more complete example of how to record from the microphone and process the resulting data: from sys import byteorder from array import array from struct import pack import pyaudio import wave THRESHOLD = 500 CHUNK_SIZE = 1024 FORMAT = pyaudio.paInt16 RATE = 44100 def is_silent(snd_data): … Read more

tech