Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

ReadAlongs/ReadalongsDesktop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReadalongsDesktop

python badge gui license badge

This library is a desktop app with GUI for the readalongs studio project.
Readalongs is an audiobook alignment tool for indigenous language.

Table of Contents

Background

A desktop version of readalongs is developed in order to overcome these three main challenges:

  1. 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.)
  2. Users may have limited access to the internet.
  3. 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.

Install

0. (Optional) Create a conda env, notice that python version has to be >= 3.7

# 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.

1. Git clone and install packages

git clone https://github.com/tobyatgithub/ReadalongsDesktop.git
cd ReadalongsDesktop
pip install -r requirements.txt

2. Pick a Qt bindings library to install:

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.

3. Package this app with pyinstaller to distribute

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

https://macappstore.org/upx/

arch -arm64 brew install --build-from-source upx

Usage

In this repo, we also included a small example to run:

  1. Start the Desktop app from the terminal:
python desktopApp.py
  1. 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/.
  1. Exit (need fix) by hitting control-C in terminal

License

MIT License

About

A desktop GUI app for readalongs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.6%
  • Dockerfile 12.4%