Skip to content

Instantly share code, notes, and snippets.

@nicosingh
Created September 12, 2024 19:42
Show Gist options
  • Save nicosingh/28a7d0068f4318e000ed6ea208f252f2 to your computer and use it in GitHub Desktop.
Save nicosingh/28a7d0068f4318e000ed6ea208f252f2 to your computer and use it in GitHub Desktop.
Create Audiobook from EPUB file in a GPU-based ubuntu 22.04 instance
sudo apt update
sudo apt install espeak-ng ffmpeg nvidia-cuda-toolkit python3-pip ubuntu-drivers-common -y
sudo ubuntu-drivers install
sudo apt autoremove
sudo apt clean
git clone https://github.com/aedocw/epub2tts
cd epub2tts
pip install .
sudo reboot
REMOTE_IP=1.2.3.4
LOCAL_EPUB=book.epub
BOOK_COVER=book.jpeg
VOICE_FILE=voice.wav
scp $LOCAL_EPUB ubuntu@$REMOTE_IP:book.epub
scp $BOOK_COVER ubuntu@$REMOTE_IP:book.jpeg
scp $VOICE_FILE ubuntu@$REMOTE_IP:voice.wav
ssh ubuntu@$REMOTE_IP epub2tts book.epub --scan
ssh -t ubuntu@$REMOTE_IP screen "COQUI_TOS_AGREED=1 epub2tts book.epub --language es-419 --xtts voice.wav --cover book.jpeg --start 1 --end 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment