VRCWizard / TTS-Voice-Wizard

Speech to Text to Speech. Song now playing. Sends text as OSC messages to VRChat to display on avatar. (STTTS) (Speech to TTS) (VRC STT System) (VTuber TTS)
https://TTSVoiceWizard.com
MIT License
595 stars 67 forks source link

TTSVoiceWizard is looking for assets not in its own directory #49

Closed Naveandice closed 1 year ago

Naveandice commented 1 year ago

Greetings! Just upgraded to version 1.5.1.7 and tried to use Text-to-Speech in System Speech mode, the program crashes after the second use. Crash dumps didn't appear in the program directory. Using Event Viewer, it turned out that TTSVoiceWizard crashes with an error System.IO.DirectoryNotFoundException, trying to find assets not in its own directory, but in the directory of the voice used. Here are the general details straight from the Event Viewer:

Event 1026, .NET Runtime ``` Application: TTSVoiceWizard.exe CoreCLR Version: 6.0.1823.26907 .NET Version: 6.0.18 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Speech2Go Voice Package\x64\Assets\sounds\TTSButton.wav'. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.File.OpenRead(String path) at NAudio.Wave.WaveFileReader..ctor(String waveFile) at OSCVRCWiz.Resources.Audio.AudioDevices.PlaySoundAsync(String soundName) in {Filtered}\OSCVRCWiz\Resources\Audio\AudioDevices.cs:line 483 at System.Threading.Tasks.Task.<>c.b__128_1(Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback() ``` _Excluded some part of the path for privacy reasons._
VRCWizard commented 1 year ago

For now you could try running TTS Voice Wizard as administrator, or moving it's entire folder to a new location.

or if those fail you could just try turning off button sounds image

Other than that, next update I'll make all applicable locations use absolute paths rather than relative paths (that don't seem to always return the correct path). Also, exception handling for the button sounds.

Naveandice commented 1 year ago

Running as administrator and moving (copying) to a new location causes the same error, so I just turned off the button sounds. Thanks!

Naveandice commented 1 year ago

Updated to 1.5.4, now everything works as intended. Thank you very much once again!