Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.11 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.11 KB

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