Builtin: DTMF and Speech

710 views
Skip to first unread message

Ruben Rios

unread,
Mar 14, 2020, 10:52:40 AM3/14/20
to uni...@googlegroups.com
Hello,

I need to use builtin:dtmf/digits and builtin:speech/transcribe grammars both together in one play_and_detect_speech command but it is not working. It is only recognized dtmf not both (dtmf and speech). When I executed each grammars individually, it is working fine. The problem is that I need to recognize dtmf and speech in the same command.

 Please can you tell me where is my error in the following code?  The command that I executed to recognize dtmf and speech from FS is:

session:execute("play_and_detect_speech","say:{speech-language=es-ES,prosody-rate=medium}Hola en que te puedo ayudar? detect:unimrcp {start-input-timers=false,no-input-timeout=15000,speech-language=es-ES}builtin:dtmf/digits,builtin:speech/transcribe")

I have attached part of the unimrcp server log:

MRCP/2.0 272 RECOGNIZE 1
Channel-Identifier: 8aa18edad94b4b36@speechrecog
Content-Type: text/uri-list
Cancel-If-Queue: false
Start-Input-Timers: false
Speech-Language: es-ES
No-Input-Timeout: 15000
Content-Length: 45

builtin:dtmf/digits,builtin:speech/transcribe
2020-03-14 11:18:59:136230 [INFO]   Assign Control Channel <8aa18edad94b4b36@speechrecog> to Connection 192.168.80.133:1544 <-> 192.168.80.133:55562 [0] -> [1]
2020-03-14 11:18:59:136276 [INFO]   Process RECOGNIZE Request <8aa18edad94b4b36@speechrecog> [1]
2020-03-14 11:18:59:136378 [INFO]   Init DTMF Detector: interdigit-timeout=5000 ms, term-timeout=10000 ms, term-char=#, length=0, min-length=0, max-length=0 <8aa18edad94b4b36>
2020-03-14 11:18:59:136417 [INFO]   Create gRPC Stream <8aa18edad94b4b36@gdf>
2020-03-14 11:18:59:137140 [INFO]   Process RECOGNIZE Response <8aa18edad94b4b36@speechrecog> [1]
2020-03-14 11:18:59:137155 [INFO]   State Transition IDLE -> RECOGNIZING <8aa18edad94b4b36@speechrecog>
2020-03-14 11:18:59:137198 [INFO]   Send MRCPv2 Data 192.168.80.133:1544 <-> 192.168.80.133:55562 [83 bytes]

Best Regards,

Ruben

Arsen Chaloyan

unread,
Mar 14, 2020, 3:05:36 PM3/14/20
to UniMRCP
Hello Ruben,

Use \n as s separator

session:execute("play_and_detect_speech","say:{speech-language=es-ES,prosody-rate=medium}Hola en que te puedo ayudar? detect:unimrcp {start-input-timers=false,no-input-timeout=15000,speech-language=es-ES}builtin:dtmf/digits\nbuiltin:speech/transcribe")


--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/CAEGe1k4%2BAWYcAXQzkgYo8fuox1wx_91aKW-%3DSz%3DQzVtijBRjaA%40mail.gmail.com.


--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org

Ruben Rios

unread,
Mar 14, 2020, 3:13:10 PM3/14/20
to uni...@googlegroups.com
Hi Arsen,

Thank you very much, with \ n separator it works perfect.

Best regards

Ruben



sin...@gmail.com

unread,
Jul 16, 2020, 2:42:32 AM7/16/20
to UniMRCP
i use unimrcp in astersik ,and got the same problem..         use  \ n separator it still didn't work.
i use agi &java to do with asterisk. ..here is the log:( when press number,the voice do not stop. and the dtmf number can not add in recognize_result, too.

[2020-07-16 14:25:15] NOTICE[18870][C-0000040a]: app_synthandrecog.c:1333 app_synthandrecog_exec: SynthAndRecog() prompt: 请问您需要什么帮助?
[2020-07-16 14:25:15] NOTICE[18870][C-0000040a]: app_synthandrecog.c:1341 app_synthandrecog_exec: SynthAndRecog() grammar: builtin:dtmf/digitsbuiltin:speech/transcribe
[2020-07-16 14:25:15] NOTICE[18870][C-0000040a]: app_synthandrecog.c:1372 app_synthandrecog_exec: SynthAndRecog() options: dttc=#&v=siyue&pv=15&pr=-200&t=20000&b=1&ct=0.5&&spl=zh-CN&uer=1
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option dttc: #
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option v: siyue
[2020-07-16 14:25:15] WARNING[18870][C-0000040a]: app_synthandrecog.c:1137 synthandrecog_option_apply: Unknown option: v
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option pv: 15
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option pr: -200
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option t: 20000
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option b: 1
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option ct: 0.5
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option spl: zh-CN
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option uer: 1
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: audio_queue.c:253 audio_queue_create: (ASR-12) Audio queue created
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:252 speech_channel_create: Created speech channel: Name=ASR-12, Type=RECOGNIZER, Codec=LPCM, Rate=8000 on SIP/8001-00000809
[2020-07-16 14:25:15] DEBUG[20172]: app_synthandrecog.c:248 speech_on_channel_add: (ASR-12) speech_on_channel_add
[2020-07-16 14:25:15] DEBUG[20172]: app_synthandrecog.c:268 speech_on_channel_add: (ASR-12) DTMF generator created
[2020-07-16 14:25:15] NOTICE[20172]: app_synthandrecog.c:287 speech_on_channel_add: (ASR-12) Channel ready codec=LPCM, sample rate=8000
[2020-07-16 14:25:15] DEBUG[20172]: speech_channel.c:109 speech_channel_set_state_unlocked: (ASR-12) CLOSED ==> READY
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:501 speech_channel_open: (ASR-12) channel is ready
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1471 app_synthandrecog_exec: (ASR-12) Determine grammar type: builtin:dtmf/digitsbuiltin:speech/transcribe
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:849 recog_channel_load_grammar: (ASR-12) Loading grammar name=grammar-0, type=text/uri-list, data=builtin:dtmf/digitsbuiltin:speech/transcribe
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1502 app_synthandrecog_exec: (ASR-12) Add prompt: 请问您需要什么帮助?
[2020-07-16 14:25:15] NOTICE[18870][C-0000040a]: app_synthandrecog.c:1601 app_synthandrecog_exec: (ASR-12) Recognizing, Start-Input-Timers: 0
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (ASR-12) Confidence-Threshold: 0.5
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (ASR-12) Speech-Language: zh-CN
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (ASR-12) Dtmf-Term-Char: #
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (ASR-12) Recognition-Timeout: 20000
[2020-07-16 14:25:15] DEBUG[20172]: app_synthandrecog.c:928 recog_on_message_receive: (ASR-12) RECOGNIZE IN PROGRESS
[2020-07-16 14:25:15] DEBUG[20172]: speech_channel.c:109 speech_channel_set_state_unlocked: (ASR-12) READY ==> PROCESSING
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: audio_queue.c:253 audio_queue_create: (TTS-12) Audio queue created
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:252 speech_channel_create: Created speech channel: Name=TTS-12, Type=SYNTHESIZER, Codec=LPCM, Rate=8000 on SIP/8001-00000809
[2020-07-16 14:25:15] DEBUG[20172]: app_synthandrecog.c:248 speech_on_channel_add: (TTS-12) speech_on_channel_add
[2020-07-16 14:25:15] NOTICE[20172]: app_synthandrecog.c:287 speech_on_channel_add: (TTS-12) Channel ready codec=LPCM, sample rate=8000
[2020-07-16 14:25:15] DEBUG[20172]: speech_channel.c:109 speech_channel_set_state_unlocked: (TTS-12) CLOSED ==> READY
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:501 speech_channel_open: (TTS-12) channel is ready
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (TTS-12) Prosody-Volume: 15
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (TTS-12) Prosody-Rate: -200
[2020-07-16 14:25:15] DEBUG[18870][C-0000040a]: speech_channel.c:619 speech_channel_set_params: (TTS-12) Speech-Language: zh-CN
[2020-07-16 14:25:15] DEBUG[20172]: app_synthandrecog.c:329 synth_on_message_receive: (TTS-12) REQUEST IN PROGRESS
[2020-07-16 14:25:15] DEBUG[20172]: speech_channel.c:109 speech_channel_set_state_unlocked: (TTS-12) READY ==> PROCESSING
[2020-07-16 14:25:17] DTMF[18870][C-0000040a]: channel.c:4214 __ast_read: DTMF begin '8' received on SIP/8001-00000809
[2020-07-16 14:25:17] DTMF[18870][C-0000040a]: channel.c:4225 __ast_read: DTMF begin passthrough '8' on SIP/8001-00000809
[2020-07-16 14:25:18] DTMF[18870][C-0000040a]: channel.c:4128 __ast_read: DTMF end '8' received on SIP/8001-00000809, duration 200 ms
[2020-07-16 14:25:18] DTMF[18870][C-0000040a]: channel.c:4169 __ast_read: DTMF end accepted with begin '8' on SIP/8001-00000809
[2020-07-16 14:25:18] DTMF[18870][C-0000040a]: channel.c:4198 __ast_read: DTMF end passthrough '8' on SIP/8001-00000809
[2020-07-16 14:25:18] DEBUG[18870][C-0000040a]: app_synthandrecog.c:1719 app_synthandrecog_exec: (ASR-12) User pressed DTMF key (56)
[2020-07-16 14:25:18] NOTICE[18870][C-0000040a]: app_synthandrecog.c:1726 app_synthandrecog_exec: (ASR-12) DTMF digit queued (8)

Vahagn Kocharyan

unread,
Jul 16, 2020, 6:06:00 AM7/16/20
to uni...@googlegroups.com

sin...@gmail.com

unread,
Jul 16, 2020, 9:53:33 AM7/16/20
to UniMRCP
ok,thx

Vahagn Kocharyan

unread,
Jul 16, 2020, 10:06:37 AM7/16/20
to uni...@googlegroups.com
mrcp conf example 
please compare it with your mrcp.conf. 
you must have  "telephone-event" added to the codec  on unimrcp server and in mrcp.conf file
[uni2]
; MRCP settings
version = 2
;
; SIP settings
server-ip = 192.168.88.82
server-port = 1554
; SIP user agent
client-ip = 192.168.88.200
client-port = 25097
sip-transport = udp
;
; RTP factory
rtp-ip = 192.168.88.200
rtp-port-min = 28000
rtp-port-max = 29000
;
; Jitter buffer settings
playout-delay = 50
max-playout-delay = 200
; RTP settings
ptime = 20
codecs = PCMU PCMA L16/96/8000 telephone-event/101/8000

; === RTCP settings ===
rtcp = 1
rtcp-bye = 2
rtcp-tx-interval = 5000
rtcp-rx-resolution = 1000

if it don't work provide logs from asterisk and unimrcp server  
thanks
Vahagn

Vahagn Kocharyan

unread,
Jul 16, 2020, 10:11:51 AM7/16/20
to uni...@googlegroups.com
fo asterisk you must set separator like "," 
example
builtin:speech/transcribe?projectid="your projectId",builtin:dtmf/digits?


sin...@gmail.com

unread,
Jul 16, 2020, 11:21:59 PM7/16/20
to UniMRCP
thx.kochary... I changed as your said but still can not disturb voice and catch the dtmf :
this is the log:

[2020-07-17 11:19:21] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1333 app_synthandrecog_exec: SynthAndRecog() prompt: 您好,请用普通话说出您要找的人的姓名
[2020-07-17 11:19:21] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1341 app_synthandrecog_exec: SynthAndRecog() grammar: builtin:speech/transcribe?projectid=pro001,builtin:dtmf/digits?
[2020-07-17 11:19:21] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1372 app_synthandrecog_exec: SynthAndRecog() options: t=5000&b=1&ct=0.2&sl=0.8&spl=zh-CN&rm=hotword
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option t: 5000
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option b: 1
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option ct: 0.2
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option sl: 0.8
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option spl: zh-CN
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1161 synthandrecog_options_parse: Apply option rm: hotword
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: audio_queue.c:253 audio_queue_create: (ASR-16) Audio queue created
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:252 speech_channel_create: Created speech channel: Name=ASR-16, Type=RECOGNIZER, Codec=LPCM, Rate=8000 on SIP/8001-000014c1
[2020-07-17 11:19:21] DEBUG[10788]: app_synthandrecog.c:248 speech_on_channel_add: (ASR-16) speech_on_channel_add
[2020-07-17 11:19:21] DEBUG[10788]: app_synthandrecog.c:268 speech_on_channel_add: (ASR-16) DTMF generator created
[2020-07-17 11:19:21] NOTICE[10788]: app_synthandrecog.c:287 speech_on_channel_add: (ASR-16) Channel ready codec=LPCM, sample rate=8000
[2020-07-17 11:19:21] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (ASR-16) CLOSED ==> READY
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:501 speech_channel_open: (ASR-16) channel is ready
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1471 app_synthandrecog_exec: (ASR-16) Determine grammar type: builtin:speech/transcribe?projectid=pro001
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:849 recog_channel_load_grammar: (ASR-16) Loading grammar name=grammar-0, type=text/uri-list, data=builtin:speech/transcribe?projectid=pro001
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1471 app_synthandrecog_exec: (ASR-16) Determine grammar type: builtin:dtmf/digits?
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:849 recog_channel_load_grammar: (ASR-16) Loading grammar name=grammar-1, type=text/uri-list, data=builtin:dtmf/digits?
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1502 app_synthandrecog_exec: (ASR-16) Add prompt: 您好,请用普通话说出您要找的人的姓名
[2020-07-17 11:19:21] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1601 app_synthandrecog_exec: (ASR-16) Recognizing, Start-Input-Timers: 0
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:619 speech_channel_set_params: (ASR-16) Confidence-Threshold: 0.2
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:619 speech_channel_set_params: (ASR-16) Speech-Language: zh-CN
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:619 speech_channel_set_params: (ASR-16) Sensitivity-Level: 0.8
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:619 speech_channel_set_params: (ASR-16) Recognition-Mode: hotword
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:619 speech_channel_set_params: (ASR-16) Recognition-Timeout: 5000
[2020-07-17 11:19:21] DEBUG[10788]: app_synthandrecog.c:928 recog_on_message_receive: (ASR-16) RECOGNIZE IN PROGRESS
[2020-07-17 11:19:21] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (ASR-16) READY ==> PROCESSING
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: audio_queue.c:253 audio_queue_create: (TTS-16) Audio queue created
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:252 speech_channel_create: Created speech channel: Name=TTS-16, Type=SYNTHESIZER, Codec=LPCM, Rate=8000 on SIP/8001-000014c1
[2020-07-17 11:19:21] DEBUG[10788]: app_synthandrecog.c:248 speech_on_channel_add: (TTS-16) speech_on_channel_add
[2020-07-17 11:19:21] NOTICE[10788]: app_synthandrecog.c:287 speech_on_channel_add: (TTS-16) Channel ready codec=LPCM, sample rate=8000
[2020-07-17 11:19:21] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (TTS-16) CLOSED ==> READY
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:501 speech_channel_open: (TTS-16) channel is ready
[2020-07-17 11:19:21] DEBUG[17683][C-00000a61]: speech_channel.c:619 speech_channel_set_params: (TTS-16) Speech-Language: zh-CN
[2020-07-17 11:19:21] DEBUG[10788]: app_synthandrecog.c:329 synth_on_message_receive: (TTS-16) REQUEST IN PROGRESS
[2020-07-17 11:19:21] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (TTS-16) READY ==> PROCESSING
[2020-07-17 11:19:22] DTMF[17683][C-00000a61]: channel.c:4214 __ast_read: DTMF begin '2' received on SIP/8001-000014c1
[2020-07-17 11:19:22] DTMF[17683][C-00000a61]: channel.c:4225 __ast_read: DTMF begin passthrough '2' on SIP/8001-000014c1
[2020-07-17 11:19:22] DTMF[17683][C-00000a61]: channel.c:4128 __ast_read: DTMF end '2' received on SIP/8001-000014c1, duration 200 ms
[2020-07-17 11:19:22] DTMF[17683][C-00000a61]: channel.c:4169 __ast_read: DTMF end accepted with begin '2' on SIP/8001-000014c1
[2020-07-17 11:19:22] DTMF[17683][C-00000a61]: channel.c:4198 __ast_read: DTMF end passthrough '2' on SIP/8001-000014c1
[2020-07-17 11:19:22] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1719 app_synthandrecog_exec: (ASR-16) User pressed DTMF key (50)
[2020-07-17 11:19:22] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1726 app_synthandrecog_exec: (ASR-16) DTMF digit queued (2)
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:22] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DTMF[17683][C-00000a61]: channel.c:4214 __ast_read: DTMF begin '5' received on SIP/8001-000014c1
[2020-07-17 11:19:23] DTMF[17683][C-00000a61]: channel.c:4225 __ast_read: DTMF begin passthrough '5' on SIP/8001-000014c1
[2020-07-17 11:19:23] DTMF[17683][C-00000a61]: channel.c:4128 __ast_read: DTMF end '5' received on SIP/8001-000014c1, duration 200 ms
[2020-07-17 11:19:23] DTMF[17683][C-00000a61]: channel.c:4169 __ast_read: DTMF end accepted with begin '5' on SIP/8001-000014c1
[2020-07-17 11:19:23] DTMF[17683][C-00000a61]: channel.c:4198 __ast_read: DTMF end passthrough '5' on SIP/8001-000014c1
[2020-07-17 11:19:23] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1719 app_synthandrecog_exec: (ASR-16) User pressed DTMF key (53)
[2020-07-17 11:19:23] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1726 app_synthandrecog_exec: (ASR-16) DTMF digit queued (5)
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:23] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DTMF[17683][C-00000a61]: channel.c:4214 __ast_read: DTMF begin '2' received on SIP/8001-000014c1
[2020-07-17 11:19:24] DTMF[17683][C-00000a61]: channel.c:4225 __ast_read: DTMF begin passthrough '2' on SIP/8001-000014c1
[2020-07-17 11:19:24] DTMF[17683][C-00000a61]: channel.c:4128 __ast_read: DTMF end '2' received on SIP/8001-000014c1, duration 200 ms
[2020-07-17 11:19:24] DTMF[17683][C-00000a61]: channel.c:4169 __ast_read: DTMF end accepted with begin '2' on SIP/8001-000014c1
[2020-07-17 11:19:24] DTMF[17683][C-00000a61]: channel.c:4198 __ast_read: DTMF end passthrough '2' on SIP/8001-000014c1
[2020-07-17 11:19:24] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1719 app_synthandrecog_exec: (ASR-16) User pressed DTMF key (50)
[2020-07-17 11:19:24] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1726 app_synthandrecog_exec: (ASR-16) DTMF digit queued (2)
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:24] DEBUG[10790]: app_synthandrecog.c:1038 recog_stream_read: (ASR-16) DTMF frame written
[2020-07-17 11:19:25] DEBUG[10788]: app_synthandrecog.c:367 synth_on_message_receive: (TTS-16) SPEAK-COMPLETE
[2020-07-17 11:19:25] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (TTS-16) PROCESSING ==> READY
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1679 app_synthandrecog_exec: (ASR-16) Start input timers
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: app_synthandrecog.c:536 recog_channel_start_input_timers: (ASR-16) Sending START-INPUT-TIMERS request
[2020-07-17 11:19:25] DEBUG[10788]: app_synthandrecog.c:960 recog_on_message_receive: (ASR-16) Timers started
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: app_synthandrecog.c:1704 app_synthandrecog_exec: (ASR-16) Null frame. Hangup detected
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: speech_channel.c:340 speech_channel_destroy: Destroy speech channel: Name=TTS-16, Type=SYNTHESIZER, Codec=LPCM, Rate=8000
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: speech_channel.c:365 speech_channel_destroy: (TTS-16) Waiting for MRCP session to terminate
[2020-07-17 11:19:25] DEBUG[10788]: app_synthandrecog.c:222 speech_on_session_terminate: (TTS-16) speech_on_session_terminate
[2020-07-17 11:19:25] DEBUG[10788]: app_synthandrecog.c:230 speech_on_session_terminate: (TTS-16) Destroying MRCP session
[2020-07-17 11:19:25] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (TTS-16) READY ==> CLOSED
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: audio_queue.c:197 audio_queue_destroy: (TTS-16) Audio queue destroyed
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: speech_channel.c:340 speech_channel_destroy: Destroy speech channel: Name=ASR-16, Type=RECOGNIZER, Codec=LPCM, Rate=8000
[2020-07-17 11:19:25] DEBUG[17683][C-00000a61]: speech_channel.c:365 speech_channel_destroy: (ASR-16) Waiting for MRCP session to terminate
[2020-07-17 11:19:26] DEBUG[10788]: app_synthandrecog.c:222 speech_on_session_terminate: (ASR-16) speech_on_session_terminate
[2020-07-17 11:19:26] DEBUG[10788]: app_synthandrecog.c:225 speech_on_session_terminate: (ASR-16) DTMF generator destroyed
[2020-07-17 11:19:26] DEBUG[10788]: app_synthandrecog.c:230 speech_on_session_terminate: (ASR-16) Destroying MRCP session
[2020-07-17 11:19:26] DEBUG[10788]: speech_channel.c:109 speech_channel_set_state_unlocked: (ASR-16) PROCESSING ==> CLOSED
[2020-07-17 11:19:26] DEBUG[17683][C-00000a61]: audio_queue.c:197 audio_queue_destroy: (ASR-16) Audio queue destroyed
[2020-07-17 11:19:26] NOTICE[17683][C-00000a61]: app_synthandrecog.c:1292 synthandrecog_exit: SynthAndRecog() exiting status: INTERRUPTED on SIP/8001-000014c1
[2020-07-17 11:19:28] WARNING[17673][C-00000a60]: app_dial.c:1546 wait_for_answer: Unable to write frametype: 2

Vahagn Kocharyan

unread,
Jul 17, 2020, 1:29:39 PM7/17/20
to uni...@googlegroups.com
you must have project id for both grammars. 
you have "codecs = PCMU PCMA L16/96/8000 telephone-event/101/8000 in mrcp.conf" and 
"<codecs own-preference="false">PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs> " on unimrcpserver.conf ?




sin...@gmail.com

unread,
Jul 18, 2020, 11:44:59 AM7/18/20
to UniMRCP
yes, i check it twice.

here is the conf file:

mrcp.conf
[general]
default-asr-profile = speech-nuance5-mrcp2
default-tts-profile = speech-nuance5-mrcp2
log-level = WARNING
max-connection-count = 100
offer-new-connection = 1

[speech-nuance5-mrcp2]
version = 2

server-ip = 127.0.0.1
server-port = 8060
force-destination = 1

client-ip = 127.0.0.1
client-port = 5093
sip-transport = udp

rtp-ip = 127.0.0.1
rtp-port-min = 4000
rtp-port-max = 5000

playout-delay = 50
max-playout-delay = 200

ptime = 20
codecs = PCMU PCMA L16/96/8000 telephone-event/101/8000

rtcp = 1
rtcp-bye = 2
rtcp-tx-interval = 5000
rtcp-rx-resolution = 1000


unimrcpserver.xml 
<?xml version="1.0" encoding="UTF-8"?>

<!-- UniMRCP server document -->
               xsi:noNamespaceSchemaLocation="unimrcpserver.xsd"
               version="1.0">
  <properties>
    <ip>0.0.0.0</ip>
  </properties>

  <components>
    <!-- Factory of MRCP resources -->
    <resource-factory>
      <resource id="speechrecog" enable="true"/>
      <resource id="speechsynth" enable="true"/>
    </resource-factory>

    <sip-uas id="SIP-Agent-1" type="SofiaSIP">
      <sip-port>8060</sip-port>
      <sip-transport>udp,tcp</sip-transport>
      <ua-name>BaiduSpeech SofiaSIP</ua-name>
      <sdp-origin>BaiduSpeechServer</sdp-origin>    
      <sip-session-expires>600</sip-session-expires>
      <sip-min-session-expires>120</sip-min-session-expires>
    </sip-uas>

    <rtsp-uas id="RTSP-Agent-1" type="UniRTSP">
      
      <rtsp-port>1554</rtsp-port>
      <resource-map>
        <param name="speechrecog" value="speechrecognizer"/>
        <param name="speechsynth" value="speechsynthesizer"/>
      </resource-map>
      <max-connection-count>100</max-connection-count>
      <inactivity-timeout>600</inactivity-timeout>
      <sdp-origin>UniMRCPServer</sdp-origin>
    </rtsp-uas>

    <!-- MRCPv2 connection agent -->
    <mrcpv2-uas id="MRCPv2-Agent-1">
      
      <mrcp-port>1544</mrcp-port>
      <max-connection-count>400</max-connection-count>
      <max-shared-use-count>400</max-shared-use-count>
      <force-new-connection>true</force-new-connection>
      <rx-buffer-size>1024</rx-buffer-size>
      <tx-buffer-size>1024</tx-buffer-size>
      <inactivity-timeout>600</inactivity-timeout>
      <termination-timeout>3</termination-timeout>
    </mrcpv2-uas>

    <!-- Media processing engine -->
    <media-engine id="Media-Engine-1">
      <realtime-rate>1</realtime-rate>
    </media-engine>

    <!-- Factory of RTP terminations -->
    <rtp-factory id="RTP-Factory-1">
      <rtp-port-min>5000</rtp-port-min>
      <rtp-port-max>6000</rtp-port-max>
    </rtp-factory>

    <!-- Factory of plugins (MRCP engines) -->
    <plugin-factory>
      <engine id="Baidu-Recog-1" name="libbaidu-asr" enable="true"/>
      <engine id="Baidu-Synth-1" name="libbaidu-tts" enable="true"/>
    </plugin-factory>
  </components>

  <settings>
    <!-- RTP/RTCP settings -->
    <rtp-settings id="RTP-Settings-1">
      <jitter-buffer>
        <adaptive>1</adaptive>
        <playout-delay>50</playout-delay>
        <max-playout-delay>600</max-playout-delay>
        <time-skew-detection>1</time-skew-detection>
      </jitter-buffer>
      <ptime>20</ptime>
      <codecs own-preference="false">PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
      <rtcp enable="false">
        <rtcp-bye>1</rtcp-bye>
        <tx-interval>5000</tx-interval>
        <rx-resolution>1000</rx-resolution>
      </rtcp>
    </rtp-settings>
  </settings>

  <profiles>
    <!-- MRCPv2 default profile -->
    <mrcpv2-profile id="uni2">
      <sip-uas>SIP-Agent-1</sip-uas>
      <mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv2-profile>

    <!-- MRCPv1 default profile -->
    <mrcpv1-profile id="uni1">
      <rtsp-uas>RTSP-Agent-1</rtsp-uas>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv1-profile>

  </profiles>
</unimrcpserver>

sin...@gmail.com

unread,
Jul 20, 2020, 1:29:54 AM7/20/20
to UniMRCP
Is there anything wrong?

Vahagn Kocharyan

unread,
Jul 20, 2020, 6:00:09 AM7/20/20
to uni...@googlegroups.com
can you share your unimrcp server logs
Thanks
Vahagn

Wilmar Pérez

unread,
Jul 20, 2020, 8:38:20 AM7/20/20
to uni...@googlegroups.com
Hola Ruben,


I have the same scenario you have. The key was to modify builtin:dtmf/digits,builtin:speech/transcribe  to builtin:dtmf/digits\nbuiltin:speech/transcribe.  That is, change the , for \n to separate the grammar.   You can shoot me a direct email in Spanish if you want to, I would certainly love to have contact with somebody that is going through the same sort of issues I have been dealing with with freespeech.

Best,

Wilmar


--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/CAEGe1k4%2BAWYcAXQzkgYo8fuox1wx_91aKW-%3DSz%3DQzVtijBRjaA%40mail.gmail.com.


--
--------------------------------------------------------
Wilmar Pérez 
Reply all
Reply to author
Forward
0 new messages