diff --git a/Scripts/speak-text.ps1 b/Scripts/speak-text.ps1 index 0dd7e88e..0cd32c16 100755 --- a/Scripts/speak-text.ps1 +++ b/Scripts/speak-text.ps1 @@ -13,8 +13,8 @@ try { $Text = read-host "Enter text to speak" } - $voice = New-Object ComObject SAPI.SPVoice - $voice.Speak($Text); + $Voice = new-object -ComObject SAPI.SPVoice + $Voice.Speak($Text); exit 0 } catch { write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"