I frequently use Windows Visual Basic scripts to implement speech output from my programs (Windows 7).
For example, I will dynamically generate and execute a script similar to the following:
Set MyVoice = CreateObject("Sapi.SpVoice") MyVoice.Speak "hello everybody" MyVoice.Speak "I hope you are having a nice day"
this script can be executed from a Windows command line in any number of ways:
C:> start sayhello.vbs
(where sayhello.bat contains the line “start sayhello.vbs”)
I HAVE been able to run batch files successfully as the “then” part of openhab rules by using executeCommandLine, for example:
//this works as expected executeCommandLine("C:\\users\\Joe\\server\\openhab2\\x10batchfiles\\change_bedroom_drapes.bat")
However, I have NOT been able to generate speech successfully using Visual Basic scripts in openhab. Here are some of the things I’ve tried with the openhab log messages:
executeCommandLine("C:\\users\\Joe\\server\\openhab2\\vbsbatchfiles\\sayhello.vbs") java.io.IOException: Cannot run program "C:\users\Joe\server\openhab2\vbsbatchfiles\sayhello.vbs": CreateProcess error=193, %1 is not a valid Win32 application executeCommandLine("C:\\users\\Joe\\server\\openhab2\\vbsbatchfiles\\start@@sayhello.vbs") java.io.IOException: Cannot run program "C:\users\Joe\server\openhab2\vbsbatchfiles\start": CreateProcess error=2, The system cannot find the file specified executeCommandLine("C:\\users\\Joe\\server\\openhab2\\vbsbatchfiles\\sayhello.bat") //the batch file gets run successfully (no openhab complaints) but I don't hear anything.
Does anyone have a suggestion for getting this to work?
Thanks in advance.
PS: I know about the TTS voice services but I want to implement speech generation that will work even when I lost Internet access.