alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
882 stars 243 forks source link

The use of Asterisk #173

Closed v-yunbin closed 2 years ago

v-yunbin commented 2 years ago

I follow the asterisk client instruction to install all dependence,set dialpan and sip config, when I call 103 from 101,get follow meassage, When the phone was connected, it was hung up immediately. eagi.py: EAGI script started... eagi.py: Call answered from: 101 to 103 -- <SIP/101-0000004d>AGI Script eagi.py completed, returning 0 -- Executing [103@internal:3] Hangup("SIP/101-0000004d", "") in new stack == Spawn extension (internal, 103, 3) exited non-zero on 'SIP/101-0000004d'

v-yunbin commented 2 years ago

extensions.conf

exten => 200,1,Answer()
same = n,EAGI(eagi.py)
same = n,Hangup()

it seems the FD not work.

v-yunbin commented 2 years ago

extensions.conf

exten => 200,1,Answer()
same = n,EAGI(eagi.py)
same = n,Hangup()

it seems the FD not work.

I have debug the problem,FD works. when run the function "process_chunk", the errors happend.

nshmyrev commented 2 years ago

What kind of error?

v-yunbin commented 2 years ago

What kind of error?

sorry, its my error, i close it, the codes no problem.

v-yunbin commented 2 years ago

Excuse me, @nshmyrev I know that using “FD = 3”, I can get a channel audio steam,do u know how to obtain multi-channel speech streams respectively. “FD = 3” get left channel audio steam, “FD = 4” get right channel audio steam? my dial plan as follows:

[internal]
exten => 103,1,Answer()
same = n,Dial(SIP/${EXTEN},30,U(dials))
same = n,Hangup()

[dials]
exten => s,1,EAGI(eagi.py)