Skip to content

Instantly share code, notes, and snippets.

@MingweiSamuel
Created December 8, 2019 20:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MingweiSamuel/ca102891ae3b857535e7b1a07313b57b to your computer and use it in GitHub Desktop.
Save MingweiSamuel/ca102891ae3b857535e7b1a07313b57b to your computer and use it in GitHub Desktop.
Text-to-Speech for League of Legends streaming

Run this powershell script. In-game, you can type /n <your text here>. This writes a note to MyNotes.txt, which is read by the script and spoken outloud. Useful for streaming without a mic or talking to yourself when you're lonely.

Add-Type -AssemblyName System.Speech
$SS= New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
$SS.SelectVoice("Microsoft Zira Desktop")
# $SS.Rate = 0 # -10 to 10
# $SS.Volume = 50 # max 100
Get-Content "C:\Riot Games\League of Legends\MyNotes.txt" -Tail 1 -Wait | ForEach-Object -Process { $SS.Speak($_) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment