question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

reuse sdk.AudioInputStream.createPushStream() with same data gives another recognizer.recognizeOnceAsync result

See original GitHub issue

I used the provided node.js sample to experiment. When I want to reuse/loop my code, the recognize results are wrong. The first loop the result is ok, but the next loops the results are all wrong. I problem seems to be the way I reuse/rebuild pushStream variable. I expect 5 times the same results, when I read 5 times the same WAV file and do 5 times the recognition.

`function loop() { // create the push stream we need for the speech sdk. var pushStream = undefined; pushStream = sdk.AudioInputStream.createPushStream();

// open the file and push it to the push stream. fs.createReadStream(filename).on(‘data’, function (arrayBuffer) { pushStream.write(arrayBuffer.buffer); }).on(‘end’, function () { pushStream.close(); analyse(pushStream); // Rest of sample code where recognition is done. When done, loop() is called again. }); }`

Expected behavior I try to reset all variables, so I expect the recognition result is always the same.

Version of the Cognitive Services Speech SDK 1.2.0

Platform, Operationg System, and Programming Language Node.js

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rhureycommented, Jul 23, 2019

Can you make sure it’s not the same issue as this: https://github.com/microsoft/cognitive-services-speech-sdk-js/issues/73

The sample had a bug in it with how the buffer was being passed…

0reactions
julis903commented, Jul 24, 2019

It is the same, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to recognize speech - Azure
In this how-to guide, you learn how to recognize and transcribe speech to text in real-time. Create a speech configuration. To call the...
Read more >
microsoft-cognitiveservices-speech-sdk Code Examples
var pushStream = sdk.AudioInputStream.createPushStream(); // open the file and push it to the push stream. fs.createReadStream(filename).on('data ...
Read more >
Microsoft Speech Linux PDF
This service is powered by the same recognition technology that Microsoft uses ... the Stream interface to the Speech SDK, either through AudioInputStream....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found