This library is a desktop app with GUI for the readalongs studio project.
Readalongs is an audiobook alignment tool for indigenous language.
A desktop version of readalongs is developed in order to overcome these three main challenges:
- Direct users may not be familiar with Linux/Unix, Python, and Docker technologies (e.g. we should not require users to understand how to use terminal to use this app.)
- Users may have limited access to the internet.
- Communities would prefer to perform tasks offline. (data privacy)
As a result, this desktop version of readalong will allow users to perform tasks by clicks, and support all functionalities without needing the internet.
# create
conda create --name readalongsDesktop python=3.7
# activate
source activate readalongsDesktop
On Windows, install ffmpeg
and qt
using conda:
conda install ffmpeg
conda install qt
On other systems, install ffmpeg
and qt
using your standard package manager.
git clone https://github.com/tobyatgithub/ReadalongsDesktop.git
cd ReadalongsDesktop
pip install -r requirements.txt
For licensing reason, the user will need to pick their own Qt bindings library to install in the same python environment, the common options are pyqt4, pyqt5, pyside2, and pyside6.
For example, you can install pyqt5 with:
pip install PyQt5
or
conda install pyqt5
At this point, you should be able to run the GUI app on your local machine with:
python desktopApp.py
(To test:) user may need to install g2p
, Studio
, and SoundSwallower
in the same root directory to make it work.
In the ReadalongsDesktop
folder, install the pyinstaller
and run the following command (depends on windows/mac)
pip install pyinstaller
Notice we will need to use different command on windows vs. mac. On windows (to test):
pyinstaller desktopApp.py --add-binary ../g2p/g2p/mappings/langs/langs.pkl:g2p/mappings/langs --add-binary ../g2p/g2p/mappings/langs/network.pkl:g2p/mappings/langs --add-binary ../SoundSwallower:SoundSwallower
On mac (tested on intel chip):
pyinstaller desktopApp.py --add-data ../g2p/g2p/mappings/langs/langs.pkl:g2p/mappings/langs --add-data ../g2p/g2p/mappings/langs/network.pkl:g2p/mappings/langs --add-data ../SoundSwallower:SoundSwallower
Then, go to -> dist -> desktopApp. You should find an executable file named as desktopApp
Double click on the desktopApp
executable (wait for a little while) and you should see the GUI.
PS: For mac m1 users, you may need to install upx first
arch -arm64 brew install --build-from-source upx
In this repo, we also included a small example to run:
- Start the Desktop app from the terminal:
python desktopApp.py
- Run with provided testing file:
- Click the first "Browse" button to upload the sample txt file
Welcome.txt
. - Click the second "Browse" button to upload the sample audio file
Welcome.mp3
. - Select
iku
as the mapping from the drop done, click "Confirm". - Click "Align your files".
- Open a browser and go to
http://localhost:7000/
.
- Exit (need fix) by hitting control-C in terminal