"....or something" he said. (PowerShell sound & speech)

HAL.jpg

Tomorrow I am on holiday and have been handing a few things over to my colleague.  One task involved a PowerShell script for monitoring PowerShell jobs.  He said it would be good if there was an email notification or something when the jobs had finished. email notification... boring... Or something you say... hmmm

How about one of those PowerShell songs, when the jobs are finished.  I thought about it and realized this was a perfect match to his specification "or something".  With some internet searching, a like bit of copy and paste,  there is now a SoundsClips PowerShell module in the PSGallery with a few sound clips to help notify users when jobs finish.


install-module soundclips import-module soundclips

Get-SoundClipMissionImpossible Get-SoundClipCloseEncounter Get-SoundClipImperialMarch Get-SoundClipTetris  Get-SoundClipMario  Get-SoundClipHappyBirthday 

While searching for sound clips, I happened across some text to speech sample code. The gears started to turn.  A few minutes later... (I'm sure to the joy of my colleague) it was working.  I think all my PowerShell script messages from now on will include sound clips and speech.


Get-SpeakArray @('congratulations','you have successfully deployed stuff')

Get-SpeakWhatAreYouDoing

$voice = Get-SpeakInstalledVoices | select -Last 1 Get-SpeakArray @('you call that a parameter?','You are so close, dont give up now') -voicename $voice

I am sure you can see the value add here, with text to speech, priceless.  I am willing to guarantee there will be more snippets and functions added to this little gem. But for now, it's time for a holiday.  I hope someone else might find this module as entertaining as I have.  If you have some PowerShell sound scripts you want to be included, please don't hesitate to share below.