alphacep / vosk-asterisk

Speech Recognition in Asterisk with Vosk Server
GNU General Public License v2.0
102 stars 40 forks source link

res_speech_vosk.c: Fix deadlock on results reads. #50

Closed chrsmj closed 3 months ago

chrsmj commented 3 months ago

The Asterisk apps/app_speech_utils.c speech lock needs to be unlocked before attempting to read results from Vosk; otherwise, it can deadlock on long SpeechBackground() playback files. Inspired by Asterisk res/res_aeap/transport_websocket.c

Fixes: #13

nshmyrev commented 3 months ago

Great, thanks for figuring this out!