Search notes:

Microsoft Speech Object Library

The Speech Object Library seems to be implemented by %SYSTEMROOT%\System32\Speech\Common\sapi.dll.

Saying something

The following simple PowerShell statements make the computer say hello world.
$sapi = new-object -comObject sapi.spVoice
$null = $sapi.speak('Hello world')
It is also possible to say something with VBScript:
option explicit

dim sapi
set sapi = createObject("sapi.spVoice")
sapi.speak("Hello world.")

Speak text in German

The following PowerShell snippet says something in German:
$text = 'Guten tag'

$sapi = new-object -comObject sapi.spVoice

$germanWasFound = $false
foreach ($voice in $sapi.getVoices()) {
   if ($voice.GetDescription() -like "*- German*") { 
      $sapi.voice = $voice
      $null = $sapi.speak($text)
      $germanWasFound = $true
      break
   }
}
if (-not $germanWasFound) {
   write-host "The german voice does not seem to be installed"
}

See also

Useful COM object libraries
The .NET class System.Speech.Synthesis.SpeechSynthesizer

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758198907, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/development/COM/Useful-object-libraries/Microsoft-Speech/index(75): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78