I have an audio file in WAV format. I suppose to decode the binary data encoded in the file. The data is encoded using Audio Frequency Shift-Keying (AFSK).
The technology is used for communication systems such asĀ garage door opener.
I am beginner in that, so I am not sure which library should I use to decode the file which is encoded using AFSK.
Is there any library available for Android?
You might want to try android-fskmodem or any other FSK library.
Related
Is there a file container that can store GSM-EFR speech data?
Just now I have such an file that contains a lot of RTP packages, the payload type of RTP package is GSM-EFR. I want to convert this file to a file that store the GSM-EFR data.
And then I need a audio player to decode the file and play the voice.
I have try the .amr file format,but encounter that .amr format can not distinguish the full rate and enhance full rate when they are both 12.2kbps.
I have try the ffmpeg, but this player can not decode GSM-EFR data.
So I need a file format and a audio player.Is there anyone can help me?
Thanks very much!
GSM-EFR is same like AMR mode 7. Try packet your RTP payloads to AMR storage file with amr header mode 7. And be carefully, because in RTP payload can be signature 4 bit (0xC) in beginning, if have, you need delete at beginning 4 bit befor packing to AMR file
I have a bytearray that holds an wav audio stream.
Is there a way on android system to convert the wav file to a flac file?
I found some example code from FlacEncoder library but this library assumes as far as I see the use of some audio classes from javax.
These are not available on android.
Is there some other library or some example code for android?
Thanks!
Somehow I'm creating the .wav file from the android device and storing it on my SD-card. Now I want to send that .wav file to a Java webservice.I need to do some processing on that .wav file in some java application. So what I need to do is send the wav file through webservice to my server where the java application is stored. So for that I need to know how to convert wave file to byte array without making any change in the wav file's quality?
I have done that with the .net as follows...
byte[] byteArrayFile = File.ReadAllBytes("D:/Projects/ConsoleApplication1/ConsoleApplication1/bhavik.wav");
But I'm new to android. Can anyone help me out?
thanx in advance
take a look at this useful library
http://commons.apache.org/io/
File f = new File
byte[] data = org.apache.commons.io.FileUtils.readFileToByteArray(f);
Check this question Convert wav audio format byte array to floating point
I would like to take the music files from my phone (mp3 mostly) and convert them to raw data that FFT can be done on. Is there anyway to do this by using the android/java framework or do I need to integrate something like LAME to decode the mp3?
Your going to need LAME to decode this to a file, you could have the Android system decode it for you but it would just go to the speakers unless you used kernel hacks to allow sending it direct to file.
I'm trying to use the AudioRecord class to record a WAV file. The problem is that it only supplies the raw PCM data, and if I write it to a file, there is no header information, so it will not play in any media player. How can I create a WAV file from this raw data?
Or alternatively, is there any other way to record sound in Android to a WAV file (or, alternatively MP3)?
Oh, and I know that MediaRecorder can'y be used because it doesn't support either WAV or MP3 formats.
OK, I've got this figured out. This post was crucial in helping me:
http://computermusicblog.com/blog/2008/08/29/reading-and-writing-wav-files-in-java
Basically, I used ByteArrayOutputStream to write the raw PCM data from AudioRecord, which then lets me get the byte array and its size when the process is done. I can then use that data in conjunction with the SampleRate, BitRate, and Stereo/Mono settings to create the WAV header as per the link above. The resulting file works perfectly!
Check the MediaRecorder.setOutputFormat(), you can set different container formats for your recording; there is MediaRecorder.OutputFormat.MPEG_4 and MediaRecorder.OutputFormat.THREE_GPP; the only allowed format along RAW is setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
Sorry but MP3 is not avail. You really need mp3 for recording?
WAV on the opposite of MP3 is a container, not a format; WAV can be any kind of encoding format.
You are always free to prepend some WAV RIFF header in front of your raw pcm data (as long as you exactly know the format). Check here for how it has to look like:
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
You may want to use mediarecord class