We’ve been asked to develope an application than can take letters as input based on italian city names pronouced by the callers (eg. “R” for ‘Roma’).
It’s the first time we use the Nuance ASR on Composer as it is freshly installed. I verified that using builtin grammars it actually works (eg. using “builtinNumber” I was able to detect numbers and store them in my output variable).
How can I build a proper grammar file in order to make Nuance ASR detect city names? Is there a specific grammar builder I can use? What is the correct Input block configuration when an external Grammar is being used? I’m referring to the samples provided in the Composer templates but I keep getting the “Speech Recognition Error was detected, Goodbye” message when I try to use the following grammar built with Composer:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
out='Ancona'
Ancona
out='Roma'
Roma
Well you won’t find such information on Composer as you are using a Nuance product. MCP is just a GW for it.
So you need to search for Nuance ASR samples. There is documentation for developers available at their site. Go for it, study it and practice a lot.
You can also ask into Nuance forums around.
Thanks for you reply, you’re always really helpful!
Sorry if I sound a little confused and maybe unprepared… that’s actually what I am because I’ve been recently assigned on this job with little to none knowledge about the matter, lot of work to do and no time to do it : :
So please, help me understand… I received a lot of different but conflicting advices on the ASR. As far as I can tell Nuance is the engine used both for TTS and ASR. TTS works fine through Composer, but, as far as I can tell, ASR miss the proper grammar file in order to recognize words.
I need to understand first if I have to build a grammar and if this grammar can be build via Composer Grammar builder or it needs something else (eg. a Nuance grammar builder?)
from your message it seems that Composer Grammar builder should do the work, right?
I already tried to build a simple grammar (the quoted one from my previous message) but if I set this resource in the Input block in Composer configured as follow I get the error “Speech Recognition Error was detected, Goodbye!”:
Check at Nuance logs to see why it is not accepting the ASR grammar.
If you built it with Composer Grammar Builder, don’t forget to click the Default option at the root. Otherwise you will need to specify the section as name.grxml#cities
Check the composer documentation.
I was reading wrong the configuration for the Input Block in the example “HandleNBest” and in general the usage for the shadow variables. Instead of using AppState.nameoftheblock$.utterance I was using AppState.nameofthevariable$.utterance.
Is it possible to collect more words at once and store them in the same utterance (eg. Roma Genova Torino Milano) or do I have to go back in the Input block for every word I want to collect?
I tried to pronounce three cities at once (in order: Ancona, Bari, Roma) but I only got Bari stored in the variable
For this application the Caller is asked to spell an alphanumeric code using city names in place of letters, so for example to get a code like GG12345FT8960 the Caller has to pronounce something like: “Genova Genova 1 2 3 4 5 Firenze Torino 8 9 6 0”
Then, using a script, the code is stored in a variable.
The problem there was that all rules were written between tags so once first word was captured all the other rules were ignored.
So using a WIP grxml file with only four rules (for letters A,B,C and D) I was able to detect all of them and stored all of them in the same variable at once.
However, this works only if I pronouce ALL of the letters…
If I pronounce only two of the letters the nomatch event is thrown.
It accept multiple input, no need to provide all inputs to work BUT it only accept inputs in order: if I pronounce “B, C” my variable is populated as AppState.Input = B C… on the other hand if I pronounce “C, B” my variable in only populated as AppState.Input = C. I cant figure out if there’s a way to go back to a previous rule.
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
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
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.
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.
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.