Я использую vxml, работающий на движке, похожем на TellMe. Я добавил распознавание голоса в телефонные подсказки для системы голосовой почты. Новое меню сначала запросит у пользователя словесный ввод, и если совпадение не найдено или ввод не введен, пользователю снова предлагают варианты с тональным набором.
Оригинальные меню выглядят так:
<menu id="msgedit">
<prompt><enumerate><value expr="_prompt"/>press <value expr="_dtmf"/>.</enumerate></prompt>
<choice dtmf="9" next="#checkurgent">To deliver your message </choice>
<choice dtmf="7" next="#playmsg">To play your message </choice>
<choice dtmf="3" next="#rerecord">To discard your message and record over </choice>
<choice dtmf="2" next="#addtomsg">To add to your message </choice>
<choice dtmf="6" next="#testnumber">To enter a phone number where you may be reached </choice>
<choice dtmf="1" next="#cancel">To cancel making a message </choice>
<!-- handle no input/no match -->
</menu>
Новое меню выглядит так:
<form id="msgedit">
<field name="choice">
<prompt>
<if count == 0">
Please choose one of the following.
deliver, play back, rerecord, add to,
enter a callback number, or cancel.
<else/>
Please choose one of the following.
To deliver your message, press 9.
To play back your message, press 7.
To discard your message and rerecord, press 3.
To add to your message, press 2.
To enter a callback number, press 6.
To cancel your message, press 1.
</if>
</prompt>
</field>
<filled>
<if cond="choice == 'deliver' || choice == '9'">
<goto next="#checkurgent"/>
<elseif cond="choice == 'play' || choice == '7'"/>
<goto next="#playmsg"/>
<elseif cond="choice == 'rerecord' || choice == '3'"/>
<goto next="#rerecord"/>
<elseif cond="choice == 'add' || choice == 'add to' || choice == '2'"/>
<goto next="#addtomsg"/>
<elseif cond="choice == 'enter callback number' || choice == 'callback number' || choice =='6'"/>
<goto next="#testnumber"/>
<elseif cond="choice == 'cancel' || choice =='1'"/>
<goto next="#cancel"/>
<else/>
<throw event="nomatch"/>
</if>
</filled>
<!-- handle no input/no match -->
</form>
Однако я хочу использовать поведение <enumerate>
и <choice>
из исходного меню, чтобы перекомпоновывать вместо длинного текста (который слишком длинный и вызывает ошибку).
ЗДЕСЬ ВОПРОС: есть ли способ использовать первый стиль подсказки во втором стиле подсказки? Могу ли я положить и внутри поля? и как мне это сделать?