VoiceXML 如何指定 TTS 重复值的方式

发布于 2024-08-06 02:54:14 字数 1138 浏览 2 评论 0原文

我在让语音浏览器将我的字段值重复为一系列数字而不是大的多位数字时遇到问题。例如,我的字段将使用“数字”或“数字”类型收集输入 - 在本例中它是一个传输扩展。在填充部分中,我将收集到的值重复回来。听到的分机号 2345 不是“2-3-4-5”,而是“2345”。

如何按顺序重复该值?我尝试指定“say-as”标签,但无济于事。下面是我尝试使用的代码:

<field name="extension" type="digits?length=4">
  <prompt bargein="false">
    Please dial in or say the extension of the <value expr="application.extensionValues" /> you are trying to reach.
  </prompt>
  <grammar type="application/x-nuance-gsl">
    [ dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0 ]
  </grammar>    
  <grammar type="application/x-nuance-gsl">
    [ one two three four five six seven eight nine ]
  </grammar>    
</field>

<filled>
  <prompt>
    I received extension number <say-as interpret-as="vxml:number"><value expr="extension"/></say-as>.  Transfering you now.
  </prompt> 
</filled>

编辑 1

是的,我使用的平台是“BeVocal Cafe”开发环境。我将其 IVR 指向一个存储 vxml 脚本的 URI。

不幸的是你的建议对我不起作用。我试图将解释为值更改为“电话”,但解释器不理解并出错。我尝试使用看起来更像我想要的“字符”,虽然没有错误,但解释器日志指出解释为值是“未知”

I am having issues getting the voice browser to repeat my field value as a series of numbers rather than a large multi-digit number. For example, my field will collect the input using type 'digits' or 'numbers' - in this case it was a transfer extension. In the filled portion I have the collected value repeated back. Instead of hearing extension number 2345 spoken as '2-3-4-5' it is spoken as 'two thousand three hundred fourty five'.

How can I have the value repeated sequentially? I tried specifying a 'say-as' tag, but to no avail. Below is the code I attempted this with:

<field name="extension" type="digits?length=4">
  <prompt bargein="false">
    Please dial in or say the extension of the <value expr="application.extensionValues" /> you are trying to reach.
  </prompt>
  <grammar type="application/x-nuance-gsl">
    [ dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0 ]
  </grammar>    
  <grammar type="application/x-nuance-gsl">
    [ one two three four five six seven eight nine ]
  </grammar>    
</field>

<filled>
  <prompt>
    I received extension number <say-as interpret-as="vxml:number"><value expr="extension"/></say-as>.  Transfering you now.
  </prompt> 
</filled>

EDIT 1

Yes the platform I am using is the "BeVocal Cafe" development enviornment. I am pointing it's IVR to a URI where I have the vxml scripts stored.

Unfortunately your suggestion did not work for me. I attempted to change the interpret-as value to "telephone" and the interpreter did not understand and errored out. I attempted to use "characters" which looked more like what I wanted and while there was no error, the interpreter logs stated that the interpret-as value was 'unknown'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦里人 2024-08-13 02:54:14

say-as 标签是正确的选择。尝试将解释为属性更改为电话:
http://www.w3.org/TR /2005/NOTE-ssml-sayas-20050526/#S3.3

The say-as tag is the way to go. Try changing interpret-as attribute to telephone:
http://www.w3.org/TR/2005/NOTE-ssml-sayas-20050526/#S3.3

清浅ˋ旧时光 2024-08-13 02:54:14

这是带有适当 BeVocal 标记的代码。请注意,标记的实现取决于供应商,因此这是不可移植的。

<field name="extension" type="digits?length=4">
  <prompt bargein="false">
    Please dial in or say the extension of the <value expr="application.extensionValues" /> you are trying to reach.
  </prompt>
  <grammar type="application/x-nuance-gsl">
    [ dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0 ]
  </grammar>    
  <grammar type="application/x-nuance-gsl">
    [ one two three four five six seven eight nine ]
  </grammar>    
</field>

<filled>
  <prompt>
    I received extension number <say-as type="number:digits"><value expr="extension"/></say-as>.  Transfering you now.
  </prompt> 
</filled>

Here's your code with the appropriate BeVocal markup. Note that implementation of the tag is vendor-dependent, so this is not portable.

<field name="extension" type="digits?length=4">
  <prompt bargein="false">
    Please dial in or say the extension of the <value expr="application.extensionValues" /> you are trying to reach.
  </prompt>
  <grammar type="application/x-nuance-gsl">
    [ dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0 ]
  </grammar>    
  <grammar type="application/x-nuance-gsl">
    [ one two three four five six seven eight nine ]
  </grammar>    
</field>

<filled>
  <prompt>
    I received extension number <say-as type="number:digits"><value expr="extension"/></say-as>.  Transfering you now.
  </prompt> 
</filled>
dawn曙光 2024-08-13 02:54:14

我有类似的问题。但我通过将 say-as 类型设置为首字母缩略词来解决这个问题。这使得 IVR 能够逐个拼出数字。请注意,这是在 PlumVoice IVR 上进行的。我希望它对你有用。这是您修改后的代码。

<field name="extension" type="digits?length=4">
  <prompt bargein="false">
    Please dial in or say the extension of the <value expr="application.extensionValues" /> you are trying to reach.
  </prompt>
  <grammar type="application/x-nuance-gsl">
    [ dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0 ]
  </grammar>    
  <grammar type="application/x-nuance-gsl">
    [ one two three four five six seven eight nine ]
  </grammar>    
</field>

<filled>
  <prompt>
    I received extension number <say-as type="acronym"><value expr="extension"/></say-as>.  Transfering you now.
  </prompt> 
</filled>

I had a similar issue. But I got around it by setting the says-as type to acronym. This gets the IVR to spell out the digits one after the other. Please note that this was on PlumVoice IVR. I hope it works for you. This is your revised code.

<field name="extension" type="digits?length=4">
  <prompt bargein="false">
    Please dial in or say the extension of the <value expr="application.extensionValues" /> you are trying to reach.
  </prompt>
  <grammar type="application/x-nuance-gsl">
    [ dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0 ]
  </grammar>    
  <grammar type="application/x-nuance-gsl">
    [ one two three four five six seven eight nine ]
  </grammar>    
</field>

<filled>
  <prompt>
    I received extension number <say-as type="acronym"><value expr="extension"/></say-as>.  Transfering you now.
  </prompt> 
</filled>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文