3

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.

0gener
  • 135
  • 10
  • I've used Apache's HTTPComponent/Client API in the past, something like [this](http://stackoverflow.com/questions/20941708/upload-file-by-http-post/20941769#20941769) – MadProgrammer Mar 16 '16 at 22:00
  • Take a look at this question: http://stackoverflow.com/questions/2416935/how-to-play-wav-files-with-java . Just store the bytes in whatever format you want instead of writing them to a dataline. –  Mar 16 '16 at 22:03
  • 1
    Thanks for the reply, I'll continue trying based on your answers. – 0gener Mar 16 '16 at 22:11

1 Answers1

0

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.

Mido
  • 665
  • 10
  • 20