Skip to content

Live audio transcription using Google Cloud Speech-to-Text

Notifications You must be signed in to change notification settings

xantrix/transcriber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

transcriber

Authentication

  • Create a project with the Google Cloud Console, and enable the [Speech API][speech-api].
  • From the Cloud Console, create a service account, download its json credentials file, then set the GOOGLE_APPLICATION_CREDENTIALS environment variable:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json

Run realtime transcription

Get input device name

gst-device-monitor-1.0 Audio/Source

Live from mic

export TRANSCRIBER_DEVICE=alsa_input.usb-Sennheiser_Communications_Sennheiser_USB_headset-00.analog-mono

gst-launch-1.0 -v pulsesrc device=$TRANSCRIBER_DEVICE ! audioconvert ! audioresample ! audio/x-raw,channels=1,rate=16000 ! filesink location=/dev/stdout | go run transcriber.go

Pipe from Chrome

pacat -r -n "Chrome input" | gst-launch-1.0 -v fdsrc ! rawaudioparse ! audioconvert ! audioresample ! audio/x-raw,channels=1,rate=16000 ! filesink location=/dev/stdout | go run transcriber.go

Check log

tail -f out.log

About

Live audio transcription using Google Cloud Speech-to-Text

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages