Last active
December 19, 2017 18:10
-
-
Save Ad5001/afdb56127fdd7adca9428803192c9534 to your computer and use it in GitHub Desktop.
Adds TTS to ODT formats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
INSTALL=""; | |
NEED_INSTALL=false; | |
if which pico2wave >/dev/null; then | |
echo "Found pico2wave..." | |
else | |
INSTALL="pico2wave" | |
NEED_INSTALL=true; | |
echo "Installing pico2wave..." | |
fi | |
if which vlc >/dev/null; then | |
echo "Found VLC..." | |
else | |
INSTALL="${INSTALL} vlc" | |
NEED_INSTALL=true; | |
echo "Installing VLC..." | |
fi | |
if which odt2txt >/dev/null; then | |
echo "Found odt2txt..." | |
else | |
cd /tmp | |
git clone https://github.com/dstosberg/odt2txt | |
cd odt2txt | |
pkexec make install | |
echo "Installing odt2txt..." | |
fi | |
if $NEED_INSTALL; then | |
pkexec apt install $INSTALL; | |
fi | |
pico2wave -l=${2:-"fr-FR"} -w=/tmp/out.wav "$(odt2txt $1)"; | |
vlc /tmp/out.wav >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment