espeak-ng-wrapper
espeak-ng-wrapper copied to clipboard
Trying to use it in Unity 2018
After Building and pasting both dll's to plugins im getting error about
Cannot access a closed Stream. System.IO.__Error.StreamIsClosed ()
My code goes like that `using System.Collections; using System.Collections.Generic; using System.IO; using ESpeakWrapper; using UnityEngine; //using UnityEngine.Windows.Speech;
public class WindowsSpeak : MonoBehaviour {
// Use this for initialization
void Start () {
var lines = new string[]
{
"Frankly, my dear, I don't give a damn.",
"Mama always said life was like a box of chocolates. You never know what you're gonna get.",
"Many wealthy people are little more than janitors of their possessions."
};
Client.SetVoiceByName("en");
Client.Initialize("Assets/Resources/espeak-ng-data");
}
// Update is called once per frame
void Update () {
if (Input.anyKey)
{
Client.Speak("Frankly, my dear, I don't give a damn.");
}
}
} `