Reputation: 31
I am running Language Detection Cognitive Service API locally(by using below command).
docker run --rm -it -p 5003:5003 --memory 1g --cpus 1 mcr.microsoft.com/azure-cognitive-services/speechservices/language-detection Eula=accept Billing=https://.api.cognitive.microsoft.com/sts/v1.0/issuetoken ApiKey=*** HTTP_PROXY=********
Issue: Getting 404 when i am hitting through Postman
Note: My cognitive service region is westeurope and Pricing tier F0
Please let me know right way to test locally running congnitive api
Upvotes: 0
Views: 584
Reputation: 14619
docker run --rm -it -p 5003:5003 --memory 1g --cpus 1 mcr.microsoft.com/azure-cognitive-services/speechservices/language-detection Eula=accept Billing=https://.api.cognitive.microsoft.com/sts/v1.0/issuetoken ApiKey=*** HTTP_PROXY=********
In your case, your Billing
value is incorrect: you have set https://.api.cognitive.microsoft.com/sts/v1.0/issuetoken
but you should use your Endpoint URI which is visible on your Azure resource Overview page, see below for my resource:
This is well described in the official documentation (see here)
Then, with your postman, you should call your local instance. In your capture, you are calling the API on Microsoft side (https://westeurope...). You should use http://localhost:5003/speech/languagedetection/cognitiveservices/v1 as visible in the swagger capture you posted
Upvotes: 0
Reputation: 1
@SanK, are you trying to do Speech Language Detection or TextAnalytics Language Detection? Because that is two different features, make sure your subscription register with the correct one.
Speech Language Detection - Detect the language from Speech. TextAnalytics Language Detection - Detect the language from Text.
Upvotes: 0