Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use it in Unity 2018 #1

Open
TheBricktop opened this issue Dec 21, 2018 · 0 comments
Open

Trying to use it in Unity 2018 #1

TheBricktop opened this issue Dec 21, 2018 · 0 comments

Comments

@TheBricktop
Copy link

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.");
        
        
       
    }
    
    
}

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant