-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Hello, I am testing out the voice-demo and everything works as expected. The only problem is, inside of the "pipeFromAsterisk" function, at some point after the first call, the audiosocket container gets stuck in the loop and continuously prints out "recognition client closed". I am would like to know if this was the intended behavior or not.
What I observed is there is a MaxCallTimeout of two minutes, however, the context that the speech recognition client is created with is the background context? This is the parent context of the audiosocket, however it is passed all the way down to the Handle Function that creates a child context from the parent. The child context is the context with the MaxRecognitionDuration Timeout and this is the context used to create the recognition stream. At one minute, the "recognition client closed" is printed, however, If I hang up the phone and call right back, I get an infinite loop of "recognition client closed" being printed to the console and getting nothing to or from Google for the speech.
Is there a fix to this behavior to all ways have a new stream on every new call?