Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 2.54 KB

File metadata and controls

40 lines (29 loc) · 2.54 KB

JavaScript Speech Recongition and Translation Sample for the Web Browser

This sample demonstrates how to recognize speech with the Speech SDK for JavaScript on a web browser, like Microsoft Edge, or Chrome. See this article for introductory information on the Speech SDK for JavaScript.

Prerequisites

Build the sample

If you want to host the sample on a web server:

  • Edit the token.php source:
    • Replace the string YourServiceRegion with the service region of your subscription. For example, replace with westus if you are using the 30-day free trial subscription.
    • Replace the string YourSubscriptionKey with your own subscription key.
  • Edit the index.html source:
    • Replace the value for the variable authorizationEndpoint with the full URL where you can access the token.php resource.
  • Deploy all files to your web server.

Run the sample

  • In case you are running the sample from your local computer, open index.html from the location where you have downloaded this sample with a JavaScript capable browser. Use the input fields to set your subscription key and service region.
  • In case you are hosting the sample on a web server, open a web browser and navigate to the full URL where you host the sample.

References