speech/

directory
v0.0.0-...-36feec3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2018 License: Apache-2.0

README

Cloud Speech API Go samples

This directory contains Cloud Speech API Go samples and utilities.

Samples

Caption

The caption command sends audio data to the Google Speech API and prints its transcript. It returns recognized text for short audio (less than ~1 minute). For long audio, see the Caption Async example.

For more details, see the Synchronous Speech Recognition tutorial in the docs.

Go Code

Caption Async

The captionasync command sends audio data to the Google Speech API and prints its transcript. It uses the Asynchronous Speech Recognition to process audio that is longer than a minute and is stored in the Google Cloud Storage. For shorter audio, including audio stored locally (inline), Synchronous Speech Recognition is faster and simpler.

For more details, see the Asynchronous Speech Recognition tutorial in the docs.

Go Code

Live Caption

The livecaption command pipes the stdin audio data to Google Speech API and outputs the transcript. It uses Streaming Speech Recognition to process the stdin audio data and returns results in real time as the audio is processed.

Please note that the audio size limit for a single request is 1 minute. For periods longer than that, audio must be sent at a rate that approximates real time. Refer to the Limits page on the documentation for more details.

For more details, see the Streaming Speech Recognition tutorial in the docs.

Go Code

Word Offset

The wordoffset command sends audio data to the Google Speech API and prints the transcript along with word offset (timestamp) information.

For more details, see the Time Offsets (Timestamps) tutorial in the docs.

Go Code

Directories

Path Synopsis
Command caption sends audio data to the Google Speech API and prints its transcript.
Command caption sends audio data to the Google Speech API and prints its transcript.
Command captionasync sends audio data to the Google Speech API and prints its transcript.
Command captionasync sends audio data to the Google Speech API and prints its transcript.
Command livecaption pipes the stdin audio data to Google Speech API and outputs the transcript.
Command livecaption pipes the stdin audio data to Google Speech API and outputs the transcript.
[START speech_quickstart] Sample speech-quickstart uses the Google Cloud Speech API to transcribe audio.
[START speech_quickstart] Sample speech-quickstart uses the Google Cloud Speech API to transcribe audio.
Command wordoffset sends audio data to the Google Speech API and prints word offset information.
Command wordoffset sends audio data to the Google Speech API and prints word offset information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL