Skip to content

Speech Recognition in Asterisk with Vosk Server

License

Notifications You must be signed in to change notification settings

Lirein/vosk-asterisk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vosk speech recognition modules for Asterisk

This is an asterisk module for Vosk API server:

https://github.com/alphacep/vosk-server

It is tested with latest asterisk git master, but should probably work for earlier versions.

Installation

  1. First build the modules
./configure --with-asterisk=<path_to_source>/asterisk --prefix=<path_to_install>
make
make install
  1. Edit modules.conf to load modules
load = res_speech.so
load = res_speech_vosk.so
load = res_http_websocket_fix.so

disable original res_http_websocket since it contains bugs

; load = res_http_websocket.so
  1. Edit dialplan in extensions.conf:
[internal]
exten = 1,1,Answer
same = n,Wait(1)
same = n,SpeechCreate
same = n,Set(SPEECH_ENGINE(language)=${CHANNEL(language)})
same = n,SpeechBackground(hello)
same = n,Verbose(0,Result was ${SPEECH_TEXT(0)})
  1. Run docker
docker run -d -p 2700:2700 alphacep/kaldi-en:latest
  1. Dial extension and check the result

About

Speech Recognition in Asterisk with Vosk Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.5%
  • Makefile 1.9%
  • M4 1.4%
  • Shell 0.2%