APP LINK: github.com/bot...
SOURCE CODE: github.com/bot...
autosrt is a simple command line tool made with python to auto generate subtitle / closed caption for any video / movie or audio file and translate it automatically for free using unofficial google translate API
This is a modified version of autosub made by Anastasis Germanidis github.com/age...
Installation :
if you don't have python on your Windows system you can try latest compiled version from github.com/bot...
Just extract those ffmpeg.exe and autosrt.exe into a folder that has been added to PATH ENVIRONTMET for example in C:\Windows\system32
You can get latest version of ffmpeg from www.ffmpeg.org/
If it doesn't work on your windows system then you must install python then install this app with pip
pip install --upgrade autosrt
Please use python version between 3.8.12 to 3.10.4
In Linux you have to install this script with python (version minimal 3.8 ) and install ffmpeg with your linux package manager for example in debian based linux distribution you can type :
apt update
apt install -y ffmpeg
to install this autosrt, just type :
pip install --upgrade autosrt
you can compile this script into a single executable file with pyinstaller by downloading __init__.py file, rename it to autosrt.py and type :
pip install pyinstaller
pyinstaller --onefile autosrt.py
The executable compiled file will be placed by pyinstaller into dist subfolder of your current working folder, so you can just rename and put that compiled file into a folder that has been added to your PATH ENVIRONTMENT so you can execute it from anywhere
I was succesfuly compiled it in Windows 10 with pyinstaller-5.1 and Pyhton-3.10.4, and python-3.8.12 in Debian 9
Another alternative way to install this script with python is by cloning this git (or downloading this git as zip then extract it into a folder), and then just type :
python setup.py build
python setup.py install
Simple usage example :
autosrt --list-languages
autosrt -S zh-CN -D en "Episode 1.mp4"
For multiple video/audio files (starts from version 1.1.0), you can use wildcard
autosrt -S zh-CN -D en "C:\Movies\*.mp4"
If you don't need translations just type :
autosrt -S zh-CN "Episode 1.mp4"
You can also install this script (or any pip package) in android via python package in termux app
github.com/ter...
Choose the right apk for your device, install it, then open it
Type these commands to get python, pip, this autosrt, (and any other pip packages) :
termux-setup-storage
pkg update -y
pkg install -y python
pkg install -y ffmpeg
pip install autosrt
Usage :
autosrt [-h] [-C CONCURRENCY] [-o OUTPUT] [-F FORMAT]
[-S SRC_LANGUAGE] [-D DST_LANGUAGE]
[-n RENAME] [-p PATIENCE] [-v]
[--list-formats] [--list-languages]
[source_path]
positional arguments:
source_path Path to the video or audio file
options:
-h, --help show this help message and exit
-C CONCURRENCY, --concurrency CONCURRENCY
Number of concurrent API requests to make
-o OUTPUT, --output OUTPUT
Output path for subtitles (by default, subtitles are saved in the same directory and name as the source path)
-F FORMAT, --format FORMAT
Destination subtitle format
-S SRC_LANGUAGE, --src-language SRC_LANGUAGE
Language spoken in source file
-D DST_LANGUAGE, --dst-language DST_LANGUAGE
Desired language for the subtitles
-v, --version show program's version number and exit
-lf, --list-formats List all available subtitle formats
-ll, --list-languages
List all available source/destination languages
License
MIT
Check my other Speech Recognition projects :
ANDROID-AUTOSRT : • ANDROID AUTOSRT : AUTO...
ANDROID-AUTOSRT-V2 : • ANDROID AUTOSRT V2 : A...
PyAutoSRT : • PyAutoSRT : a DESKTOP ...
Android Live Subtitle : • ANDROID LIVE SUBTITLE ...
Android VOSK Powered Live Subtitle : • ANDROID VOSK POWERED L...
Chrome/Edge Extension : • CHROME / EDGE BROWSER ...
Web HTML Template : • WEB HTML TEMPLATE TO A...
Python Desktop App Live Subtitle: • PYTHON VOSK LIVE SUBTI...
Java Desktop App Live Subtitle: • JAVA VOSK LIVE SUBTITL...
GITHUB :
Check my other SPEECH RECOGNITIION + TRANSLATE PROJECTS in github.com/bot...
BUY ME COFFEE : sociabuzz.com/...
#python #closedcaption #subtitles #googletranslate #transcription #translation #speechrecognition #voicerecognition #autocaption #autosubtitle #livecaption #livesubtitle #transcribe #autosub #autotranscribe
5 июн 2022