Skip to content

Instantly share code, notes, and snippets.

@raven-rock
Created January 27, 2020 22:59
Show Gist options
  • Save raven-rock/5fa17b77fb24574479efed633e720e60 to your computer and use it in GitHub Desktop.
Save raven-rock/5fa17b77fb24574479efed633e720e60 to your computer and use it in GitHub Desktop.
say.sh - a cheap knockoff of macOS say - using flite
#!/usr/bin/env bash
# This is a cheap way to do like macOS say command in Linux
# Put this in /usr/local/bin/say or somewhere on your $PATH
# Install flite ("Festival Lite") with:
# sudo apt install -y flite
# Adjust speaking rate/speed/wpm with --setf duration_stretch=MULTIPLIER_OF_NORMAL_SPEED:
# where the default MULTIPLIER_OF_NORMAL_SPEED is 1
# https://stackoverflow.com/questions/38572860/can-festival-ttss-speed-of-speech-be-changed/41305832#41305832
flite --setf duration_stretch=.75 "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment