// Use this for initialization
    void Start()
    {
        // 全局单例来维护
        VoiceMgr.Init();
        VoiceMgr.SetCallback(OnResult);
        VoiceMgr.SetSpeakerErrorCallback(OnSpeechError);
        VoiceMgr.SetFlyJsonCallback(OnFlyJsonResult);
        VoiceMgr.SetSpeakerCallback(OnSpeakerCompleted);
        //VoiceMgr.SetOnVolumeCallback (OnMicroPhoneVolumeChanged);

        VoiceMgr.SetParameter("engine_type", "cloud");
        VoiceMgr.SetParameter("audio_format", "pcm");
    }
예제 #2
0
    void Awake()
    {
        PUtils ut = PUtils.GetInstance();

        Loom lm = Loom.Current;

        mNetMgr = NetMgr.GetInstance();
        mNetMgr.Init();

        mGameMgr = GameMgr.GetInstance();
        mGameMgr.Init();

        mRoomMgr = RoomMgr.GetInstance();
        mRoomMgr.Init();

        mVoiceMgr = VoiceMgr.GetInstance();
        mVoiceMgr.Init();

        mReplayMgr = ReplayMgr.GetInstance();
        mReplayMgr.Init();
    }