I am working on an application. Here I want to read various sounds using Android Application. I know how to record in Android. Now what I want to do is to read a sound and based on its frequency I want to display it on Android Screen. So how can I read the frequency in Hz or KHz?
You will need to perform a discrete Fourier transform on your recorded audio samples. You can write code yourself or use a library for it. Unfortunately I have no idea which FFT libraries exist for Java, but I am sure you can google that. I found two in 2 minutes:
http://www.ee.ucl.ac.uk/~mflanaga/java/FourierTransform.html
https://sites.google.com/site/piotrwendykier/software/jtransforms
Related
I'm writing an android app that plays an audio file and records what the phone is outputting simultaneously. When the recording is done, it would compare the recording against the original audio played and return whether they match and to what certainty.
I searched a lot and I found some libraries for audio fingerprinting, but they're mostly for music identification purposes.
Is there any libraries out there that I could use for this purpose? Would it make sense to write a custom algorithm for this?
You could compare the sound waves sample to sample (as numbers), then compute maximal, minimal, average difference, etc..
I am developing Recording App that includes Pause/Play option.
I tried with both Media Recorder and AudioRecord
In case of AudioRecord , the recorded audio consumes larger size, so if the recording size increases say for eg: if i record 1 min audio it consumes 40 to 50MB an it really paining to combine by converting it to .raw file and send to php server.
So i tried with Media Recorder, it consumes less size,but not able to combine using the previous way handled in Audio Record.
Next step i tried with Android NDK- really paining for even Set up process.
Now my question is that which is the best way to combine recorded audio files
Using Android NDk
Reading the byte data from Audio and combining -If i use this there is problem with Headers of Recording format say amr,wav like that.
Also if i try with this , i am not able to get javax.sound package , So i tried with Plugins but no luck..
Please Suggest best way to do this. Also i tried with all this following links
Audio Link 1
Audio Link 2
Audio Link 3
Audio Link 4
Provide me Good tutorial or samples or links.Thanks.
For something like this your best bet would be to develop native C++ code using the NDK.
I want to develop an android app that takes in the audio signal and generates the time and frequency domain values.
I have the audio in a buffer which is obtained from the android MIC. I want to use this buffer values to generate a frequency domain graph. Is there some code that would help me find the FFT of an audio signal??
I have seen Moonblink's Audalyzer code and there are some missing components in the code. I could find lots of missing modules. I want to find a better logic that would take in audio and perform some calculations on it.
I found these for you using duckduckgo:
Android audio FFT to retrieve specific frequency magnitude using audiorecord
http://www.digiphd.com/android-java-reconstruction-fast-fourier-transform-real-signal-libgdx-fft/
This should help
I want to develop a bass effect for media player.Can any body help me regarding this..
First step is to isolate the low-frequency components. You will need an FFT to do this... there's one linked to this older S/O question.
After you've got the frequency representation of your audio data, alter the magnitudes of the low-frequency components as you see it, run the inverse transform to convert it back to audio samples, and pass it to the audio hardware for playback.
is there a way to filter audio in android system?
I am interested to get only the audio of a fixed frequency.
If you get your audio via the AudioRecord class, then you'll have raw audio data that you could filter using whatever audio filter algorithm you have. Or are you looking for an audio filtering library?
As Dave says, the AudioRecord class is the easiest way. Often times, I will extend an AsyncTask that implements AudioRecord to read the audio buffer and push the buffer back to the UI thread for visualization (if needed).
Regarding the filtering of the audio, Android does not provide any built-in way of doing this. The way you would filter out certain frequencies is by taking the Fourier Transform of the sampled audio and then pulling out the frequencies of interest.
If you want more details on filtering, you should probably post a new SO question or wiki the Fast Fourier Transform (FFT). You might also look into JTransforms which is a great open source FFT library that runs wonderfully on Android.
Please do NOT use the FFT for this. That's amateur hour. (The FFT is a great tool with many great use-cases, but this is not one of them.) You most likely want to solve this problem using time domain filters. Here's a post to get you started writing your own filters in the time domain as easy as can be. However, a lot of people stumble on that since it's a bit specialized, so if you want to use something built-in to android, start with the equalizer audio effect.