質問

I want to use two exceptions.

the first: The user can say (every time, in the whole application) "stop" and then the program exits.

the second:

I have following Code:

<form id="test">    
    <field name="test1">        
        <prompt bargein="true" bargeintype="hotword" > choose xy</prompt>
        <grammar root="main" version="1.0" xml:lang="de-DE">
            <rule id="main" scope="public">
                    <one-of>
                    <item>1</item>
                    <item>2</item>
                    <item>3</item>
                    </one-of>
            </rule>
        </grammar>




        <nomatch>
                    didn't get it
        <reprompt/>
            </nomatch>

        <noinput> 
            didn't hear you ?
        <reprompt/>
        </noinput>


        <filled>

            <assign name="myvar" expr="test1" />
            <value expr="myvar"/> chosen
        </filled>

        </field>


    </form>

I want that the user can say a word of my choice, and then a help-exception triggers - like

choose the following: x,y,z,...

how can i use such a exception handler?

thanks

役に立ちましたか?

解決

I solved it like this:

I added an item:

<item>help</item>

and checked if the item was chosen:

 <filled>

            <if cond="test1 == 'help'">
                <prompt>say xy.</prompt>
                <goto next="#test" />

            </if>


                        <assign name="myvar" expr="test1" />
                         <value expr="myZeitraum"/> chosen.
                        <goto next="#KPI" />
                </filled>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top