@Sayan Dey Could you please confirm if you have registered for Speaker Recognition access as described at https://learn.microsoft.com/en-us/legal/cognitive-services/speech-service/speaker-recognition/limited-access-speaker-recognition ? Awaiting your reply.
Azure speech service SDK is not working for Javascript
Sayan Dey
0
Reputation points
I am trying to run the code for finding the Activation Phrases for my Speaker Recognition in Text Independent Identification, but got this error below. This same error also happens when I tried to run Continuous Recognition.
Error : Unable to contact server. StatusCode: 1006, undefined Reason: Unexpected server response: 200
const fs = require("fs");
const SpeechSDK = require("microsoft-cognitiveservices-speech-sdk");
const subscriptionKey = 'MY_SPECIAL_KEY';
const region = 'eastus';
const locale = 'en-US'
const speechConfig = SpeechSDK.SpeechConfig.fromSubscription(
subscriptionKey,
region
);
speechConfig.setProperty(
SpeechSDK.PropertyId.SpeechServiceConnection_TranslationVoice,
locale
);
const getActivationPhrases = async () => {
const voiceProfClient = new SpeechSDK.VoiceProfileClient(speechConfig);
try {
let result = await voiceProfClient.getActivationPhrasesAsync(
SpeechSDK.VoiceProfileType.TextIndependentIdentification,
locale
);
if (result.phrases.length > 0) {
for (let phrase of result.phrases)
console.log(phrase)
}
} catch (err) {
console.log(err);
console.log(`Error : ${err}`)
}
}
1 answer
Sort by: Most helpful
-
navba-MSFT 17,360 Reputation points Microsoft Employee
2024-03-25T04:10:49.58+00:00