Example #1
0
        public TTSCore(string config)
        {

            int ret = MSCDLL.MSPLogin(null,null,config);
            if (ret!=(int)ErrorCode.MSP_SUCCESS)
            {
                if (onErrorEvent!=null)
                    onErrorEvent.Invoke("登录出错."+ret);
            }
            else
            {
                active=true;
                //Debug.Print("登录成功");
            }
        }
Example #2
0
    public static string init_audio(string my_appid, string session_begin_params, byte[] AudioData)
    {
        //Debug.Log(Application.internetReachability);
        int res = MSCDLL.MSPLogin(null, null, my_appid);//用户名,密码,登陆信息,前两个均为空

        if (res != (int)Errors.MSP_SUCCESS)
        {//说明登陆失败
            Debug.Log("登陆失败!");
            Debug.Log(my_appid);
            Debug.Log("res:" + res);
            return(null);
        }
        //Debug.Log("登陆成功!");
        return(audio_iat(AudioData, session_begin_params));//开始处理音频
    }