Recording Audio Text Files

Share |

Subscribe to Feed

PowerShell eBook
Sign up for
Your PowerTip of the Day:

Powershell Plus

13 Free SQL Tools from Idera

Free Ebook: Mastering Powershell

Did you know that PowerShell can record audio messages? All you need is some text. You can then turn the text into spoken language, convert it to a WAV file and play it back or send it to someone. Here’s how:

$Path = "$env:temp\file.wav"

Add-Type -AssemblyName System.Speech

$synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
$synthesizer.Speak('This is a recording.')
$synthesizer.Speak('Adding more to it')

# Play back the recorded file
Invoke-Item $Path

Twitter This Tip! ReTweet this Tip!

Posted Feb 22 2012, 06:00 AM by ps1
Copyright 2012 All rights reserved.