Home > PowerShell > PowerShell: Text to Voice conversion

PowerShell: Text to Voice conversion


Today, while playing with PowerShell, I came across a interesting COM object “SAPI.SpVoice”. Using this object you can convert given text stream to voice.

Sample script:

[PS] C:>(new-object -com SAPI.SpVoice).speak(“Sitaram Pamarthi”)

Usage:

Copy this sample script into powershell window and switch ON your speakers/head phones. You can listen to the voice conversion of text you entered. You can explore more options of this by going through it’s properties and methods, (new-object -com SAPI.SpVoice) | get-member.

Happy Learning…,
Sitaram Pamarthi

Categories: PowerShell
  1. D_Ramesh
    November 10, 2009 at 3:11 am | #1

    Interesting .. I would explore .. Thanks

  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>