Vosk speech enhancement

Hi, we are using asterisk for education, we are using Vosk for speech synthesis.

At present we need to press * key to get vosk response.
We need solution like vosk should work any moment without pressing * key.
following we have implemented.

exten => *,1,Gosub(VoiceCommands-V1,s,1)
exten => *,n,Goto(s,Repeat1)

[VoiceCommands-V1]
exten => s,1,Set(NUMTIMEOUTS=0)
exten => s,n,SpeechCreate
exten => s,n,SpeechBackground(beep,4)
exten => s,n,Verbose(0,Result was ${SPEECH_TEXT(0)})
exten => s,n,Set(HindiVoice=${SPEECH_TEXT(0)})
exten => s,n,SpeechDestroy()

exten => s,n,ExecIf($[“${HindiVoice}” = “वन”]?Goto(ClassS1))
exten => s,n,ExecIf($[“${HindiVoice}” = “एक”]?Goto(ClassS1))

Anil Kumar
office@helpinghandindiango.org

Hi,
We are still looking for Asterisk expert/consultant.

We need support for Vosk speech recognition with Asterisk for real-time speech recognition during call/session.
Already shared working dialplan.

You can still contact me you know :wink:

The dialplan is a wrong approach, I already told you to use ARI implementation

ARI is great. AGI could also be helpful. Lots of ways to go, but since you asked about dialplan…

For continuous voice recognition, you might be able to add some dialplan that does an asynchronous Originate() on your main call to start a new subordinate call, with one subordinate call leg anchored in a ChanSpy() to listen on the main call and the other subordinate leg sent to your VoiceCommands-V1 context. Add some While() loops in your VoiceCommands-V1 context, maybe take out the beep, and that might get you something closer to what you want.

Thanks @nshmyrev @penguinpbx

I can work with basic ARI not to solve this issue. :unamused:

Great working with you on this @helpinghandindia - just found a minute to upload some examples that others may find useful: pngnpbx-dialplan/extensions_pngnpbx_hh.conf at main · chrsmj/pngnpbx-dialplan · GitHub