VoiceXML可以使用预先录制的音频播放变量吗? [英] Can VoiceXML use pre-recorded audio to play variables?

查看:105
本文介绍了VoiceXML可以使用预先录制的音频播放变量吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

E.g。 "你的cccount余额是$ {variable}"。

解决方案

你好Santhana,


它通常不是将预先录制的音频用于变量是个好主意,特别是对于货币价值。 最好是使用专业人才录制您的音频。 要记录覆盖所有变化所需的提示量,对于如此小部分的应用来说,这将是非常昂贵的。


这就是说,这是可能的。 您需要能够访问变量中的内容,以了解您想要提取的音频。 我会用PHP来完成这个。


< var name =" balance" expr =" 123.45" />

< submit next =" output.php" namelist =" balance" />


output.php:

<?php

header(" Content-类型:text / xml");
$
echo"<?xml version = \" 1.0 \"?>" ;;


balance = str_replace("。"," _",


_GET ['balance']);

?>



< vxml version =" 2.0">

  < form>

    < var name =" balance" EXPR = QUOT;< =

E.g. "Your caccount balance is ${variable}".

解决方案

Hi Santhana,

It usually isn't a good idea to use pre-recorded audio for variables, especially for monetary values.  It's best if you use professional talent to record your audio.  To record the amount of prompts necessary to cover all variations would be very expensive for such a small portion of the application.

That said, it would be possible.  You would need to be able to access what's within the variable to know which audio you would want to pull up.  I would use PHP to accomplish this.

<var name="balance" expr="123.45"/>
<submit next="output.php" namelist="balance"/>

output.php:
<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>";


balance = str_replace(".", "_",


_GET['balance']);
?>

<vxml version="2.0">
  <form>
    <var name="balance" expr="<?=


这篇关于VoiceXML可以使用预先录制的音频播放变量吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆