概要
「Speech And Text in Unity iOS and Unity Android」を
Unity プロジェクトに導入することで
iOS / Android で音声合成(TextToSpeech)使用できるようになります
使い方
using TextSpeech; using UnityEngine; public class Example : MonoBehaviour { private void Start() { var textToSpeech = TextToSpeech.Instance; // 設定 textToSpeech.Setting ( language: "ja_JP", _pitch: 1, _rate: 1 ); // 再生 textToSpeech.StartSpeak( "ピカチュウ" ); // 停止 // textToSpeech.StopSpeak(); } }