Live Demo:
Should work even in smartphones. Tested with Firefox and Google Chrome. Safari doesn't seem to handle the microphone permissions very well though.
This example connects directly from your browser to the IBM Watson Cloud Speech to Text service and shows its output with Scarlett's WebGL Framework (MSDF) BMFont Text Rendering.
- Install NodeJS (10.x or higher)
- Fork and clone the repo
- Install Yarn globally with
$ npm i -g yarn
or download it at their website $ yarn
in the repo directory to install dependencies$ yarn build
to bundle code$ yarn start
to run express server- Open localhost:5000 in the browser
If you want to test IBM Watson's Speech to Text service, you'll need some additional steps:
-
Create an account over https://www.ibm.com/watson/developer/ and generate credentials to Speech to Text service
-
Create a
.env
file within the project folder and add the credentials throughSPEECH_TO_TEXT_API_KEY
andSPEECH_TO_TEXT_URL
variables.Alternatively, you can go to
server.js
lines25
and45
and replace the values accordingly. -
$ yarn start
to run express server -
Open localhost:5000 in the browser
-
Clicking
Activate
button (when enabled) should now ask for your permission to use the microphone and render the output accordingly
- The animation effect is based on this repo by Mattdesl.