Example #1
0
        private void _gcTextToSpeech_SynthesizeSuccessEvent(PostSynthesizeResponse response)
        {
            /*
             * audioSource.clip = MC.GetAudioClipFromBase64(response.audioContent, Constants.DEFAULT_AUDIO_ENCODING);
             * audioSource.Play();
             */
            var myclip = MC.GetAudioClipFromBase64(response.audioContent, Constants.DEFAULT_AUDIO_ENCODING);

            NewAudio.Instance.PlayWord(myclip);
        }
        private void _gcTextToSpeech_SynthesizeSuccessEvent(PostSynthesizeResponse response)
        {
            audioSource.clip = _gcTextToSpeech.GetAudioClipFromBase64(response.audioContent, Constants.DEFAULT_AUDIO_ENCODING);
            audioSource.Play();

            // SAVE FILE TO LOCAL STORAGE

            /* ServiceLocator.Get<IMediaManager>().
            *       SaveAudioFileAsFile(response.audioContent,
            *                                               Application.dataPath,
            *                                               "sound_" + System.DateTime.Now.ToString(),
            *                                               Enumerators.AudioEncoding.LINEAR16); */
        }
 private void _gcTextToSpeech_SynthesizeSuccessEvent(PostSynthesizeResponse response)
 {
     audioSource.clip = _gcTextToSpeech.GetAudioClipFromBase64(response.audioContent, Constants.DEFAULT_AUDIO_ENCODING);
     audioSource.Play();
 }