currently I am creating an STT application using
- NodeJS v16.x
- microsoft-cognitiveservices-speech-sdk v1.17.0
I have created an azure Speech Cognitive resource in the region westeurope
and verified the key is correct.
Now I am using the following code to perform speech recognition:
class RecognizerAzure {
recognize(){
this.audioFormat = AudioStreamFormat.getWaveFormatPCM(sampleRate, 16, 1)
this.pushStream = AudioInputStream.createPushStream(this.audioFormat)
this.audioConfig = AudioConfig.fromStreamInput(this.pushStream)
this.speechConfig = SpeechConfig.fromSubscription(
'*************',
'westeurope'
)
this.speechConfig.speechRecognitionLanguage = "en_US"
this.recognizer = new SpeechRecognizerMicrosoftAzure(
this.speechConfig,
this.audioConfig
)
this.recognizer.startContinuousRecognitionAsync(() => {
if (this.recognizer) {
console.debug(inspect(this.recognizer))
this.recognizer.canceled = console.log
}
}, this.logger.warn)
}
the recognizer will then just log an event with the message Unable to contact server. StatusCode: 1006, undefined Reason: Unsupported type: object at: (shallow)
.
I have created a speech service according to the azure docs and implemented this code as defined in the sample implementation in Azure portal.
Sadly this error message is not very helpful to me nor am I able to find anything in the Azure KnowlegeBase.
Does anybody else have the same problem?