play_and_detect_speech: speech or DTMF

Status
Not open for further replies.

ewdpb

Member
Oct 3, 2019
151
19
18
Hi all,


I am trying to use play_and_detect_speech so the caller can either say their choice or press a key.

It works fine for speech but I have not been able to make it work for tone detection.

This is what I am sending (with LUA).
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
play_and_detect_speech(custom/SD_select_payment_type.wav detect:unimrcp:unimrcpv2-azure {start-input-timers = false, no-input-timeout = 3000,recognition-timeout = 10000, speech-language = es-MX}builtin:dtmf/digits,builtin:speech/transcribe)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I can see the channel getting ready:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2020-06-18 14:12:52.607169 [INFO] mrcp_client_session.c:455 (ASR-55) Raise App Response ASR-55 <df2978773b54465b> [2] SUCCESS [0]
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1900 (ASR-55) RECOGNIZER channel is ready, codec = LPCM, sample rate = 8000
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1584 (ASR-55) CLOSED ==> READY
2020-06-18 14:12:52.607169 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1062 (ASR-55) channel is ready
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] switch_core_media_bug.c:970 Attaching BUG to sofia/internal/4003@nukaklabs.int:5060
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1465 (ASR-55) param = start-input-timers, val = false
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1465 (ASR-55) param = no-input-timeout, val = 3000
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1465 (ASR-55) param = recognition-timeout, val = 10000
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1465 (ASR-55) param = speech-language, val = es-MX
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:3201 (ASR-55) grammar = builtin:dtmf/digits,builtin:speech/transcribe, name =
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:3218 (ASR-55) Grammar is URI
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:3290 (ASR-55) grammar is text/uri-list
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2361 (ASR-55) Loading grammar 9a81e766-e8a2-4c18-831c-1427e9e21f2a, data = builtin:dtmf/digits,builtin:speech/transcribe
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2526 (ASR-55) Disabling all grammars
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2485 (ASR-55) Enabling grammar 9a81e766-e8a2-4c18-831c-1427e9e21f2a
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2848 (ASR-55) "recognition-timeout": "10000"
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2848 (ASR-55) "start-input-timers": "false"
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2848 (ASR-55) "speech-language": "es-MX"
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:2848 (ASR-55) "no-input-timeout": "3000"
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Then I can see it detects the DTMF but it is being ignored:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:3610 (ASR-55) RECOGNIZE IN PROGRESS
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] mod_unimrcp.c:1584 (ASR-55) READY ==> PROCESSING
2020-06-18 14:12:52.607169 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.607169 [DEBUG] switch_ivr_play_say.c:1492 Codec Activated L16@8000hz 1 channels 20ms
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:52.627166 [DEBUG] switch_core_io.c:448 Setting BUG Codec PCMU:0
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:59.587179 [DEBUG] switch_rtp.c:7963 RTP RECV DTMF 1:2080
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:59.587179 [DEBUG] mod_unimrcp.c:3463 (ASR-55) Queued DTMF: 1
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:59.587179 [INFO] switch_channel.c:522 RECV DTMF 1:2080
f4b31782-f311-41bf-b9f7-3d915cd46218 2020-06-18 14:12:59.587179 [DEBUG] switch_ivr_async.c:4537 (sofia/internal/4003@ @nukaklabs.int:5060) IGNORE NON-TERMINATOR DIGIT 1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Can anyone please suggest what I can check or what I am missing in the command or configuration?

Thank you!
 
Status
Not open for further replies.