0
votes

I am developing a j2ee web app using servlet, jsp, hibernate. I want that first using Bing speech API my app should convert the speech to the text and on the basis of that text my app should take some action.

first i want to use Bing speech API to convert text to speech followed by LUIS API.

I am new to this API. I don't know how to implement.

There's no option to use this API with j2ee.

I want a complete tutorial on how to start implementing these APIs .

2

2 Answers

0
votes

Start learning APIs using curl. Once you have a working example in curl, you can implement in the target language. Here's an example of calling Bing STT using curl in Windows.

curl -k -X POST "https://api.cognitive.microsoft.com/sts/v1.0/issueToken" -H "Content-type: application/x-www-form-urlencoded" -H "Content-Length: 0" -H "Ocp-Apim-Subscription-Key: <your subscription id>" > Bearer.txt
set /p Bearer= < Bearer.txt
curl -k -X POST "https://speech.platform.bing.com/recognize?scenarios=smd&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&locale=en-US&device.os=wp7&version=3.0&format=json&instanceid=565D69FF-E928-4B7E-87DA-9A750B96D9E3&requestid=6d5fd9f7-a078-4b65-b385-afb2db3ee50c" -H "Authorization: Bearer %Bearer%" -H "Content-type: audio/wav; codec=\"audio/pcm\"; samplerate=16000" --data-binary @wb_male.wav > curlresultout.txt
jq -r ".header.name" < curlresultout.txt
0
votes

If you are looking for a REST implementation sample you can look at

https://github.com/Azure-Samples/Cognitive-Speech-STT-JavaScript