我做了一个可以通过语音控制的游戏。为了将所有的语音命令转换为文本,我使用了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