Skip to content

Instantly share code, notes, and snippets.

@co-devs
Last active April 15, 2024 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save co-devs/65e07160d46f76a2259dfad9f2cc3edb to your computer and use it in GitHub Desktop.
Save co-devs/65e07160d46f76a2259dfad9f2cc3edb to your computer and use it in GitHub Desktop.
Add-Type -AssemblyName System.Speech
$SpeechSynth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$CatFact = (ConvertFrom-Json (Invoke-WebRequest -Uri 'https://catfact.ninja/fact' -UseBasicParsing)).fact
$SpeechSynth.Speak("did you know?")
$SpeechSynth.Speak($CatFact)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment