我做了一个可以通过语音控制的游戏。为了将所有的语音命令转换为文本,我使用了IBM Cloud Speech To text服务。一切都完成了,除了它显示了错误的长度错误,正如您在图像中看到的那样。
这是语音转文本的代码:
###############################################
#### Initalize queue to store the recordings ##
###############################################
CHUNK = 1024
# Note: It will discard if th
我创建了一个带有Unity4.5.3f3版本的项目。我只写了一个简单的脚本如下:
using UnityEngine;
using System.Collections;
using SpeechLib;
public class SpeechTest : MonoBehaviour
{
private SpVoice voice;
void Start()
{
voice = new SpVoice();
voice.GetVoices("","");
}
// Update is
我发现在对话结束之前,用户必须做出响应是有限制的:
"Your response must occur within about 5 seconds or the Assistant assumes your fulfillment has timed out and ends your conversation."
但是,是否存在用户可以响应的最大值(输入语音)?我们希望允许更长的响应(然后访问响应文本)。
理想情况下,我们希望无限制的响应时间和能力,以访问原始输入(类型语音)时收到
如果我们可以从用户的回复中获取音频,那就太好了,但据我所知,这是不可能的。