I have set up a synchronous recognition script in Python that is working as expected to return the transcript of various audio files that I send to the Google Speech API. However, I can't seem to get the speech context hints (speech_contexts in Python; "phrase hints / speechContext" in Google documentation) to do anything useful. I have an audio file where the speaker is clearly saying the word "health", but it is getting transcribed as "house" every time, and despite explicitly telling it to look for the word "health" as seen in the code below, it does not find it. Any advice for getting this feature to be effective?
config = types.RecognitionConfig(
encoding=enums.RecognitionConfig.AudioEncoding.LINEAR16,
language_code='en-US',
speech_contexts=[speech.types.SpeechContext(
phrases=['health'])]
)
Thanks!