Audiobook alignment for Indigenous languages!
This library is an end-to-end audio/text aligner. It is meant to be used together with the ReadAlong-Web-Component to interactively visualize the alignment.
The concept is a web application with a series of stages of processing, which ultimately leads to a time-aligned audiobook - i.e. a package of:
- SMIL file describing time alignments
- TEI file describing text
- Audio file (WAV or MP3)
Which can be loaded using the read-along web component.
Optionally a book can be generated as a standalone HTML page or as an ePub file.
- (optional) Pre-segment inputs, consisting of:
- Single audio file
- Text with page markings (assume paragraph breaks = pages)
- Input pages: each page consists of
- Image file
- Audio file
- Text
- Run alignment
- View output and download components
The best thing to do is install with pip pip install readalongs
.
Otherwise, clone the repo and pip install it locally.
$ git clone https://github.com/ReadAlongs/Studio.git
$ cd Studio
$ pip install -e .
If you don't already have it, you will also need FFmpeg.
- Windows: FFmpeg builds for Windows (helpful instructions)
- Mac:
brew install ffmpeg
- Linux:
<your package manager> install ffmpeg
On Windows, you might also need Visual Studio Build Tools (search for "Build Tools", select C++ when prompted) and swigwin.
(TODO: verify whether these are still needed now that soundswallower
has replaced pocketsphinx
.)
ReadAlong-Studio can be used either through the command line, a distributed web application or Docker.
Below shows some basic commands. For more information about how the command line interface works, please check the documentation. Additionally, you can add the --help
flag to any command for more information.
Basic alignment is done with the following command.
readalongs align TEXTFILE WAVFILE OUTPUTNAME
In order to generate an ePub, there are two steps:
readalongs align --output-xhtml TEXTFILE WAVFILE OUTPUTNAME
readalongs epub OUTPUTNAME.smil OUTPUTNAME.epub
ReadAlong-Studio has a web interface for creating interactive audiobooks. The web app can be served by first installing ReadAlong-Studio and then running readalongs run
. A web app will then be available on port 5000.
If you are having trouble installing the package, you can also clone the repo and run the studio using Docker.
To build the Docker container, run:
docker build . --tag=readalong-studio
To run the Flask web app from the Docker container:
docker run -p 5000:5000 -it readalong-studio
Then you should be able to visit http://localhost:5000/.
@dhdaines. @littell. @roedoejet. @joanise.
Feel free to dive in! Open an issue or submit PRs.
This repo follows the Contributor Covenant Code of Conduct.
Have a look at Contributing.md for help getting started.
This project exists thanks to all the people who contribute.
@dhdaines. @eddieantonio. @finguist. @joanise. @littell. @roedoejet.
MIT © David Daines, Patrick Littell, Aidan Pine