" /> Nuance ASR Grammar on Composer - Genesys CTI User Forum

Author Topic: Nuance ASR Grammar on Composer  (Read 7531 times)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #15 on: June 21, 2019, 01:48:05 PM »
Advertisement
I have created other grammars as yours for recognition of stores names for example and their variations as spoken by users or street common names, and works fine.
So there must be something wrong at your Input. Show its properties.
Also, enable Nuance logs and check the ASR feature going on and check what is it recognizing

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #16 on: June 21, 2019, 04:18:04 PM »
Maybe what you can do is to make your Input max size as 1 and then grab the captured digit, store it to an accumulative var (c = c + captured) and then do a loop until the length of c is what you desire to be

Offline Sosy

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
Re: Nuance ASR Grammar on Composer
« Reply #17 on: June 21, 2019, 04:27:36 PM »
Hi Cavagnaro, following is the Input Block configuration:

[url=https://ibb.co/4J2MX9b][img width=491 height=480]https://i.ibb.co/PtM4P32/inputblock.jpg[/img][/url]

I should ask to client if the lenght of the code is going to be always the same... then if it is the case I can use a counter as you suggested... but I'm wondering if the looping logic will prevent to spell without the needs of a long or innatural pause between words.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #18 on: June 21, 2019, 06:16:22 PM »
I think fastest way would be to ask Genesys and Nuance if there is already a builtin grammar for that in your language...many vendors do have.
You will spend 3 days in that and move on your development in parallel.
About your concern, shouldn't happen as long as recognition is smooth...ideal world of course.


Another  option...go with google ASR
https://cloud.google.com/speech-to-text/?hl=es


And enable it on MCP
https://docs.genesys.com/Documentation/GVP/latest/GDG/CGCGC

Offline Sosy

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
Re: Nuance ASR Grammar on Composer
« Reply #19 on: June 26, 2019, 03:23:21 PM »
Hi cavagnaro,

seems like I finally did it...!

For future reference, here's the grxml I came up with:

[quote]
<?xml version="1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="it-IT" version="1.0" root="codice">


<!-- Reference by URI to a local rule -->
<rule id="codice" scope="public">
<one-of>
<item repeat="1-">
<item repeat="0-"><ruleref uri="#numeri" /></item>
<item repeat="0-"><ruleref uri="#lettere" /></item>
</item>
</one-of>
</rule>

<rule id="numeri" scope="private">
<one-of>
<item>Uno<tag>SWI_literal="1"</tag></item>
<item>Due<tag>SWI_literal="2"</tag></item>
<item>Tre<tag>SWI_literal="3"</tag></item>
ETC...
</one-of>
</rule>

<rule id="lettere" scope="private">
<one-of>
<item>Ancona<tag>SWI_literal="A"</tag></item>
<item>A<tag>SWI_literal="A"</tag></item>
<item>Bologna<tag>SWI_literal="B"</tag></item>
<item>Bari<tag>SWI_literal="B"</tag></item>
<item>Bi<tag>SWI_literal="B"</tag></item>
<item>Como<tag>SWI_literal="C"</tag></item>
<item>Ci<tag>SWI_literal="C"</tag></item>
ETC...
</one-of>
</rule>
</grammar>
[/quote]

I still have some problem tuning the recognizer... sometimes it ends the recognition even if I'm still talking, missing some letters, some other times it simply misinterprets the inputs. I'm currently working on the baseline.vxml file in the Nuance config folder... hope I'll be able to tune it better in the end.

Thank you for support!

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #20 on: June 26, 2019, 10:10:09 PM »
Nice! Thanks for sharing
Be sure to check your nuance logs to see what it is identifying. Also try to mess with the asr parameters at the VXML properties


Enviado de meu SM-G9650 usando o Tapatalk


Offline Sosy

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
Re: Nuance ASR Grammar on Composer
« Reply #21 on: July 11, 2019, 08:52:52 AM »
Hi, I'm back with another question...

We're discussing the possibility to let the customer enter its address using a speech input when this IS NOT STORED in the clients database.

However, as far as I can understand, this is not a job for ASR because If I can't tell what is the input to expect because I don't know the customer address, I wont be able to write a proper grammar.

I think in this case we should use a transcript engine... is that correct?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #22 on: July 11, 2019, 11:32:57 AM »
Correcr

Enviado de meu SM-G9650 usando o Tapatalk


Offline Sosy

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
Re: Nuance ASR Grammar on Composer
« Reply #23 on: July 15, 2019, 04:31:37 PM »
Hi Cavagnaro,

I'm still dealing with my ASR project... The grammar is currently working fine but it seems like no matter what parameter I'm playing with, it suddenly cease to listen to my speech (characters listing) even if I'm not finished. From what I can understand, it has something to do with the incomplete/complete timeout parameter that I'm trying to set to 5s. However, I noticed from MCP logs that when ASR is invoked it sets parameters using [b]MRCPv2ClientLibrary.C[/b] or, at least, it seems so.

[quote]2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D 6724 01C00000 CMASRSession.C:1101 CMASRSession::HandleASREvent, msgType = 800, m_nModifySent = 0, m_RecognizerState = 0, m_MediaState = 1
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D 6724 01C00000 CMASRSession.C:435 CMASRSession::SendASRLogQueue
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D 6724 01C00000 CMASRSession.C:2215 CMASRSession::LoadASR
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:1390 In ASR Set Params
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2Session.C:78 Checking the request for 13
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2Session.C:153 Getting the ASR state
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2Session.C:165 State is valid.
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:1425 Calling Translate ASR SetParam Args
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2432 Setting Language it-IT
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2440 Setting Incompletetimeout 1000
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2447 Setting Complete 1000
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2464 Adjusting MaxSpeechTimeout to 60000
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2472 Setting Sensitivity 40
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2479 Setting SpeedVSAccurarcy 50
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2493 Setting NBest  1
2019-07-15 16:33:12.564 DBUG 007A01D2-1000A36D-asr-default-2267 6724 06B00000 MRCPV2ClientLibrary.C:2508 Setting Confidence Threshold 50[/quote]

I can't find anything about this, do you know if it is a configuration file? If yes, where I can find it?

Thank you

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #24 on: July 15, 2019, 04:50:04 PM »
As told you before, check nuance logs


Enviado de meu SM-G9650 usando o Tapatalk


Offline Sosy

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
Re: Nuance ASR Grammar on Composer
« Reply #25 on: February 26, 2020, 06:41:13 PM »
Hi all,

I took up this old topic to ask you something about Nuance result sent to MCP and Composer.
We're tryng to deploya working application in the test environment to the production environment.
that is, in the production environment that's supposed to be configured exactly as the test one, do not work with the application and when the TTS is supposed to re-read what the client have spoken, it only says "Object Default".

What I can see is that when filling the recognition result in Composer, something differes between the two environments:

[quote]TEST Environment:
2020-02-26T17:14:02.230 Int 50076 014601E5-100046E7 400 filling :MSG_ASR_RICHIESTA_CONFERMA_spedizione.MSG_ASR_RICHIESTA_CONFERMA_spedizioneField:Field:CORRETTO

PRODUCTION Environment:
2020-02-26T16:37:02.258 Int 50076 012A01E5-10076C24 5300 filling :MSG_ASR_RICHIESTA_CONFERMA_spedizione.MSG_ASR_RICHIESTA_CONFERMA_spedizioneField:Field:{SWI_grammarName=session:0x0001609a;SWI_grammarName$={confidence=8400.000000};SWI_literal=CORRETTO;SWI_literal$={confidence=8400.000000};SWI_meaning=CORRETTO;SWI_meaning$={confidence=8400.000000}}

[/quote]

I already checked the Baseline.xml for Nuance, but they're identical...
What can be causing this issue?

Thanks in advance!

Offline Sosy

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
Re: Nuance ASR Grammar on Composer
« Reply #26 on: February 28, 2020, 01:46:31 PM »
Hi,
we solved the issue, seems like i was lookin at the wrong Baseline.xml. The right one was, indeed, wrong. For future reference:

To make the ASR service work correctly with GVP, must edit the Nuance Recognizer file baseline.xml. and comment out the fourth and fifth lines in the code sample below:
<param name="swirec_extra_nbest_keys">
<declaration group="result" type="string_set" set_by="default+api"> </declaration>
<value>SWI_meaning</value>
<value>[b]SWI_literal[/b]</value>
<value>[b]SWI_grammarName[/b]</value>
</param>
The characters to add to the code are marked in bold.

Thanks!

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Nuance ASR Grammar on Composer
« Reply #27 on: February 28, 2020, 01:48:18 PM »
Weird, maybe you were sending the object and not the out property?


Enviado de meu SM-N9600 usando o Tapatalk