Speech recognition API Limitations

Hello.
I’m trying to use a vosk-module for speech recognition (Module for Vosk speech recognition in Asterisk available)
Everything is installed and everything works except for one moment: recognition takes only 20 seconds. It doesn’t crash, it just terminates after 20 seconds.
I found that this may be due to limitations of the asterisk speech api. Tell me, please, is this so and is it possible to increase this time to at least 30 seconds?

I call it like in the example

[internal]
exten = 1,1,Answer
same = n,Wait(1)
same = n,SpeechCreate
same = n,SpeechBackground(hello)
same = n,Verbose(0,Result was ${SPEECH_TEXT(0)})

There is no 20 second timeout built into the speech API.

Are there any restrictions at all with this dialplan? Do I understand correctly that with such a call, the asterisk must accept any message - both 30 seconds and 5 minutes?

There is a timeout argument on SpeechBackground, I don’t remember the specifics of it when not specified. For testing you could specify a large value and see what happens.

Hi,
Is the call coming from outside via a SIP provider?
I have observed such behavior in connection with the voicemail application. Some providers react to this when no media data is received. In this case it helped to add in the file asterisk.conf:

[options]
transmit_silence = yes

HTH

Karsten

tried this option.

same = n,SpeechBackground(hello,30)

Ended at 20 seconds. Whatever option I set, it’s still at 20 seconds.
Looks like that:

 {
      "conf" : 1.000000,
      "end" : 20.160000,
      "start" : 19.680000,
      "word" : "test"
    }],

It was already specified in the config

transmit_silence_during_record=yes

I added your parameter, but, unfortunately, nothing has changed

I don’t know what that output is, I assume vosk which I can’t really comment on. I don’t think there is anything otherwise within the Asterisk speech API that would cause such a thing.

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