Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vosk integration with Freeswitch - mod_vosk - what is the status? #997

Open
lafar6502 opened this issue Jun 6, 2022 · 10 comments
Open

Vosk integration with Freeswitch - mod_vosk - what is the status? #997

lafar6502 opened this issue Jun 6, 2022 · 10 comments

Comments

@lafar6502
Copy link

Hi, i would like to try Vosk with Freeswitch for some automatic keyword recognition in voip calls (yes, no, numbers, etc) and see how far i get.
But it's a bit unclear to me what is the supported integration approach for Freeswitch
About 2 years ago you tried to merge a pull request for 'mod_vosk' into Freeswitch repo, but in the discussion that followed you decided to host it as independent project / git repo instead.
But i cant find any such project (mod_vosk). Does it exist at all? Or have you decided to go with some different approach?
What is the easiest way to connect Vosk engine with Freeswitch?

Best regards
Rafal

@nshmyrev
Copy link
Collaborator

nshmyrev commented Jun 6, 2022

Our integration code reside here, you can simply build it yourself:

https://github.com/alphacep/freeswitch/tree/master/src/mod/asr_tts/mod_vosk

You also need alphacep/libks. The pull request for vosk into freeswitch is still pending due to libks things:

signalwire/freeswitch#578

signalwire/libks#74

@nshmyrev
Copy link
Collaborator

nshmyrev commented Jun 6, 2022

You can also use vosk unimrcp server instead and freeswitch unimrcp plugin:

https://github.com/alphacep/unimrcp-vosk-plugin/tree/vosk-plugin

@lafar6502
Copy link
Author

Thanks!

@cyrenity
Copy link

@nshmyrev I am trying to build mod_vost with freeswitch 1.10.7 but getting the following error when I try to load the module

[CRIT] switch_loadable_module.c:1750 Error Loading module /usr/local/freeswitch/mod/mod_vosk.so
**/usr/local/freeswitch/mod/mod_vosk.so: undefined symbol: __ks_json_add_string_to_object**

@andreslavariega
Copy link

@nshmyrev I am trying to build mod_vost with freeswitch 1.10.7 but getting the following error when I try to load the module

[CRIT] switch_loadable_module.c:1750 Error Loading module /usr/local/freeswitch/mod/mod_vosk.so
**/usr/local/freeswitch/mod/mod_vosk.so: undefined symbol: __ks_json_add_string_to_object**

I have the same problem, did you manage to solve it?

@nshmyrev
Copy link
Collaborator

@andreslavariega feels like you are using wrong libks, we have our own version with fixes https://github.com/alphacep/libks

@andreslavariega
Copy link

andreslavariega commented May 25, 2023

@andreslavariega feels like you are using wrong libks, we have our own version with fixes https://github.com/alphacep/libks

@nshmyrev Thanks for your prompt response. I tell you my steps.

I deleted libks and then installed libks from the indicated source code.

Use these commands, and previously install cmake 3.7.2.

cmake . -DCMAKE_INSTALL_PREFIX:PATH=/usr
make
cd /usr/src/libks/
cmake .
make
make install

Then I ran the test successfully.

root@voskFreeSwitch:/usr/src/libks# ctest .
Test project /usr/src/libks
Start 1: test pools
1/17 Test #1: testpools..................... Passed 0.02 sec
Start 2: testrealloc
2/17 Test #2: testrealloc .................. Passed 0.02 sec
Start 3: testacl
3/17 Test #3: testacl .................. Passed 0.02 sec
Start 4: testthreadpools

However, when I want to compile the freeswitch again, I get the error that it can't find libks. I think it's because I didn't install it in the correct folder, or maybe I should reference it at compile time.

checking for libks >= 1.8.2... configure: error: You need to either install libks

@nshmyrev
Copy link
Collaborator

You need to read details in configure.log, it should be clear why there is no libks. Check inside or attach it here.

@AnkitSavaliya007
Copy link

@nshmyrev I am trying to build mod_vost with freeswitch 1.10.7 but getting the following error when I try to load the module

[CRIT] switch_loadable_module.c:1750 Error Loading module /usr/local/freeswitch/mod/mod_vosk.so
**/usr/local/freeswitch/mod/mod_vosk.so: undefined symbol: __ks_json_add_string_to_object**

Link you libks library with mod_vosk module. It will work

@bhavikjenya
Copy link

@nshmyrev I am trying to build mod_vost with freeswitch 1.10.12 but getting the following error when I try to load the module.

2024-07-31 10:37:06.782778 99.33% [CRIT] switch_loadable_module.c:1754 Error Loading module /usr/local/freeswitch/mod/mod_vosk.so
**/usr/local/freeswitch/mod/mod_vosk.so: undefined symbol: __ks_json_add_string_to_object**

@AnkitSavaliya007 How to link correctly mod_vosk module with libks as got success on libks as well as mod_vosk installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants