For Developers

See the code

pyTranscriber App Github Repository

This app consists basically of a friendly pyQt5 graphical interface for a customized version of Autosub 0.4.0 that can run on Linux, Windows and MacOS. All the hard work of processing the audio and generating the subtitles is done by Autosub.

Dependencies


0. Python 3.8
1. pip3 install pipenv
2. pipenv install (install all dependencies from Pipfile)
3. Download the static ffmpeg binary and put on project root folder


How to run?

$ pipenv shell $ python3 main.py


How to edit the GUI?

Install Qt5 Designer and open the file pytranscriber/gui/gui.ui


How to convert the .ui file (qt5designer project file) to .py?

$ pyuic5 gui.ui -o gui.py


How to generate the python bundled binary package version with ffmpeg included?

Linux:

$ pyinstaller main.py –path=”$(pwd)” –add-binary=”ffmpeg:.” –onefile –clean

Windows:

$ pyinstaller main.py –path=$pwd –add-binary=”ffmpeg.exe;.” –onefile –clean

Mac:

$ pyinstaller main.py –path=”$(pwd)” –add-binary=”ffmpeg:.” –clean –windowed

The output binary will be on subfolder dist/main and has all dependencies included. For more details check pyinstaller documentation

On Linux how to generate a statically linked binary so it can run even on systems with older glibc installed?

As explained in pyInstaller-FAQ:

The executable that PyInstaller builds is not fully static, in that it still depends on the system libc. Under Linux, the ABI of GLIBC is backward compatible, but not forward compatible. So if you link against a newer GLIBC, you can’t run the resulting executable on an older system.

Solution 1)To compile the Python interpreter with its modules (and also probably bootloader) on the oldest system you have around, so that it gets linked with the oldest version of GLIBC.

Solution 2) to use a tool like StaticX to create a fully-static bundled version of your PyInstaller application. StaticX bundles all dependencies, including libc and ld.so. (Python code :arrow_right: PyInstaller :arrow_right: StaticX :arrow_right: Fully-static application)”


Install staticx and patchelf (dependency)</b>

$ pip3 install –user patchelf-wrapper

$ pip3 install –user staticx


After generating the binary with pyinstaller, open the dist folder and run:

$ staticx main main-static

The newly created main-static contains all library dependencies, including glibc, so it should be able to run even on very old systems.

Note: In my Manjaro system the first time I run this command I got an error related to “libmpdec.so.2 => not found”. Installing the package mpdecimal on the package manager solved the issue.

Recent posts

Release V1.9

less than 1 minute read

22/12/2022 - v1.9 1. Windows/Linux version compiled with Nuitka (https://github.com/Nuitka/Nuitka) instead of pyInstaller to improve stability and fix rando...

Release V1.8

less than 1 minute read

17/08/2022 - v1.8 1. Fixed bug: language codes for Chinese Languages updated accordingly to Speech API. Changed to “cmn-Hans-CN” and “cmn-Hant-TW” instead o...

Release V1.7

less than 1 minute read

08/08/2022 - v1.7 1. add proxy setting 2. change the function ‘pytranscriber.util.MyUtil.is_internet_connected’ 3. add requirements.txt 4. rebuilt using pyI...

Release V1.5

less than 1 minute read

07/12/2020 - v1.5 * Since v1.4.1 COMPATIBLE WITH MACOS CATALINA. * Upgraded to latest Python and libraries * Minor GUI tweaks and fixes. 06/12/2020 - v1.4....

Release V1.4

less than 1 minute read

29/01/2020 - v1.4: * Fixed crash when exporting txt file for languages with special characters, specially chinese, on Windows system. Thanks for KY Poon for ...

Release V1.3

less than 1 minute read

18/10/2019 - v1.3: * Added option for not opening output transcription files automatically after finish * Fixed bug with canceling during batch processing (o...