question

MaddipatlaPhaniKrishna-1563 avatar image
0 Votes"
MaddipatlaPhaniKrishna-1563 asked GiftA-MSFT commented

issues integrating SpeechRecognizer as part of cognitive services speech-to-text voice SDK with React webchat targeting bot framework v4

we are facing issues integrating SpeechRecognizer as part of cognitive services speech-to-text voice SDK that works well with website but throws exceptions when used with React webchat

Error: throwIfNullOrUndefined: region

Attached is the error and SDK file used in minified form

[10782-searchminjs.txt][2] [2]: /answers/storage/attachments/10782-searchminjs.txt
10689-region-error-microsoftticket.jpg


azure-cognitive-servicesazure-speechazure-bot-service
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

import { SpeechRecognizer } from './speechsearch.js';
let speechText='';
const speechRecognizer = new SpeechRecognizer();
speechRecognizer.initialize();
speechRecognizer
.Recognize(selectedLanguage, (s, res) => {
if (res) {
speechText = res.result;
console.log('speech sdk result: ', speechText);
}
})
.then((result) => {
speechText = result;
if (speechText) {
console.log('speech sdk result: ', speechText);
}
else {
throw result;
}
});

0 Votes 0 ·

Hi, thanks for reaching out. Based on the error, it seems as though the incorrect region or key was provided. Can you try verifying those authentication credentials work as expected using the Azure Speech REST API? Otherwise, can you share the sample document you are following so we can understand your scenario better? Thanks.


0 Votes 0 ·

Hi, following up on the above response and to inquire on whether this issue persists.

0 Votes 0 ·

0 Answers