type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto
schema_version: 1.2.0
samples:
- region_tag: speech_transcribe_auto_punctuation_beta
  title: Getting punctuation in results (Local File) (Beta)
  description: Transcribe a short audio file with punctuation
  rpc: Recognize
  service: google.cloud.speech.v1p1beta1.Speech
  request:
  - field: audio.content
    value: "resources/commercial_mono.wav"
    input_parameter: local_file_path
    comment: Path to local audio file, e.g. /path/audio.wav
    value_is_file: true
  - field: config.enable_automatic_punctuation
    value: true
    comment: |
      When enabled, trascription results may include punctuation
      (available for select languages).
  - field: config.language_code
    value: "en-US"
    comment: |
      The language of the supplied audio. Even though additional languages are
      provided by alternative_language_codes, a primary language is still required.
  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
