GSL: Differences between Voicecenter 5.5 and Prophecy

Prophecy's semantic interpretation remains somewhat problematical at times. However, there's an issue with GSL semantic intepretation, one that can lead to hours of debugging, that I thought I might document.

Although I was testing on Prophecy, my client wanted to run the software on Voxeo's Voicecenter 5.5 system. I'd written the grammmars in XML format, and I'd used the usual W3C-style SIRS. Prophecy doesn't follow the W3 Semantic Interpretation for Speech Recogntion (SISR) specification, in that it doesn't use the "out" variable, doesn't support latest(), and some similar issues, but at least it supports standard ECMAScript.

When I converted to my W3 SISR semantic interpretation (SI) grammar to Nuance's GSL semantic interpretation, I ran into problems. I don't find GSL very intuitive, but it does work; the problem came when I tried to run my data. I'd included

<item>Sunday<tag><![CDATA[ <dayName "Sunday"> ]]></tag></item>

Later in the code I collect each dayName into an array, and I pass that array back to VoiceXML. The goal is for a caller to say "I can work on Sunday, Tuesday, and Thursday" while ASR reports "Sunday Tuesday Thursday" as the interpretation.

But the darn thing simply would not work. After hours of fooling around, I finally noticed, when using the DTMF version of the grammar, that the GSL intepreter complained that Sunday wasn't a legal variable. I went into the code and swapped "Sunday" for "'Sunday'"; that is, I put a set of apostrophes into the code to see if I could convince GSL to treat Sunday as a string. This worked.

When I ported this grammar for testing on Voicecenter 5.5, it failed. The extra apostrophes must be absent when using Voicecenter 5.5, and they must be present when using Prophecy.

I expect that I should also mention that I noticed other problems working with P2006's GSL. Maybe it's me, but when I tried to include a tag element at the end of the top-level rule, nothing happened. In fact I couldn't get any tag elements to work in the top-level rules; I happen to have used them successfully in non-Prophecy systems, and I suspect that something isn't quite right.

In summary: If you're wondering why GSL grammars that work on one system don't seem to work on the other, or if your old GSL skills don't seem to produce working code on P2006, the reason may be incompatibility between the old systems and P2006. On the other hand, frankly, there's no good reason I can think of to write new grammars using GSL SI. I use W3C SISR whenever I can, and I think it's well worth the trouble of migrating between versions when Prophecy begins to support the full W3C SISR SI.