|
Post by keyspell on Nov 3, 2019 6:03:49 GMT -5
I have a really intractable problem. I cannot get the following run command to work:
run "C:\CereProc\txt2wav.exe "+" "+voicename$+" "+licname$+" "+inputname$+" "+outputname$
No errors are produced and the very simple program closes properly. A message appears to being produced on execution in a box masked by the main window display. No update occurs in the output file named as a parameter. I have tried chr$(34) and chr$(32) in place of the " " between parameters, to no good effect.
The full program list is as follows:
print "HELLO"
exename$="C:\CereProc\txt2wav.exe "
licname$="C:\CereProc\psk2_at_btinternet.com.004.lic"
outputname$="C:\CereProc\output-test.wav"
inputname$="C:\CereProc\input-file.txt"
voicename$="C:\CereProc\cerevoice_william_4.0.2_48k.voice"
'issue the run command
run exename$+" "+voicename$+" "+licname$+" "+inputname$+" "+outputname$, MINIMIZE print "WAITING FOR WAVE FILE PRODUCTION"
Timer 1000, [done]
wait
[done]
timer 0
'play the WAV file
playwave outputname$
print "COMPLETED"
end
Any assistance would be most gratefully appreciated.
Keyspell
|
|
|
Post by Rod on Nov 3, 2019 14:23:14 GMT -5
Print your run command statement instead of running it, do you see any spaces after the .exe? if so you must encase the whole following argument in quotes. The reason that it is failing is that Windows sees the " " space character as a terminator so your .exe never gets to see the argument.
so the argument after the .exe path needs to start and end with the quote character. It can have spaces in the middle but only if it is surrounded by quotes.
|
|
|
Post by Carl Gundel on Nov 4, 2019 0:53:48 GMT -5
Print your run command statement instead of running it, do you see any spaces after the .exe? if so you must encase the whole following argument in quotes. The reason that it is failing is that Windows sees the " " space character as a terminator so your .exe never gets to see the argument. so the argument after the .exe path needs to start and end with the quote character. It can have spaces in the middle but only if it is surrounded by quotes. That really depends completely on how the EXE interprets the contents of the command line.
|
|
|
Post by Rod on Nov 4, 2019 7:36:25 GMT -5
Try this,
run "C:\CereProc\txt2wav.exe "+chr$(34)+"C:\CereProc\output-test.wav C:\CereProc\input-file.txt C:\CereProc\cerevoice_william_4.0.2_48k.voice"+chr$(34)
If that fails, open the command line app and key your .exe and arguments
C:\CereProc\txt2wav.exe C:\CereProc\output-test.wav C:\CereProc\input-file.txt C:\CereProc\cerevoice_william_4.0.2_48k.voice
Does it work? if not you cant expect Liberty to make it work. Let us know how you get on. The command line app will report errors if there are any.
|
|
|
Post by keyspell on Mar 1, 2020 7:32:21 GMT -5
Thanks for the advice.
This works perfectly:
run exename$ + " " + voicename$ + " " + licname$ + " " + TTSFileName$ + " " + WAVFileName$ ', minimize
Best wishes and thank you for the assistance. Sorry for the delay in posting details of my success!
|
|
|
Post by sarossell on Mar 1, 2020 16:19:33 GMT -5
Glad to hear you got it to work.
I'm assuming however that your last message includes a typo...
run exename$ + " " + voicename$ + " " + licname$ + " " + TTSFileName$ + " " + WAVFileName$ ', minimize
There seems to be only one single quote (') at the end before ", minimize"?
:@)
|
|
|
Post by tsh73 on Mar 2, 2020 3:13:43 GMT -5
REMming out the rest of the line?
|
|
|
Post by sarossell on Mar 2, 2020 3:32:51 GMT -5
REMming out the rest of the line? D'oh! Of course.
|
|