microsoft speech - Delphijustin industries https://delphijustin.biz Making use out of things! Wed, 13 Oct 2021 16:25:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.9 https://delphijustin.biz/wp-content/uploads/2025/10/cropped-dongwa-192-32x32.png microsoft speech - Delphijustin industries https://delphijustin.biz 32 32 How to make the computer talk from any batch file https://delphijustin.biz/how-to-make-the-computer-talk-from-any-batch-file/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-make-the-computer-talk-from-any-batch-file https://delphijustin.biz/how-to-make-the-computer-talk-from-any-batch-file/#comments Sun, 05 Sep 2021 23:23:56 +0000 https://delphijustin.biz/?p=3850 It is possible to make the computer talk by a batch file or any windows program. All is needed is a tiny VBScript file that use Microsoft Speech API OLE Object. Also all sentences passed to the command must be surrounded with quotes. Otherwise it will not sound the best. You may download, copy, modify …

The post How to make the computer talk from any batch file first appeared on Delphijustin industries.

]]>
It is possible to make the computer talk by a batch file or any windows program. All is needed is a tiny VBScript file that use Microsoft Speech API OLE Object. Also all sentences passed to the command must be surrounded with quotes. Otherwise it will not sound the best.

You may download, copy, modify the VBScript file.

' delphijustin Say v1.0
' Website https://delphijustin.biz
Set sentences = Wscript.Arguments
if sentences.Count=1 then
if sentences(0)="/?" then
Wscript.Echo "Usage: "&Wscript.ScriptName&" <messages>"
Wscript.Quit 0
end if
end if
set sapi = CreateObject("SAPI.SpVoice")
For Each sentence In sentences
  sapi.Speak sentence, 0
Next
if sentences.Count=0 then
sapi.Speak "I don't know what to say.", 0
end if

The post How to make the computer talk from any batch file first appeared on Delphijustin industries.

]]>
https://delphijustin.biz/how-to-make-the-computer-talk-from-any-batch-file/feed/ 4