Hi felix DEV ,
Thanks for reaching out on Microsoft Q and A.
To fix the 401 error, you need to use a Speech Service key, not a Cognitive Services key.
- Create a Speech Service resource in Azure.
- Use its key and endpoint in your API requests.
Example curl command:
curl -X POST -H 'Content-Type: application/json' -H "Ocp-Apim-Subscription-Key: your_speech_service_key" -d '{"locale":"en-us"}' https://<your-region>.api.cognitive.microsoft.com/speaker/verification/v2.0/text-independent/profiles
Replace <your-region>
and your_speech_service_key
with your Speech Service details.
Attribute and Reference:
For more information, you can refer to the StackOverflow post on the 401 Speaker Recognition Service issue.
If you find this solution helpful, please upvote and accept the answer to close the thread.
Hope this helps!