private bool InitVoice() { #if USING_GCLOUDVOICE && UNITY_EDITOR m_gcloudVoiceMan = new Gcloud_VoiceMan(); bool ret = m_gcloudVoiceMan.Init(); if (ret) { m_OffLineVoice = new Gcloud_OffLineVoice(this, VoiceMode.OffLine); m_RealTimeVoiceNational = new Gcloud_RealTimeVoiceNational(this, VoiceMode.RealTimeVoiceNational); m_RealTimeVoiceTeam = new Gcloud_RealTimeVoiceTeam(this, VoiceMode.RealTimeVoiceTeam); m_TranslationVoice = new Gcloud_TranslationVoice(this, VoiceMode.Translation); } return(ret); #elif USING_LGVC m_lgvcVoiceMan = new GameObject("LGVC_VoiceMan").AddComponent <LGVC.LGVC_VoiceMan>(); bool ret = m_lgvcVoiceMan.Init(); if (ret) { m_OffLineVoice = new LGVC.LGVC_OffLineVoice(this, VoiceMode.OffLine); } return(ret); #else return(false); #endif }
public void Stop() { if (IsStarted) { LGVC_VoiceMan engine = _Manager.LGVC_VoiceMan; engine.Storage.UploadFileEvent -= OnUploadReccordFileComplete; engine.Storage.DownloadFileEvent -= OnDownloadRecordFileComplete; engine.OnPlayRecordFileComplete -= PlayRecordFileComplete; IsStarted = false; } }
public bool Start() { if (!IsStarted) { LGVC_VoiceMan engine = _Manager.LGVC_VoiceMan; engine.Storage.UploadFileEvent += OnUploadReccordFileComplete; engine.Storage.DownloadFileEvent += OnDownloadRecordFileComplete; engine.OnPlayRecordFileComplete += PlayRecordFileComplete; OnApplyMessageKeyComplete(0); IsStarted = true; } return(IsStarted); }