Hi
Did you obtain an API key for Bing Speech and if so, respected the limits of the free key
Yes, I have the API key. The Vision API is working and I can detect images and do the OCR to text etc... however it is just the Speech portion which is not working.
It's unclear why the Microsoft service refuses connection.
Yes. I tested with the Demo that came with the TMS FMX CloudPack.
I see on the Bing forum some folks saying needing to send in your email and changing the headers ( Ocp-Apim-Subscription-Key) to add in a specific format. I am not sure in which property I should set them in the component.
See http://stackoverflow.com/questions/30085058/client-id-for-project-oxford-speech-api
Specifically :
curl -v -X POST "api.projectoxford.ai/speech/v0/internalIssueToken"; -H "Content-Type: application/x-www-form-urlencoded" -H "Ocp-Apim-Subscription-Key: <Your primary subscription key> --data-ascii "grant_type=client_credentials&client_id=<your client ID generated from Azure>&client_secret=<your primary subscription key>&scope=speech.platform.bing.com";
Hi,
Can you please make sure you are using a valid API Key?
As indicated here:
Yes, I have used the correct API key.
// url := 'https://oxford-speech.cloudapp.net/token/issueToken';
url := 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken';
AddHeader(headers, 'Content-Type', 'application/x-www-form-urlencoded');
AddHeader(headers, 'Content-Length', '0');
AddHeader(headers, 'Ocp-Apim-Subscription-Key', UrlEncode(App.Key));
FData := '';
lf := '&';
// FData :=
// 'client_id=' + UrlEncode(App.Key) + lf
// + 'client_secret=' + UrlEncode(App.Key) + lf
// + 'grant_type=client_credentials' + lf
// + 'scope=' + ScopeParamText(',', true);
HttpsPost(ExtractServer(url), RemoveServer(url), headers, AnsiString(FData), resdat);
resdat := CleanUpJSON(resdat);
jv := TJSONObject.ParseJSONValue(string(resdat));
} [5 bytes data]
> POST /sts/v1.0/issueToken HTTP/1.1
> Host: api.cognitive.microsoft.com
> User-Agent: curl/7.50.1
> Accept: */*
> Content-type: application/json
> Content-Length: 0
> Ocp-Apim-Subscription-Key: [my api key]
>
{ [5 bytes data]
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Length: 495
< Content-Type: application/jwt; charset=us-ascii
< Expires: -1
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< apim-request-id: 2e45fdd1-0bc5-44ff-a469-1189fbd954c5
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< Date: Mon, 21 Nov 2016 16:21:11 GMT
<
{ [495 bytes data]
100 495 100 495 0 0 1092 0 --:--:-- --:--:-- --:--:-- 1581eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6Imh0dHBzOi8vc3BlZWNoLnBsYXRmb3JtLmJpbmcuY29tIiwic3Vic2NyaXB0aW9uLWlkIjoiODE4OGM2Y2VlMTZjNDM2MGJlOTA5MGJlY2ExYzMxYzciLCJwcm9kdWN0LWlkIjoiQmluZy5TcGVlY2guUHJldmlldyIsImNvZ25pdGl2ZS1zZXJ2aWNlcy1lbmRwb2ludCI6Imh0dHBzOi8vYXBpLmNvZ25pdGl2ZS5taWNyb3NvZnQuY29tL2ludGVybmFsL3YxLjAvIiwiYXp1cmUtcmVzb3VyY2UtaWQiOiIiLCJpc3MiOiJ1cm46bXMuY29nbml0aXZlc2VydmljZXMiLCJhdWQiOiJ1cm46bXMuc3BlZWNoIiwiZXhwIjoxNDc5NzQ1ODcyfQ.pPtYmOqwjSi7m_aExtGJfyGhcQOm0_dRGr-QxtfszFw
* Connection #0 to host api.cognitive.microsoft.com left intact
Your remarks are correct.
The authentication URL for the API has changed and the previous URL is not compatible with newly created API keys.
Thanks.. if possible can I have the patch via email before the release of the update as I am working on a project at the moment.
Thanks
You can request an incremental source update by sending an email to mailto:help@tmssoftware.com
Hi Bart
Good to hear it's OK now!
Thank you for notifying.