This sample shows how to integrate the Azure Speech service into a sample React application. This sample shows design pattern examples for authentication token exchange and management, as well as capturing audio from a microphone or file for speech-to-text conversions.
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
I have created a new speech service in east us region with Free tier.
Cloned the repo
Replaced the key and region in the env file
Ran the code using npm run dev
I am getting error from the issueToken API - It's giving 401 unauthorized error.
Any log messages given by the failure
{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}
Expected/desired behavior
It should provide the token
OS and Version?
Windows 10
Versions
Node - v18.0.0
Mention any other details that might be useful
I have double checked the keys and the region, it's the same at present in the azure portal. I have also tried the curl to get the token and still getting the same error. I am not sure if I am missing something or doing anything wrong.
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}
Expected/desired behavior
It should provide the token
OS and Version?
Windows 10
Versions
Node - v18.0.0
Mention any other details that might be useful
I have double checked the keys and the region, it's the same at present in the azure portal. I have also tried the curl to get the token and still getting the same error. I am not sure if I am missing something or doing anything wrong.
Curl Request - curl -v -X POST "https://eastus.api.cognitive.microsoft.com/sts/v1.0/issueToken" -H "Ocp-Apim-Subscription-Key:" -H "Content-type: application/x-www-form-urlencoded" -H "Content-Length: 0"