FlightControl-Master / MOOSE

Mission Object Oriented Scripting Environment (MOOSE) for lua mission scripting design in DCS World
http://flightcontrol-master.github.io/MOOSE/
GNU General Public License v3.0
292 stars 94 forks source link

STTS doesn't check if executable is find, causing CTD #2141

Closed docbrownd closed 3 weeks ago

docbrownd commented 3 weeks ago

Hi, we recently add a ctld script that use MOOSE STTS class. But we don't need DCS-SR-ExternalAudio.exe. When function try to execute STTS.TextToSpeech we have a game crash.

I check this class and it appear that executable is not check before.

is it possible to add a simple function that check if STTS.DIRECTORY and/or STTS.EXECUTABLE is find before try to use it ?

Thanks

Applevangelist commented 3 weeks ago

Sure - what are u using instead of DCS-SR-ExternalAudio.exe and how do you make Moose/DCS recognize that? The only other working option I know of is the rust server

Applevangelist commented 3 weeks ago

Moose checks that but I do not recognize the above variable names. being used be Moose. From Cirian's original script we only use STTS.getSpeechTime

docbrownd commented 3 weeks ago

Hi, this var are in STTS class (line 4132 to 4135 in moose 2.9.5 compil file : STTS={ ClassName="STTS", DIRECTORY="", SRS_PORT=5002, GOOGLE_CREDENTIALS="C:\\Users\\Ciaran\\Downloads\\googletts.json", EXECUTABLE="DCS-SR-ExternalAudio.exe" } STTS.DIRECTORY="D:/DCS/_SRS" STTS.SRS_PORT=5002 STTS.GOOGLE_CREDENTIALS="C:\\Users\\Ciaran\\Downloads\\googletts.json" STTS.EXECUTABLE="DCS-SR-ExternalAudio.exe"

We use this CTLD script : https://github.com/ciribob/DCS-CTLD/blob/master/CTLD.lua

in line 5655, ctld call this moose function : STTS.TextToSpeech(_shortMessage, _freq, _modulation, _volume, _name, _side, nil, 1, _gender, _culture, _voice, _googleTTS)

And we are a CTD crash with DCS-SR-ExternalAudio.exe not find windows exception.

I check TextToSpeech function, and see nothing about check if executable exists, only if os/io are available

Just we don't need TextToSpeech function, so for now we delete CTLD function about that, but i think it will be better if Moose check in TextToSpeech function if executable set is available

Thanks,

Applevangelist commented 3 weeks ago

Both of them belong to @ciribob and not to Moose. Sorry, mate.

Applevangelist commented 3 weeks ago

-> If you use Moose CTLD and Moose MSRS we're in a better position to help you