Azure-docs: Is JavaScript officially supported?

Created on 30 Jun 2018  Â·  13Comments  Â·  Source: MicrosoftDocs/azure-docs

The JavaScript SDK can be found at https://www.npmjs.com/package/microsoft-speech-browser-sdk and published by Microsoft. Is it officially supported? If yes, please add it to the list.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author cognitive-servicesvc doc-enhancement triaged

All 13 comments

@compulim Thanks for reporting! I have assigned the issue to the content author to investigate and update as appropriate.

One of the developers should take this one. I've let them know.

The JavaScript SDK is still supported. However it has a different API. We will update the JavaScript SDK to have API parity with the current speech SDK.

Is there sample code for continuous recognition with javascript?
The github sample code repository only has samples for one-shot recognition. Trying to replicate the continuous functionality available in C# samples results in errors from ts files (in Chrome debugger).

@zhouwangzw do you know when will it be updated? Is the updated version means the ZIP file in this article?

We are currently preparing sample code for the APIs.
basically, you can follow the steps to create a speech recognizer from the quickstart,

            reco = new SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);

then wire up handlers:

            reco.recognizing = function (s, e) {
                window.console.log(e);
            };

            // The event recognized signals that a final recognition result is received.
            // This is the final event that a phrase has been recognized.
            // For continuous recognition, you will get one recognized event for each phrase recognized.
            reco.recognized = function (s, e) {
                window.console.log(e);
            };

finally, start the recognizer:
// Starts recognition
reco.startContinuousRecognitionAsync();

hope that helps for the moment.

Will try it out.

But a SDK released in a ZIP file and not on NPM is not consumable in our production environment.

@fmegen: That helped a lot, thank you very much!

I was doing it this way, which was giving me no results:

...
          recognizer.startContinuousRecognitionAsync(
                    function (result) {
                        phraseDiv.innerHTML += result.text;
                        window.console.log(result);
                    },
                    function (err) {
                        phraseDiv.innerHTML += err;
                        window.console.log(err);
                    }) ;
...

@sfamini: The callbacks to the startContinousRecognitionAsync only report the success/failure of the start operation itself and do not report any results.
you need to register explicitly for the events in this scenario.

kind regards,
friedel

We will update the demo repository soon. Please checkout
https://github.com/Azure-Samples/cognitive-services-speech-sdk

@compulim i'm agree with you.
This newest SDK will be released also on NPM?

We are working on NPM but there is no confirmed date yet.

please-close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamesDLD picture JamesDLD  Â·  3Comments

bityob picture bityob  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments