Skip to content

Instantly share code, notes, and snippets.

@afriza
Last active August 30, 2022 10:54
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 afriza/3df31277015fb20edadef91cfea6222a to your computer and use it in GitHub Desktop.
Save afriza/3df31277015fb20edadef91cfea6222a to your computer and use it in GitHub Desktop.
wsay wrapper for MSYS2 (e.g. Git Bash from Git for Windows)
#!/bin/sh
# use Indonesian voice
v=$(say -v \? | grep id_ID | head -n1 | cut -d " " -f1)
say -v "$v" "$@"
echo off
rem Use a specific voice. Use the voice number from `wsay --list_voices`.
wsay -v 7 "%*"
#!/bin/sh
text=$@
wsay -v 7 "$text"
  1. download wsay.exe from https://github.com/p-groarke/wsay/releases/latest
  2. put wsay.exe and say.cmd inside C:\Program Files\Git\cmd
  3. put wsay.exe and say.sh (can be renamed to say) inside C:\Program Files\Git\usr\bin
  4. from VS Code, use Git Bash to run scripts and call say.sh some text
  5. or call say some text from Windows' Command Prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment