![microsoft david desktop voice microsoft david desktop voice](https://64.media.tumblr.com/731c18716272fc62161784dc755949c0/tumblr_inline_ohz9rgSHa31szzyg3_1280.png)
Give it a shot and have some fun!īy default, you get the great sound of Microsoft David Desktop talking to you when use want PowerShell to speak to you. Dipping into the negative values will slow the voice down while proceeding towards 10 will speed the voice up. The default value at the time of object creation is 0.
![microsoft david desktop voice microsoft david desktop voice](https://i.stack.imgur.com/zliOe.png)
Rate is another property which can easily be adjusted based on your preference. Also note that the default value of this is 100. The accepted values are 0 –> 100 anything more or less will result in a error being displayed. It does exactly what you would think: adjusts the volume that will be used when speaking. The first property you can look at is Volume.
#Microsoft david desktop voice how to#
Now that we know how to let PowerShell speak to us, lets take a look at a few things we can do to adjust settings prior to using the Speak() methods. $speak.Speak("Would you like to play a game?")ĭon’t forget call Dispose() after your final call to Speak(), otherwise you will not be able to play the WAV file. $speak.SetOutputToWaveFile("C:\users\Administrator\Desktop\test.wav") But before that, we need to add the System.Speech assembly as it is not already loaded. Lets start digging into this by creating an object using the SpeechSynthesizer class. At the end I will point you towards a small function that I created which will allow you to easily send data to PowerShell which will then be spoken to you. But I won’t be touching that in this article but instead will be looking at the class instead. This is also one of many articles that I have had on the backburner while working things that I felt were more important to post, but felt like I had better get this out before I wait much longer.īack in the day, one would have looked towards using a COM object (sapi.spvoice) to make this happen. There are quite a few examples of this floating around and this is my turn at talking about it and showing what you can do as well as showing off one of my functions. Net classes to do things such as letting PowerShell talk to us. Besides using PowerShell for the usual work related things, we can also have some fun with it by tapping into various.