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

Set Language #35

Open
pumanzor opened this issue Mar 15, 2023 · 6 comments
Open

Set Language #35

pumanzor opened this issue Mar 15, 2023 · 6 comments

Comments

@pumanzor
Copy link

Hello, where is the file or how i can change the language, i'm wondering if this file

res_speech_vosk.conf

does support this variable, but also is possible on dialplan something like that:

same = n,Set(SPEECH_ENGINE(VOSK_CONFIG)={"config" : { "languageCode" : es"} })

thanks for your help

@nshmyrev nshmyrev changed the title set language Set Language Mar 15, 2023
@nshmyrev
Copy link
Contributor

This feature is not implemented, we have pull request #8 about it.

@vieridipaola
Copy link

vieridipaola commented May 24, 2023

Does the pull request imply that the upstream Asterisk res_http_websocket.c be modified?

Also there are "conflicts that need to be resolved" according to github. Is the code too old (almost 3 years old) as res_speech_vosk.c has been changed a year ago?

Is the pull request overkill in that it does more than just select the language?

Vosk works nicely from CLI. That's the only thing I've tried for now.
I'm starting to test Asterisk integration with the Docker server container.
I'm only interested in using 2 or 4 languages. Is there a way to quickly do so?
Even if I had to make some code change, would it be in the Asterisk Vosk module or in the Vosk server (https://github.com/alphacep/vosk-server)?

@nshmyrev
Copy link
Contributor

Even if I had to make some code change, would it be in the Asterisk Vosk module or in the Vosk server (https://github.com/alphacep/vosk-server)?

It has to be both

@vieridipaola
Copy link

Novice follow-up question:

since the vosk CLI commands "work fine for me", would there be a way to use them directly from Asterisk/AGI even if that probably is less efficient?
eg. in Asterisk dialplan/AGI, record user voice to a temp file then feed it to vosk CLI to get the text.

@nshmyrev
Copy link
Contributor

@vieridipaola sure, you can use EAGI too, see example here:

https://github.com/alphacep/vosk-server/tree/master/client-samples/asterisk

@vieridipaola
Copy link

The eagi sample script uses the Vosk server, so it doesn't solve the language selection issue.
I'll try to customize it to use the CLI programs instead.

chrsmj added a commit to chrsmj/vosk-asterisk that referenced this issue Feb 9, 2024
Allows multiple horses (URLs) for semi-concurrent processing.
These horses could be multiple language models racing against each other.

Requires additional patches to Asterisk.
See [Asterisk #593](asterisk/asterisk#593)
for further discussion and links to additional required patches.

Resolves: alphacep#8, alphacep#35
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

3 participants