Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Getting Started with Google Cloud Speech API and the Google Cloud Client libraries

Google Cloud Speech API enables easy integration of Google speech recognition technologies into developer applications.

These sample Java applications demonstrate how to access the Cloud Speech API using the Google Cloud Client Library for Java.

Quickstart

Install Maven.

Build your project with:

mvn clean package -DskipTests

You can then run a given ClassName via:

mvn exec:java -Dexec.mainClass=com.example.speech.ClassName

Transcribe a local audio file (using the quickstart sample)

mvn exec:java -Dexec.mainClass=com.example.speech.QuickstartSample

Transcribe a local audio file (using the recognize sample)

    mvn exec:java -Dexec.mainClass=com.example.speech.Recognize \
    -Dexec.args="syncrecognize ./resources/audio.raw"

Asynchronously transcribe a local audio file (using the recognize sample)

    mvn exec:java -Dexec.mainClass=com.example.speech.Recognize \
    -Dexec.args="asyncrecognize ./resources/audio.raw"

Transcribe a remote audio file (using the recognize sample)

    mvn exec:java -Dexec.mainClass=com.example.speech.Recognize \
    -Dexec.args="syncrecognize 'gs://cloud-samples-tests/speech/brooklyn.flac'"

Asynchronously transcribe a remote audio file (using the recognize sample)

    mvn exec:java -Dexec.mainClass=com.example.speech.Recognize \
    -Dexec.args="asyncrecognize 'gs://cloud-samples-tests/speech/vr.flac'"