1、打开Nuance官网,注册并登陆
https://developer.nuance.com/public/index.php?task=home
2.下载app sample
3、主页-->My Account -->My Sandbox --> Sandbox Credentials
4、获取到沙盒认证信息
5、打开类Configuration,并重新配置里面的内容
6、填写信息过后的数据
代码:
public class Configuration {
//All fields are required.
//Your credentials can be found in your Nuance Developers portal, under "Manage My Apps".
public static final String APP_KEY = "73c883da2ab3b94ccad2ff03e390c2feab273a1d14eca327aeb0b754acc0d61f8859f9b20cb2fed784fdda678e9c6639c3a056d78df9ff3ba9b69055766674fe";
public static final String APP_ID = "NMDPTRIAL_1027437527_qq_com20170803021437";
public static final String SERVER_HOST = "sslsandbox-nmdp.nuancemobility.net";
public static final String SERVER_PORT = "443";
public static final String LANGUAGE = "eng-USA";
public static final Uri SERVER_URI = Uri.parse("nmsps://" + APP_ID + "@" + SERVER_HOST + ":" + SERVER_PORT);
//Only needed if using NLU
public static final String CONTEXT_TAG = "!NLU_CONTEXT_TAG!";
public static final PcmFormat PCM_FORMAT = new PcmFormat(PcmFormat.SampleFormat.SignedLinear16, 16000, 1);
public static final String LANGUAGE_CODE = (Configuration.LANGUAGE.contains("!") ? "eng-USA" : Configuration.LANGUAGE);
}
语音识别后的结果:
注:可以选择的语言:https://developer.nuance.com/public/index.php?task=supportedLanguages