felixjunghans / google_speech

Flutter google spech
MIT License
69 stars 42 forks source link

Missing exceptions for cloud speech errors #16

Open MarkMarcel opened 3 years ago

MarkMarcel commented 3 years ago

Describe the bug In order to use model adaptation and model adaptation boost features, I passed an array of strings to speechContext in recognitionConfig. However, the length exceeded the limit of phrases found here. Recognition did not work and the package didn't raise an exception.

To Reproduce Steps to reproduce the behavior:

  1. Initialise RecognitionConfig with speechContext
  2. Provide speechContext object with a list exceeding 5,000 phrases
  3. Create StreamRecognitionConfig passing in previously instantiated RecognitionConfig
  4. Call speechToText.streamRecognize with the configs
  5. No transcription received

Expected behavior An exception to indicate API limits that have been exceeded

Smartphone (please complete the following information):

MarkMarcel commented 3 years ago

SpeechContext is missing model adaption boost parameters as well

felixjunghans commented 3 years ago

Thanks for your feedback. I will take it into account in the next update.

The boost parameter should be present in the latest version. However, only in SpeechConfigBeta.