Asterisk AGI Speech to text using Vosk package - NodeJS

Job ID: 32315772

Budget: $250 – $750 AUD

Hi Freelancers!

I'm looking for a simple NodeJS application which takes an inbound call channel via the Asterisk Fast AGI/EAGI (Likely using the NodeJS package ding-dong, but any NodeJS AGI package will be fine)
and then processes the channel via the Vosk API NodeJS package. The program should then:
1. Print that speech to text via the NodeJS console.
2. Within the current converted text utterance, look for the keyword - which will be 'chocolate'
3. If the keyword is found play a wav down the channel using the stream command then return to the dial plan (The wav needs to played via NodeJS, not using the dial plan - any wav file will do for testing).
4. If the keyword is not found, return to the dial plan
5. If no utterance can be detected for 5 seconds, return to the dial plan.

I need the STT processing to all be done within NodeJS, rather than using a seperate SST API within Asterisk (there is a Github package called
vosk-asterisk, I want to avoid using this), this is because there will more complex analysis on the text output done with NodeJS at a later time - I don't want to perform text analysis (such as keyword lookup) within the dial plan.
This is simply a proof of concept project. The challenge, I believe, is directing the audio channel to Vosk. (Anyone who has worked with NodeJS and Asterisk AGI should be able
to make this work very easily). I do not want to use Watson or Google Cloud STT, i've had better results in real time using Vosk and would like to continue using it.

The project is considered complete when the above five steps all work.

See my simple diagram of how the I see the process flow.

Vosk (Speech to text): https://github.com/alphacep/vosk-api (Please use the 1280mb English STT model found here: https://alphacephei.com/vosk/models)

Ding-dong (NodeJS AGI package): https://github.com/antirek/ding-dong

Let me know if there's any questions.

Thank you!
Related categories: Asterisk PBX Node.js