Semi-automated process to create an audiobook (in m4b format) from markdown files. For further info and a bit of context, check: http://www.publishinglab.nl/blog/2016/07/12/craft-your-own-audiobook/
For this process, you'll need:
- one or more text files in markdown format (each chapter should have its own file, they should all be located inside directory 'md')
- a cover image (jpg or png)
- a YAML file containing chapter names (simply edit toc.yaml)
- python (and modules listed below)
- datetime
- os
- shutil
- subprocess
- sys
- yaml
- pandoc
- flite
- sox (available as package or you can compile)
- ffmpeg
- ffprobe (installed with ffmpeg)
- MP4Box
- m4chaps
After installing all required software and downloading these files, make sure you have your content in markdown format (inside directory 'md') and run, in this order:
- create-chapters.py
- get-durations.py
- pack-chapters.py
To run these files, open your Terminal, navigate to the directory where the scripts are located and type
python create-chapters.py
Wait until the script is completely processed and then type the next one. It might take a while. Text-to-speech operations (which occur in the first script) and audio manipulation/concatenation (which occur in the third script) can take a few minutes to be completed.