Initial commit

This commit is contained in:
Joop Schilder 2021-07-22 17:24:13 +02:00
parent 07ceb23b3d
commit c053ad837b
6 changed files with 107 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
venv/

View File

@ -1,3 +1,8 @@
# final-space-tts
Listen to Final Space quotes from KVN, H.U.E. or A.V.A!
Listen to Final Space quotes from KVN, H.U.E. or A.V.A!
Requires `espeak-ng` (or plain old `espeak`), `python3` and `mpg321`.
Voice quality is fairly shitty. They don't sound like A.V.A., H.U.E. or KVN that much. But hey, it's free, and it might give you a laugh.

2
apt-packages.list Normal file
View File

@ -0,0 +1,2 @@
espeak-ng espeak-ng-data libespeak-ng1 mpg321

44
quote_final_space.sh Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env sh
set -eu
working_dir="$(dirname "$0")"
if [ ! -d "$working_dir/venv" ]; then
echo "preparing python virtualenv"
python3 -m venv --system-site-packages "$working_dir/venv" >/dev/null
echo "installing python pip requirements"
python3 -m pip install -U -r "$working_dir/requirements.txt" >/dev/null
fi
supported="KVN, HUE, AVA"
do_notify() { notify-send "$1 says:" "\"$2\"" ; }
if [ $# -eq 0 ]; then
echo "Requires an argument (must be one of $supported)" >&2
exit 1
fi
LINE="$(shuf -n 1 "$working_dir"/quotes.txt)"
case $1 in
[Aa][Vv][Aa])
# shellcheck disable=SC1091
. "$working_dir/venv/bin/activate"
gtts-cli -l 'en' -o '/tmp/ava.mp3' "$LINE"
do_notify "A.V.A" "$LINE" &
mpg321 --stereo >/dev/null 2>&1 '/tmp/ava.mp3'
;;
[Hh][Uu][Ee])
do_notify "H.U.E." "$LINE" &
espeak-ng -a 200 -p 55 -s 126 -v "en-us" "$LINE"
;;
[Kk][Vv][Nn])
do_notify "KVN" "$LINE" &
espeak-ng -a 200 -p 110 -s 160 -v "en-us" "$LINE"
;;
*)
echo "Invalid choice (must be one of $supported)" >&2
exit 1
;;
esac

52
quotes.txt Normal file
View File

@ -0,0 +1,52 @@
Tough titty wompus!
Well, twist my nipples hard!
Oh my crap...
Oh my double crap!
Hell yeah, dawg.
Gary, the cookies are done.
Get off my cheeks, Gary.
I am a god.
Is that life, Gary?
What the hell, Quinn? You failed to mention me.
Sorry to be the bearer of bad news, but we're still in extreme danger. Those dickheads from the Infinity Guard found us, and Gary is not responding.
You're my only friend, Gary.
Kevin is a jag-off, Gary. You know that.
Detonating in 3... 2... 1. Boom town.
I'd give you a cookie, but I think you've out-grown that.
I'll miss you, friend.
It's been an honor to be your friend.
My body is a nightmare.
Gary, may I speak in...ironics? Haha, you are a prisoner once again.
My first high-five, and it was a threesome... No one would believe me.
I have no idea what I just made you, or if it even tastes good.
Alright, this is how we play the game!
Whoa! I really am a god.
Have I really sunk this low...
Either he's distracted, or he's had breakfast.
Does anyone want a hit of this Hue-bie doobie?
This puts the Hue in humiliation
Is it hot in here, or is it just Hue?
If you believe something can be broken, you must also believe it can be fixed.
But when will someone fix Hue?
Kevin, if you don't get on the outside turret, I will beat you within one inch of your life.
I... I wish I knew how to cry.
Hey Gary, my name is Kevin. I'm your Deep Space Insanity Avoidance Companion, nice to meet you!
I have the key! In my butthole.
Embrace the Kevin!
Kevin saves the day!
They're just soooooo good!
But I call it the Tiger's Nest!
This is so wrong, this is so very wrong.
Hey, let's do jello shots with the brain goo!
Uh, can I help you...? Run away! RUN AWAY!
Do my bidding. Fix the ship!
Flamethrowers! Hooray!
The winds of change keep blowing, we're all gonna die.
Oh baby Kevin's got the magic, and the magics got Kevin...
Hi Future Quinn, I'm Kevin, I'm Gary's Deep Space Insanity Avoidance Companion!
I'm burning you alive tonight. Yes, I'm burning you alive tonight. While you sleep? You bet! I'm burning you alive tonight!
I'm backkkk!
It bounces forever... got it from a dead guy.
Greetings, insane worshippers!
Is anything real, or is this a beautiful lie?
Hooray! Kevin will never die.

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
gTTS==2.2.3