Esempio n. 1
0
 public void SpeechPlay(string name)
 {
     Debug.LogError("==>Voice: SpeechPlay file name = " + name);
     if (string.IsNullOrEmpty(name))
     {
         name = "sp_ro";
     }
     Debug.LogError("==>Voice: SpeechPlay file exist is " + File.Exists(VoiceSDKManager.GetFilePath(name)));
     NativeCallManager.Native_PlayRecording(VoiceSDKManager.GetFilePath(name));
 }
Esempio n. 2
0
    public void SpeechRecordStart()
    {
        SoundManager.Instance.TurnOnOff2VoiceTalk(false);
        this.SpeechStopPlay();
        string filePath = VoiceSDKManager.GetFilePath("sp_ro");

        if (File.Exists(filePath))
        {
            File.Delete(filePath);
        }
        NativeCallManager.Native_StartRecording(VoiceSDKManager.GetFilePath("sp_ro"));
    }
Esempio n. 3
0
    public void SpeechPlay(byte[] msg, long uuid, Action actionStop)
    {
        if (msg.Length <= 10)
        {
            if (actionStop != null)
            {
                actionStop.Invoke();
            }
            return;
        }
        this.SpeechStopPlay();
        this.m_actionStop = actionStop;
        SoundManager.Instance.TurnOnOff2VoiceTalk(false);
        Debug.Log("***speech play, length = " + msg.Length);
        string unique_name = "sp_" + uuid;

        VoiceSDKManager.WriteBytes(VoiceSDKManager.GetFilePath(unique_name), msg);
        this.mIsInPlaying = true;
        NativeCallManager.Native_PlayRecording(VoiceSDKManager.GetFilePath(unique_name));
    }
Esempio n. 4
0
 public byte[] GetSpeech()
 {
     return(VoiceSDKManager.ReadBytes(VoiceSDKManager.GetFilePath("sp_ro")));
 }