gpt4 book ai didi

mysql - 如何在 VXML 中使用小数

转载 作者:行者123 更新时间:2023-11-29 19:44:10 26 4
gpt4 key购买 nike

我正在尝试做一个应用程序来监听一个名字和两个成绩,制作成绩的媒体,然后将其保存在 mysql 数据库中。我无法使应用程序识别十进制成绩(葡萄牙语)。这是我的实际代码:

 <?xml version="1.0" encoding="utf-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" xml:lang="pt-BR">
<var name="media"/>
<form id="selecionar">
<field name="Selecao">
<prompt>
Voce gostaria de registrar ou consultar?
</prompt>
<grammar xml:lang="pt-BR" root="myrule">
<rule id="myrule">
<one-of>
<item> Registrar </item>
<item> Consultar </item>
</one-of>
</rule>
</grammar>
<filled>
<if cond="Selecao=='Registrar'">


<goto next="#nome"/>
<elseif cond="Selecao=='Consultar'" />
<prompt>
Você escolheu consultar.
</prompt>
</if>
</filled>
</field>
</form>
<form id="escolha">
<field name="escolhas">
<prompt>
Voce gostaria de fazer outra tarefa?
</prompt>
<grammar xml:lang="pt-BR" root="myrule2">
<rule id="myrule2">
<one-of>
<item> Sim </item>
<item> Nao </item>
</one-of>
</rule>
</grammar>
<filled>
<if cond="escolhas=='Sim'">
<goto next="#selecionar"/>
<elseif cond="escolhas=='Nao'" />
<prompt> Adeus. </prompt>
</if>
</filled>
</field>


</form>

<form id="nome">
<field name="nomealuno" grammar="pt-BR">
<prompt>
Qual o nome do aluno?
</prompt>
<grammar type="application/x-gsl">

<![CDATA[

NAME
[[alberto] {return("alberto ")}
[gabriele] {return("gabriele ")}
[luiz] {return("luiz ")}]

]]>
</grammar>
<filled namelist="nomealuno">
<prompt> O nome dito foi <value expr="nomealuno"/> </prompt>
<break strength="weak" time="1s" />
<goto next="#notaum"/>
</filled>
</field>
</form>
<form id="notaum">
<field name="notaum" slot="mySlot">
<prompt>
Qual a primeira nota?
</prompt>

<filled namelist="notaum" grammar="pt-BR" type="number">
<prompt> A nota dita foi <value expr="notaum"/> </prompt>
<goto next="#escolha"/>
</filled>
</field>
</form>
</vxml>

最佳答案

您可以使用星号键 (*) 作为十进制。

由于您使用的是内置语法:

<filled namelist="notaum" grammar="pt-BR" type="number">

检查 VXML 2.0 spec - Appendix P 中的内置语法“number” .

关于mysql - 如何在 VXML 中使用小数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41154450/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com