Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.01 KB

README.md

File metadata and controls

29 lines (23 loc) · 1.01 KB

transcribe-live-audio

Transcribe live audio using Google Cloud Speech to Text API

The script provides a workaround for the 60s time limit restriction posed by Google Cloud Speech to Text API.

Solution Approach

The script stages the the audio/microphone input into a buffer before transcribing the "audio chunks" from the buffer using the API. That way, when the existing API client returns a time out error it is simply reinitialized and the new client will continue transcribing the audio from the buffer.

Solution Approach

To run the demo

Do not forget to configure environment variable GOOGLE_APPLICATION_CREDENTIALS with the GCP credentails JSON file path
export GOOGLE_APPLICATION_CREDENTIALS='/path/to/credentials.json'
Install dependencies
npm install 
Show help
node transcribe.js -h

Example

node transcribe.js -e LINEAR16 -r 16000 -l hi-IN