syncabook (Cache)ΒΆ
git clone --depth=1 https://github.com/r4victor/syncabook
cd syncabook
sudo docker build -t <user>/syncabook -f Dockerfile .
sudo docker run --rm -it <user>/syncabook:latest -h
mkdir syncabook
cd syncabook
git clone --depth=1 https://github.com/scillidan/syncabook
git clone --depth=1 https://github.com/scillidan/afaligner
vim Dockerfile
FROM python:3.9-slim
RUN apt update -q \
&& apt install --no-install-recommends -yq espeak \
libespeak-dev \
ffmpeg \
&& apt install -yq gcc
RUN pip install --upgrade pip
RUN pip install numpy==1.23.4
RUN pip install pytest==7.1.3
WORKDIR /syncabook
COPY afaligner ./afaligner
COPY syncabook ./syncabook
RUN pip install -e afaligner
RUN pip install -r syncabook/requirements/base.txt
RUN pip install -e syncabook
WORKDIR /
ENTRYPOINT ["syncabook"]
sudo docker build -t <user>/syncabook -f Dockerfile .
sudo docker run --rm -it <user>/syncabook:latest -h
Get aeneas-win64-setup-*.exe
from Aeneas Tools - Releases.
cd books
mkdir alice_in_wonderland
cd alice_in_wonderland
mkdir plaintext
For example, download βAlice in Wonderland, Retold in Words of One Syllableβ by Carroll and Gorham, the
Plain Text UTF-8
format from Project Gutenberg, rename totext.txt
Download the corresponding bookβs vocal reading audio files from LibriVox, rename to
audio.zip
, then decompress toaudio/
In
plaintext/
, create a001_title.txt
Open
text.txt
, cut all content that above chapter strings likedCHAPTER I
,ACT I
into001_title.txt
# syncabook download_files <url> <book>
syncabook split_text --mode opening --p <book_index> <book>\text.txt <book>\plaintext
# syncabook split_text --mode delimeter --p <book_index> <book>\text.txt <book>\plaintext
# syncabook split_text --mode equal --n 2 <book>\text.txt <book>\plaintext
syncabook to_xhtml <book>/plaintext <book>/sync_text
syncabook sync <book>
syncabook create <book>
For example:
sudo docker run --rm -v ~/Git/_/synclibrivox/books:/books -it scillidan/syncabook:latest split_text --mode opening --p CHAPTER books/alice_in_wonderland/text.txt books/alice_in_wonderland/plaintext
sudo docker run --rm -v ~/Git/_/synclibrivox/books:/books -it scillidan/syncabook:latest to_xhtml books/alice_in_wonderland/plaintext books/alice_in_wonderland/sync_text
sudo docker run --rm -v ~/Git/_/synclibrivox/books:/books -it scillidan/syncabook:latest sync books/alice_in_wonderland
sudo docker run --rm -v ~/Git/_/synclibrivox/books:/books -it scillidan/syncabook:latest create books/alice_in_wonderland