type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto schema_version: 1.2.0 samples: - region_tag: speech_quickstart_beta title: Quickstart Beta description: Performs synchronous speech recognition on an audio file rpc: Recognize service: google.cloud.speech.v1p1beta1.Speech request: - field: audio.uri value: "gs://cloud-samples-data/speech/brooklyn_bridge.mp3" input_parameter: storage_uri comment: URI for audio file in Cloud Storage, e.g. gs://[BUCKET]/[FILE] - field: config.language_code value: "en-US" comment: The language of the supplied audio - field: config.sample_rate_hertz value: 44100 comment: Sample rate in Hertz of the audio data sent - field: config.encoding value: MP3 comment: | Encoding of audio data sent. This sample sets this explicitly. This field is optional for FLAC and WAV audio formats. response: - loop: variable: result collection: $resp.results body: - comment: - First alternative is the most probable result - define: alternative = result.alternatives[0] - print: - "Transcript: %s" - alternative.transcript