voicexml的menu例子

本文介绍了一个使用VXML实现的电话菜单系统示例,该系统通过语音提示用户选择新闻、体育或天气预报等选项,并根据用户的输入跳转到相应的语音反馈表单。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

例子来源:http://www.optimsys.cz/support/examples/example12.php
主要的menu的应用
menu下有choice,根据按dtmf值或者说出的值进行选择哪个choice,然后跳转到相应的form,执行form里的语音


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">

<meta name="description" content="menu example"/>
<meta name="author" content="OptimSys, s.r.o., Czech Republic (http://www.optimsys.cz)"/>
<meta name="copyright" content="free for any purpose"/>

<menu dtmf="true">
<prompt>
Welcome to main menu. Say the name of the required section or
<enumerate>
press <value expr="_dtmf"/> for <value expr="_prompt"/>,
</enumerate>
</prompt>
<choice next="#news">
news
</choice>
<choice next="#sport">
sport
</choice>
<choice next="#weather">
weather forecast
</choice>

<noinput> Please say one of <enumerate/> </noinput>
<nomatch> I don't understand you. Please say one of <enumerate/> </nomatch>
</menu>

<form id="news">
<block> Welcome to news. Nothing is here for now. </block>
</form>

<form id="sport">
<block> Welcome to sport section. Nothing is here for now. </block>
</form>

<form id="weather">
<block> Welcome to weather forecast. Weather will be either nice or bad. </block>
</form>

</vxml>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值