- 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
gst-device-monitor-1.0 Audio/Source
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
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
tail -f out.log