Get your computer to narrate a text file

Get your computer to narrate a text file

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
Regedit32 submitted a new article:

Get your computer to narrate a text file - Making user of Windows PowerShell and the SpeechSynthesizer Class

As alluded to in my article on the History of Windows PowerShell, one does not necessarily need to read everything the see. Instead, one can get the computer to read it for them.

There are many ways to approach this, and in the past a programmer would make use of the Windows COM object to access Microsoft's sapi.spvoice, which many of you will know as Microsoft David Desktop.

Windows PowerShell though, can make use of the SpeechSynthesizer Class to narrate text...

Read more about this article...
 

Ian

Administrator
Joined
Oct 27, 2013
Messages
1,736
Reaction score
630
Brilliant! I can't begin to tell you how helpful this will be for me :D. I've got a lot of scripts running on my PC, servers, etc... that I'm converting over to PowerShell - some of them have audio notifications, but this is far easier for me (as I can add dynamic audio notification that speak useful information).

I may have come across a problem in part of the article demo though - PowerShell doesn't seem to like it when I tried using single quotation marks like this:

$Narrator.Speak('Hello, I'll do the reading for you.')

I needed to use double quotation marks to get it working on my system:

$Narrator.Speak("Hello, I'll do the reading for you.")
 
Last edited:

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
Thanks for pointing that out Ian

That was my mistake - I should have typed speech marks there --- corrected now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top