r4victor / syncabook

📖🎧 A tool for creating ebooks with synchronized text and audio (EPUB3 with Media Overlays)
MIT License
264 stars 27 forks source link

Generated files do not work as expected #25

Open og-abdul-mateen opened 1 year ago

og-abdul-mateen commented 1 year ago

Hello, I have set up the syncabook library to create ebooks with embedded audio (Epub with MediaOverlay), but the syncing functionality is not working in any of the apps I've tried so far. I followed the exact same steps mentioned under the Usage Examples heading in the same order i.e. Step 1. syncabook download_files https://librivox.org/civil-disobedience-by-henry-david-thoreau/ civil_disobedience Step 2. syncabook to_xhtml civil_disobedience/plaintext/ civil_disobedience/sync_text/ Step 3. syncabook sync civil_disobedience/ Step 4. syncabook create civil_disobedience/

I was successfully able to generate the .smil files as well as the final EPUB3 ebook for Civil Disobedience book. Then, I imported the final generated EPUB3 file to different Ebook reading apps (see list below). The text looks good and the audio plays fine. However, there is no highlighting of the text along the audio. I have tried many following apps so far including the following.

It needs to be mentioned here that these apps highlight text with audio for the other books (which mostly come preloaded with these apps).

Is there something that I am missing here?

Audun97 commented 1 year ago

Do you see this in the xhtml headers?

<link href="../styles/style.css" rel="stylesheet" type="text/css"/>

It is this which add the highlighting as far as I know. In the style.css you should see

.-epub-media-overlay-active {
    background-color: #FFFF00;
}
og-abdul-mateen commented 1 year ago

I see this xhtml header, but there is no style.css file. Are we supposed to create one manually?

Audun97 commented 1 year ago

No, Syncabook should have created it. IDK works for me.

I use the docker container on WSL.

I enter this command to enter the containers command line. I can then pass commands like it was native

docker run -it -v "/mnt/c/Users/path/to/book:/books/mybook" --entrypoint /bin/bash syncabook 

Replace path/to/book to the root directory of your book

Containers are nice as they create a standardized environment. I recommend using it