A Playground for Cross Device Live Speech Recognition with node.js, express and socket.io.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fixed small bug with buttons. Added recording indicator and sentence … Nov 16, 2018
.gitignore updated to gcs 2.1.1 Oct 11, 2018
LICENSE Initial commit Jan 24, 2018
README.md Added troubleshooting tip Dec 4, 2018
example.gif Updated readme + gif name Feb 19, 2018

README.md

Google Cloud Speech Node with Socket Playground

An easy-to-set-up playground for cross device real-time Google Speech Recognition with a Node server and socket.io.

Yo this is a test

Run Local

  1. get a free test key from Google
  2. place it into the src folder and update the path in the .env file
  3. open the terminal and go to the src folder
  4. run npm install
  5. run node app.js or with nodemon: nodemon app
  6. go to http://127.0.0.1:1337/

Run on Server

Same as run local 1-4.

  1. config the .env Port for a port that you've opened on the server. I'm using 1337 here, too.
  2. go to your server adress

I recommend using pm2 or something similar, to keep the process running even when closing the terminal connection.

Made by Vinzenz Aubry

How Does the Client Process the Stream?

Google Cloud sends intermittent responses to the uploaded audio stream. Each response from Google Cloud contains the current estimation of the full sentence for the streamed audio.

When Google Cloud senses that the audio has reached an end of sentence, it will issue a response with an isFinal flag set to true. Once this flag is issued, the client will finalize the sentence and write it to the document.

This process is repeated until the user ends the recording.

Interim Natural Language Processing

The client application highlights different parts of speech, such as nouns and verbs, by using this natural language processing library.

Socket Connection

The client communicates with the server using Socket.io.

Troubleshooting

  • If you have delays in calls, check if IPV6 is disabled on your server