speech_transcribe_model_selection.test.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. type: test/samples
  2. schema_version: 1
  3. test:
  4. suites:
  5. - name: Selecting a Transcription Model (Local File)
  6. cases:
  7. # This sample should default to using hello.wav
  8. # and the phone_call model
  9. - name: speech_transcribe_model_selection (no arguments)
  10. spec:
  11. - call:
  12. sample: speech_transcribe_model_selection
  13. - assert_contains:
  14. - literal: "Hello"
  15. # Confirm that another file can be transcribed (use another .wav file)
  16. - name: speech_transcribe_model_selection (--local_file_path)
  17. spec:
  18. - call:
  19. sample: speech_transcribe_model_selection
  20. params:
  21. local_file_path:
  22. literal: "resources/commercial_mono.wav"
  23. - assert_contains:
  24. - literal: "Chrome"
  25. # Confirm that --model can be specified and the sample does not blow up
  26. #
  27. # Note: we are not using example audio files which result in deterministically
  28. # different results when using different models. so we simply test
  29. # that regular transcription continues to work.
  30. - name: speech_transcribe_model_selection (--model)
  31. spec:
  32. - call:
  33. sample: speech_transcribe_model_selection
  34. params:
  35. model:
  36. literal: video
  37. - assert_contains:
  38. - literal: "hello"
  39. # Confirm that --model is being passed through by providing an invalid model
  40. - name: speech_transcribe_model_selection (invalid --model)
  41. spec:
  42. - call_may_fail:
  43. sample: speech_transcribe_model_selection
  44. params:
  45. model:
  46. literal: I_DONT_EXIST
  47. - assert_contains:
  48. - literal: "Incorrect model specified"