Ayush Agrawal
Ayush Agrawal

Reputation: 11

Microsoft speaker recognition api

In microsoft speaker recognition api what data we have to use for body parameter. There written as "binary data" . Does this imply that we have to convert audio file to binary data and then paste there.

enter image description here

Upvotes: 1

Views: 951

Answers (2)

rposbo
rposbo

Reputation: 327

The binary data needs to be a WAV file of a specific format:

  • Container: WAV
  • Encoding: PCM
  • Rate: 16K
  • Sample Format: 16 bit
  • Channels: Mono

You can check out a working example web page over here - I've used an altered copy of recorderjs (altered by reverse engineering the Speaker Recognition API examples page) to get the right bit rate and sample rate WAV:

https://rposbo.github.io/speaker-recognition-api/

You could potentially use the test console, since you can send base64 encoded audio data (as the official demo page does):

https://azure.microsoft.com/en-gb/services/cognitive-services/speaker-recognition/

Upvotes: 1

Mohamed Sherief
Mohamed Sherief

Reputation: 209

Currently, it's not possible to use this API testing console for posting application/octet-stream or application/form-data. I believe there's some work on this, and it should be available soon.

As an alternative, you can use PostMan or Fiddler. PostMan might be easier to use. Give it a try and let me know if you have a problem.

Upvotes: 1

Related Questions