Text Independent Speaker Identification REST API

Wilf, Alex 6 Reputation points
2020-10-27T15:45:14.397+00:00

Hello!
I'm following this tutorial, in the Speaker Identification portion of the REST API tab.

https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speaker-recognition?tabs=script&pivots=programming-language-curl

I've successfully created a text-independent identification profile

   curl --location --request POST 'INSERT_ENDPOINT_HERE/speaker/identification/v2.0/text-independent/profiles' \  
   \--header 'Ocp-Apim-Subscription-Key: INSERT_SUBSCRIPTION_KEY_HERE' \  
   \--header 'Content-Type: application/json' \  
   \--data-raw '{  
       '\''locale'\'':'\''en-us'\''  
   }'  

and gotten back a profile-id.

I have a 16bit, mono wav with 16khz sampling rate that is 29s long. When I run the command to enroll the profile id, I get this error:

   curl --location --request POST 'INSERT_ENDPOINT_HERE/speaker/identification/v2.0/text-independent/profiles/INSERT_PROFILE_ID_HERE/enrollments' \  
   \--header 'Ocp-Apim-Subscription-Key: INSERT_SUBSCRIPTION_KEY_HERE' \  
   \--header 'Content-Type: audio/wav' \  
   \--data-binary 'INSERT_FILE_PATH_HERE'  



   {"error":{"code":"InvalidRequest","message":"Invalid audio length. Minimum allowed length is 1 second(s)."}}  

I'm stuck. Could someone help me see where I went wrong? If there's something wrong with my wav format, would someone kindly share an example wav file I can use to test the rest of my process?

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,602 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,826 Reputation points
    2020-10-28T15:24:18.913+00:00

    @Wilf, Alex Thanks for the details: Please find the snapshots for enrollment and Identifying the single speaker using the REST API. You can port to the different languages for the REST API.
    Text Independent - Create Enrollment: 35699-image.png
    Text Independent - Identify Single Speaker:35811-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.