I'm using the Microsoft Project Oxford Speaker Recognition API REST, in order to create an enrollment I need to send a Binary Data of a .wav file. I already have the class that records and saves the .wav file, now I have to POST it, I just dunno how do I kinda "decode" the .wav file I have to that Binary Data that I want...
Appreciate any help.
Here's the link to what I'm trying to do: Speaker Recognition Create Enrollment.
In the documentation of the API, it is mentioned that the "body" of the request is the raw binary data for the *.wav file that you have recorded. This means you just need to send the file as is without any decoding.
Related
I have one .mp3 file and I have to convert it into .aac file format.I have made one android app and it will only use .aac files.I have seen many questions on stackoverflow based on this.But didn't get any right solution with code.
So please help with the coding part without using ffmpeg library.
I'm getting started with lwjgl and openal, so I want to be able to decode an ogg vorbis file and play it with openal. My question is: how can I decode an ogg file from java, get the frequency, pcm data, etc. and send it over to openal so I can play it? I found jorbis to do this, but it seemed just too difficult to use, and the tutorials online are kinda messy. I was thinking of something like alutLoadWavFromFile but for ogg(and java).
Thanks!
EDIT: Ok, I'll clarify my question. I want to decode an ogg file. And then send the data to openal. But the only part I don't know how to do is the decoding part.
VorbisJava does exactly this. There is a reasonable example in the tools directory.
https://github.com/Gagravarr/VorbisJava/blob/master/tools/src/main/java/org/gagravarr/vorbis/tools/VorbisCommentTool.java
VorbisFile vf = new VorbisFile(new File(inFile));
Also, Java Sound API has an extensible service provider model. You can add OggVorbis as a provider.
See How can I decode OGG vorbis data from a ByteBuffer?
I am currently building a recognition program with cmu sphinx. I would like to take the speech query that is converted to text by sphinx and store it as a data file (I was thinking either .txt file or .php [due to webserver using .php]). after the file is stored on the server, I already have the server taking the file, and giving me back the results I asked for (works perfectly). Just wanted some food for thought on how someone else would go about storing the text generated by sphinx, and what would be the most efficient file type (like I said I think .php would be the best filetype due to webserver, but if someone else has an opinion feel free to share). when the data is received (.xml format) I will have a synthesizer output the data from the webserver. I want the webserver to store past queries, and create a small offline server database. I also want the webserver to have multiple users queries stored.
thank you for your time. Look forward to any answers, or any food for thought. Cheers!
I'm currently working on a project to encrypt MP3 audio using JAVA and produce garbled sound from that encrypted MP3 file. So far, I can encrypt the whole MP3 file using DES encryption method. However, this encrypted file is not playable using MP3 player. I know that MP3 file has some structure (header and data, etc), but I have no idea to implement encryption on this file without breaking the whole MP3 structure.
How to make this encrypted MP3 file playable?
Some more info about parsing and mp3 stream in java: JavaLayer is an mp3 decoder that naturally implements stream processing mostly with javazoom.jl.decoder.Bitstream class. It will skip all tag data and give you raw bytes for each frame.
Another library that does some mp3 stream parsing is jaudiotagger, maybe you can scavenge some code from there too.
Both of these libraries are distributed under LGPL, so just be aware of licensing issues.
I need to convert mp4/flv files info mp3 in my Android application, but I don't know C/C++ and Android NDK. Do you know libraries/methods for easy converting on Java? Thank you for anyway.
Your question is how to extract audio from MP4/ FLV files and save as mp3 file. Right ?
Then, very sorry, Android SDK does not provide any API for transformating or track extraction.
Also using available media framework to achieve the same is also not trivial (and even if you do, you will lose portability).
What I would suggest is to use your MP4 & FLV Parser to extract audio track, do transcoding (if audio track is non-mp3), and save the transcoded (if audio track extracted is mp3, then extracted data) data.
Or you can port FFMPEG code base and use the same. This again may be overkill for your small task.
Suppose you just want to extract mp3 track from MP4, then you understand the native mp4 parser and use the APIs for extraction. You may have to replicate some code from stagefright / opencore.
Shash
it's probably irrelevant for you anymore but if some one still need a mp4 to mp3 parser here's an api that can do the job