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): [login to view URL] (Please use the 1280mb English STT model found here: [login to view URL])
Ding-dong (NodeJS AGI package): [login to view URL]
Let me know if there's any questions.
Edit: I should add that you will need some experience with Asterisk/FreePBX to complete this project, it's not just a NodeJS project. You can probably get a FreePBX docker package easily enough, but you will need to know how to configure it properly.