首页 > 解决方案 > 能够将语音菜单选项与使用 VoiceXML 和 Plum Voice 录制音频合并

问题描述

我正在尝试实现与VoiceXML Record 整个通话相同的问题,简而言之,包括菜单选项,有 VoiceXML Record 整个通话,同时还包括菜单选项。我需要这样做是 PlumVoice 并且根据建议需要寻找供应商扩展(如果可用)。

我试图寻找供应商扩展,但没有找到。我对 VoiceXML 相当陌生。是否有人熟悉 PlumVoice(版本 3.2.8)是否可以做到这一点?

基本上合并了这两个代码块:用户可以使用语音模式说出菜单选项,但也可以将整个音频录制为 wav 文件。

语音菜单选择

<?xml version="1.0"?>
<vxml version="2.0">
<form id="mainmenu">
  <field name="menuchoice">
    <grammar type="application/x-jsgf" mode="voice">
      one|two|three
    </grammar>
      <prompt>
        For sales, say 1.
        For tech support, say 2.
        For company directory, say 3.
      </prompt>
      <filled>
        <if cond="menuchoice=='one'">
          Welcome to sales.
        <elseif cond="menuchoice=='two'"/>
          Welcome to tech support.
        <elseif cond="menuchoice=='three'"/>
          Welcome to the company directory.
        </if>
      </filled>
  </field>
</form>
</vxml>

录制音频输入

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <record name="myrecording" type="audio/x-wav" beep="true">
      <prompt>
        Please record a message after the beep.
      </prompt>
​
      <filled>
        You just recorded the following message:
        <value expr="myrecording"/>
        <submit next="submitrecording.php" namelist="myrecording"
        method="post" enctype="multipart/form-data"/>
      </filled>
    </record>
  </form>
</vxml>

这可以通过 PlumVoice(版本 3.2.8)供应商扩展实现吗?

标签: voicexmlplumvoice

解决方案


它不是标准的 VoiceXML 功能(不属于 VoiceXML 标准)。

只有一些像 Voximal 这样的 VoiceXML 解释器可以通过添加额外的属性(例如属性记录话语)来做到这一点。


推荐阅读