p0n1 / epub_to_audiobook

EPUB to audiobook converter, optimized for Audiobookshelf
MIT License
894 stars 87 forks source link

Local TTS support #16

Open sarutobiumon opened 7 months ago

sarutobiumon commented 7 months ago

Amazing work, but would be even more amazing if we have alternatives to online-paid only TTS options such as PiperTTS, CoquiTTS, Bark...etc Thanks for the hard work and keep it up!

p0n1 commented 7 months ago

Thanks for the suggestion. Yes, the next step is to add local free TTS options. Still investigating.

haydonryan commented 5 months ago

Right now I'm doing this manually on the command line with piper voice. It works well with one exception - the breaks need to be converted to '.', so using sed to process.

Example for one chapter

python3 main.py book.epub output_dir --output_text --preview
sed -i 's/@BRK#/.\r\n/g' output_dir/0015_1.txt
cat output_dir/0015_1.txt | ../../piper/piper --model ../../piper/piper-voices/en/en_US/kathleen/low/en_US-kathleen-low.onnx -f ch1.wav