Skip to content

Recognition Client Closes after a certain amount of time and/or hangup #6

@adrianhumphrey111

Description

@adrianhumphrey111

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions