Need help with variables and speech recognition

So I have a speech recognition dialplan that is designed to circumnavigate IVRs that request DTMF inputs. It is working well but I have a simple, yet challenging problem. So when the speech to text result comes in sometimes instead of a number like 1 it comes back as the word “one”
So my simple filter in the dialplan will not work.

same => n,Set(digit={FILTER(0123456789*,{GOOGLE_TRANSCRIPTION_RESULT})})

so I need to set these words to be recognized as numbers in my results from the google transcription.
I tried this:
same => n,Set(GLOBAL(one)=1)
but isn’t working.

You will need to tweak directly on the speech api, o replace word by numbers using some kind of regular expression rule,

Yes. You are going to need procedural code.

You seem to have a fundamental misunderstanding of what global variables are.

I had experienced something similar. For Google, you’ll want to look into the SpeechContext settings for the API. This may help you force the API to return digits v.s. words.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.