using System; using System.Diagnostics; using UnityEngine; /// /// 文字转语音 /// public class TTS : MonoBehaviour { /// /// 语音合成的api地址 /// [SerializeField] protected string m_PostURL = string.Empty; /// /// 计算方法调用的时间 /// [SerializeField] protected Stopwatch stopwatch = new Stopwatch(); /// /// 语音合成,返回音频 /// public virtual void StartSpeak(string _msg,Action _callback) {} /// /// 停止语音合成 /// public virtual void StopSpeak() { } }