Source: answers.unity3d.com --- Friday, September 29, 2017
I'm trying to implement text to speech through eSpeak into Unity (I'm on Windows). I've imported the eSpeak files into unity and I've made a script that I want to play the sound. This is what it looks like: import System.Diagnostics; var speak = "Hello"; function Start () { var proc = new Process(); proc.StartInfo.FileName = "eSpeak/command_line/espeak.exe -s80 "+speak; proc.Start(); } Whenever I run it, I get the error "Win32Exception: The system cannot find the file specified." I tried it without the tags and it still doesn't work, so it might have to do with the path. The eSpeak folder is in the Assets folder and not any subfolders, and I tried putting in the full path from C:/, but that didn't work either. I'd appreciate any help. **Edit:** I tried this instead: import System.Diagnostics; var speak = "Hello"; function Start () { System.Diagnostics.Process.Start(Application.dataPath + "/eSpeak/command_line/espeak.exe); } It worked, but if I add the tags to the end of the path, it doesn't. Is there a way to get the tags to also work? ...
from Windows http://ift.tt/2kahUTX
No comments:
Post a Comment