Closed dima056359 closed 1 year ago
Empty partials mean incoming audio is just silent. Probably sip client doesn't record audio somehow. You can dump call to a file and listen.
you should see the packet lengths are pretty much the same
It sends pcm data in equal chunks so it is expected.
Last thing, this is the file I'm trying to play and recognize:
In the dialplan it is only played to the client, yo do not send it for recognition.
Hi Nikolai,
In the dialplan it is only played to the client, yo do not send it for recognition.
That was the main problem. I just got the whole idea of the demo wrong, so you are right. I thought the SpeechBackground()
app is going to send the .wav file right to the Kaldi, but after digging into Asterisk docs I realized my assumptions were wrong.
And the funny fact is, that I was testing this demo in a silent room with no music or people talking around me, so that is the reason why nothing was recognized because... nothing to capture lol. Thank you for your help! Cheers.
Hi everyone,
Thanks for this beautiful piece of a software. It seems to be working fine with a Python example script feeding the Kaldi server with chunks of .wav file. Same trick I wanted to perform in Asterisk by following official README instructions, however, it doesn't work as intended.
Just FYI this is my setup:
First of all, there is a Kaldi server running inside a Docker container:
Next, I've cloned & built Asterisk's git branch code of v18.6 (no luck with latest v18.19 though):
So the Asterisk version seems to be okay at this point. The
vosk-asterisk
lib was also built and installed in to Asterisk's default lib directory as follows:These libs were mentioned in
modules.conf
of the Asterisk, and loaded properly as well:Here's also a piece of my
extensions.conf
dialplan code to run speech recognition:So now, when it comes to have all the magic to happen, I dial
111
exten and observe the following:... it's just a bunch of empty responses back from the Kaldi server as I understand. There is no real media chunks passing there, so no recognition happens actually. There was an idea to trace VM's internal traffic with
tcpdump
and I've managed to catch some interesting info:Please pay your attention to the very end of each string of this output - you should see the packet lengths are pretty much the same, implying the abscense of any significant media payload inside the IP packets flowing between the Asterisk and Kaldi server. When I was testing Kaldi with the Python script, tracing all the IP traffic again, it had different packet lengths all the time, so I assume there was a real media exchange as it should be.
Last thing, this is the file I'm trying to play and recognize:
Let me know if I could give you more information on my setup, what was configured and how, show you some logs etc. Thank you!