dotwryn/bash/osx/osxfun

25 lines
667 B
Plaintext
Raw Normal View History

#!/bin/bash
function voicesed() { sed 's/\([^ ]*\) .*/\1/;'; }
function voicelist() { say -v ? | voicesed; }
function voicelistenglish() { say -v ? | grep 'en_' | voicesed; }
function voicerandom() { voicelistenglish | shuf -n 1; }
function voicelistnormal() {
voicelistenglish |
sed '/Trinoids/d;/Zarvox/d;/Deranged/d;/Hysterical/d;/Bahh/d;/Bubbles/d'
}
function voicerandomnormal() { voicelistnormal | shuf -n 1; }
2019-08-06 20:40:33 +00:00
function sayvoices() {
for voice in $(voicelist); do
2019-08-06 20:40:33 +00:00
say -v "$voice" $(say -v ? | grep $voice | sed 's/[^#]*# //');
done
}
function sayone() {
local voice=$(voicerandom);
2019-08-06 20:40:33 +00:00
say -v "$voice" $(say -v ? | grep $voice | sed 's/[^#]*# //');
}