Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I figured it out. I changed my grammar to look like this:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;grammar xmlns="http://www.w3.org/2001/06/grammar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd" xml:lang="en" version="1.0" mode="voice" scope="dialog" tag-format="semantics/1.0-literals"&gt; &lt;rule id="keep"&gt; &lt;one-of&gt; &lt;item&gt;&lt;ruleref id="#exit"/&gt;&lt;/item&gt; &lt;item&gt;&lt;ruleref id="#play"/&gt;&lt;/item&gt; &lt;/one-of&gt; &lt;/rule&gt; &lt;rule id="exit"&gt; &lt;one-of&gt; &lt;item&gt;exit&lt;/item&gt; &lt;item&gt;exit the system&lt;/item&gt; &lt;/one-of&gt; &lt;tag&gt;out.result = "exit"&lt;/tag&gt; &lt;/rule&gt; &lt;rule id="play"&gt; &lt;one-of&gt; &lt;item&gt;play&lt;/item&gt; &lt;item&gt;play back&lt;/item&gt; &lt;/one-of&gt; &lt;tag&gt;out.result = "play"&lt;/tag&gt; &lt;/rule&gt; &lt;/grammar&gt; </code></pre> <p>Then, back in my script instead of basing my actions on callerInput (the variable specified in the <code>&lt;field&gt;</code> tag), i based them off of callerInput$.interpretation which holds xml containing whatever i assigned out.result to in the <code>&lt;tag&gt;</code> element of the grammar.</p> <p>I guess it makes sense to base your actions on the "interpretation" and not the caller's literal input.</p> <p>NOTE: Because we are working with our own vxml engine we were able to create a method for extracting the interpretation value out of the xml.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload