Last active
October 23, 2025 21:23
-
-
Save rodcordeiro/b33decdc547b7d7c129eb1b120ea0e15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Invoke-TextToSpeech { | |
| param( | |
| [Parameter(Mandatory, ValueFromRemainingArguments)] | |
| [string[]]$texto | |
| ) | |
| begin { | |
| Add-Type -AssemblyName System.speech | |
| $narrador = New-Object System.Speech.Synthesis.SpeechSynthesizer | |
| } | |
| process { | |
| $narrador.Speak($texto -join " ") | |
| $narrador.Dispose() | |
| } | |
| } | |
| Set-Alias tts Invoke-TextToSpeech | |
| $Host.UI.RawUI.BackgroundColor = "Green" | |
| $Host.UI.RawUI.ForegroundColor = "White" | |
| Clear-Host # Clears the console to apply the new background color | |
| tts Esse é o script do meu pau! | |
| tts Viu que legal? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment