# # Function Create-spoken-WAV-file { param ($folder,$filename,$say) $Narrator.SetOutputToWaveFile($folder+'\'+$filename) $Narrator.Speak($say) } # Initialize speech synthesizer Add-Type -AssemblyName System.speech $Narrator = New-Object System.Speech.Synthesis.SpeechSynthesizer # Un-comment the next line to display a list of installed voices, available on your system. # $Narrator.GetInstalledVoices().voiceinfo|Out-GridView # display a list of all available voices # Un-comment only one of the following lines, to select the voice/language to use. # To use a voice, you must install that language, in Windows Region and language settings. # For a language to work, it must support "speech recognition". Additional languages are expected to be added in the future. # David and Zira are known to work most of the time on clients and servers, but only support english. $Narrator.SelectVoice("Microsoft David Desktop") # Microsoft David Desktop - English (United States) #$Narrator.SelectVoice("Microsoft Zira Desktop") # Microsoft Zira Desktop - English (United States) #$Narrator.SelectVoice("Microsoft Hazel Desktop") # Microsoft Hazel Desktop - English (Great Britain) #$Narrator.SelectVoice("Microsoft Hedda Desktop") # Microsoft Hedda Desktop - German #$Narrator.SelectVoice("Microsoft Hortense Desktop") # Microsoft Hortense Desktop - French # Initialize dictionary object $WhatToSay = @{} # Populate dictionary object with WAV filenames and the phrase to say in each file. # You can add/delete/change the list of WAV files and the phrases to say, if you need to. # --------------------------------------------------------------------------------------- $WhatToSay.Add('Lab-welcome-EN.wav', 'This is the welcome announcement, in English') $WhatToSay.Add('Lab-welcome-NO.wav', 'This is the welcome announcement, in Norwegian') $WhatToSay.Add('Lab-welcome-FI.wav', 'This is the welcome announcement, in Finnish') $WhatToSay.Add('Lab-welcome-SV.wav', 'This is the welcome announcement, in Swedish') $WhatToSay.Add('Lab-welcome-DA.wav', 'This is the welcome announcement, in Danish') $WhatToSay.Add('Lab-welcome-DE.wav', 'This is the welcome announcement, in German') $WhatToSay.Add('Demo-welcome.wav' , 'Welcome to your Zylinc solution. You can replace this audio file with another audio file of your choice.') $WhatToSay.Add('Lab-adhoc-welcome-EN.wav', 'This is the ad-hoc announcement for welcome, in English') $WhatToSay.Add('Lab-adhoc-welcome-NO.wav', 'This is the ad-hoc announcement for welcome, in Norwegian') $WhatToSay.Add('Lab-adhoc-welcome-FI.wav', 'This is the ad-hoc announcement for welcome, in Finnish') $WhatToSay.Add('Lab-adhoc-welcome-SV.wav', 'This is the ad-hoc announcement for welcome, in Swedish') $WhatToSay.Add('Lab-adhoc-welcome-DA.wav', 'This is the ad-hoc announcement for welcome, in Danish') $WhatToSay.Add('Lab-adhoc-welcome-DE.wav', 'This is the ad-hoc announcement for welcome, in German') $WhatToSay.Add('Lab-adhoc-queue-EN.wav', 'This is the ad-hoc announcement for queue, in English') $WhatToSay.Add('Lab-adhoc-queue-NO.wav', 'This is the ad-hoc announcement for queue, in Norwegian') $WhatToSay.Add('Lab-adhoc-queue-FI.wav', 'This is the ad-hoc announcement for queue, in Finnish') $WhatToSay.Add('Lab-adhoc-queue-SV.wav', 'This is the ad-hoc announcement for queue, in Swedish') $WhatToSay.Add('Lab-adhoc-queue-DA.wav', 'This is the ad-hoc announcement for queue, in Danish') $WhatToSay.Add('Lab-adhoc-queue-DE.wav', 'This is the ad-hoc announcement for queue, in German') $WhatToSay.Add('Lab-custom-new-calls-EN.wav', 'This is the custom announcement for new calls, in English') $WhatToSay.Add('Lab-custom-new-calls-NO.wav', 'This is the custom announcement for new calls, in Norwegian') $WhatToSay.Add('Lab-custom-new-calls-FI.wav', 'This is the custom announcement for new calls, in Finnish') $WhatToSay.Add('Lab-custom-new-calls-SV.wav', 'This is the custom announcement for new calls, in Swedish') $WhatToSay.Add('Lab-custom-new-calls-DA.wav', 'This is the custom announcement for new calls, in Danish') $WhatToSay.Add('Lab-custom-new-calls-DE.wav', 'This is the custom announcement for new calls, in German') $WhatToSay.Add('Lab-custom-returned-calls-EN.wav', 'This is the custom announcement for returned calls, in English') $WhatToSay.Add('Lab-custom-returned-calls-NO.wav', 'This is the custom announcement for returned calls, in Norwegian') $WhatToSay.Add('Lab-custom-returned-calls-FI.wav', 'This is the custom announcement for returned calls, in Finnish') $WhatToSay.Add('Lab-custom-returned-calls-SV.wav', 'This is the custom announcement for returned calls, in Swedish') $WhatToSay.Add('Lab-custom-returned-calls-DA.wav', 'This is the custom announcement for returned calls, in Danish') $WhatToSay.Add('Lab-custom-returned-calls-DE.wav', 'This is the custom announcement for returned calls, in German') $WhatToSay.Add('Lab-private-EN.wav', 'This is the private announcement, in English') $WhatToSay.Add('Lab-private-NO.wav', 'This is the private announcement, in Norwegian') $WhatToSay.Add('Lab-private-FI.wav', 'This is the private announcement, in Finnish') $WhatToSay.Add('Lab-private-SV.wav', 'This is the private announcement, in Swedish') $WhatToSay.Add('Lab-private-DA.wav', 'This is the private announcement, in Danish') $WhatToSay.Add('Lab-private-DE.wav', 'This is the private announcement, in German') $WhatToSay.Add('Lab-failover-open-EN.wav', 'This is the fail over queue open announcement, in English') $WhatToSay.Add('Lab-failover-open-NO.wav', 'This is the fail over queue open announcement, in Norwegian') $WhatToSay.Add('Lab-failover-open-FI.wav', 'This is the fail over queue open announcement, in Finnish') $WhatToSay.Add('Lab-failover-open-SV.wav', 'This is the fail over queue open announcement, in Swedish') $WhatToSay.Add('Lab-failover-open-DA.wav', 'This is the fail over queue open announcement, in Danish') $WhatToSay.Add('Lab-failover-open-DE.wav', 'This is the fail over queue open announcement, in German') $WhatToSay.Add('Lab-failover-closed-EN.wav', 'This is the fail over queue closed announcement, in English') $WhatToSay.Add('Lab-failover-closed-NO.wav', 'This is the fail over queue closed announcement, in Norwegian') $WhatToSay.Add('Lab-failover-closed-FI.wav', 'This is the fail over queue closed announcement, in Finnish') $WhatToSay.Add('Lab-failover-closed-SV.wav', 'This is the fail over queue closed announcement, in Swedish') $WhatToSay.Add('Lab-failover-closed-DA.wav', 'This is the fail over queue closed announcement, in Danish') $WhatToSay.Add('Lab-failover-closed-DE.wav', 'This is the fail over queue closed announcement, in German') $WhatToSay.Add('Lab-global-pickup-EN.wav', 'This is the global pickup announcement, in English') $WhatToSay.Add('Lab-global-pickup-NO.wav', 'This is the global pickup announcement, in Norwegian') $WhatToSay.Add('Lab-global-pickup-FI.wav', 'This is the global pickup announcement, in Finnish') $WhatToSay.Add('Lab-global-pickup-SV.wav', 'This is the global pickup announcement, in Swedish') $WhatToSay.Add('Lab-global-pickup-DA.wav', 'This is the global pickup announcement, in Danish') $WhatToSay.Add('Lab-global-pickup-DE.wav', 'This is the global pickup announcement, in German') $WhatToSay.Add('Lab-personal-pickup-EN.wav', 'This is the personal pickup announcement, in English') $WhatToSay.Add('Lab-personal-pickup-NO.wav', 'This is the personal pickup announcement, in Norwegian') $WhatToSay.Add('Lab-personal-pickup-FI.wav', 'This is the personal pickup announcement, in Finnish') $WhatToSay.Add('Lab-personal-pickup-SV.wav', 'This is the personal pickup announcement, in Swedish') $WhatToSay.Add('Lab-personal-pickup-DA.wav', 'This is the personal pickup announcement, in Danish') $WhatToSay.Add('Lab-personal-pickup-DE.wav', 'This is the personal pickup announcement, in German') $WhatToSay.Add('Lab-ivr-language-EN.wav', 'For English, press one. For Danish, press two. For Finnish, press three. For German, press four. For Norwegian, press five. For Swedish, press six.') $WhatToSay.Add('Lab-01-wait-for-service-engineer-EN.wav', 'Please wait. You will be transferred to the next service engineer that becomes available.') $WhatToSay.Add('Lab-01-wait-for-sales-representative-EN.wav', 'Please wait. You will be transferred to the next sales representative that becomes available.') $WhatToSay.Add('Lab-01-wait-for-accountant-EN.wav', 'Please wait. You will be transferred to the next accountant that becomes available.') $WhatToSay.Add('Lab-04-closed-yearly-team-building-EN.wav', 'We are closed for normal service requests today, because of our yearly team building event. For emergencies, you can use our alarm number: 12345678.') #You can un-comment the following lines, if you need to test, or experiment with, all available announcements in the Administration Portal: #$WhatToSay.Add('Lab-callback-EN.wav', 'This is the callback announcement, in English') #$WhatToSay.Add('Lab-ivr-settings-EN.wav', 'This is the IVR settings announcement, in English') #$WhatToSay.Add('Lab-digit-collection-EN.wav', 'This is the digit collection announcement, in English. Please use the keypad on your phone to enter your account number.') #$WhatToSay.Add('Lab-survey-info-EN.wav', 'This is the customer survey info announcement, in English') #$WhatToSay.Add('Lab-survey-prompt-EN.wav', 'This is the customer survey prompt announcement, in English') #$WhatToSay.Add('Lab-pre-position-EN.wav', 'This is the pre-position announcement, in English') #$WhatToSay.Add('Lab-position-one-EN.wav', 'This is the position announcement hashtag one, in English') #$WhatToSay.Add('Lab-position-n-one-EN.wav', 'This is the position announcement hashtag N part one, in English') #$WhatToSay.Add('Lab-position-n-two-EN.wav', 'This is the position announcement hashtag N part two, in English') #$WhatToSay.Add('Lab-estimated-wait-one-EN.wav', 'This is the estimated wait announcement hashtag one, in English') #$WhatToSay.Add('Lab-estimated-wait-two-EN.wav', 'This is the estimated wait announcement hashtag two, in English') # End of dictionary object population section # --------------------------------------------------------------------------------------- # To make the table of contents look nicer, sort dictionary object by Name (which contains the filenames) $WhatToSay=$WhatToSay.GetEnumerator()|sort -Property Name $targetfolder=([Environment]::GetFolderPath("Desktop")+"\WAV announcements") mkdir $targetfolder -force | out-null # Create all the WAV files foreach ($audiofile in $WhatToSay.GetEnumerator()) {Create-spoken-WAV-file $targetfolder $audiofile.Name $audiofile.Value} # Create table of contents file $tocfile=$targetfolder+"\Table of contents.txt" Write-Output "The following WAV files have been created in the folder $targetfolder"|out-file -FilePath $tocfile Write-Output $WhatToSay|out-file -Append -FilePath $tocfile # Display table of contents in Notepad and in the console notepad $tocfile type $tocfile # #