speech_transcribe_sync_gcs.test.yaml 920 B

12345678910111213141516171819202122232425262728
  1. type: test/samples
  2. schema_version: 1
  3. test:
  4. suites:
  5. - name: Transcript Audio File (Cloud Storage)
  6. cases:
  7. # This sample should default to using gs://cloud-samples-data/speech/brooklyn_bridge.raw
  8. # with explicitly configured sample_rate_hertz and encoding
  9. - name: speech_transcribe_sync_gcs (no arguments)
  10. spec:
  11. - call:
  12. sample: speech_transcribe_sync_gcs
  13. - assert_contains:
  14. - literal: "how old is the Brooklyn Bridge"
  15. # Confirm that another file can be transcribed (use another .raw PCM file)
  16. - name: speech_transcribe_sync_gcs (--storage_uri)
  17. spec:
  18. - call:
  19. sample: speech_transcribe_sync_gcs
  20. params:
  21. storage_uri:
  22. literal: "gs://cloud-samples-data/speech/hello.raw"
  23. - assert_contains:
  24. - literal: "hello"
  25. - assert_not_contains:
  26. - literal: "how old is the Brooklyn Bridge"