aguang-xyz / auto-caption Goto Github PK
View Code? Open in Web Editor NEWAutomatic captioning for movies.
License: GNU Affero General Public License v3.0
Automatic captioning for movies.
License: GNU Affero General Public License v3.0
I get the error message below, when I run auto-caption:
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/auto-caption", line 7, in
main()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/auto_caption/init.py", line 226, in main
auto_caption(args.video, output, fmt=fmt, lang="en")
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/auto_caption/init.py", line 199, in auto_caption
sentences = segment_setences(words)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/auto_caption/init.py", line 119, in segment_setences
splits = NNSplit.load(lang).split([content])
AttributeError: type object 'NNSplit' has no attribute 'load'
I as using this to add subtitiles to my online lecture. However I was unable to add them into our insititutions transcript editor, with it complaining about a bad format. I ran the VTT generated here though an online VTT validator here and learned that miliseconds should be 3 digits long.
Just changing this line
auto-caption/auto_caption/__init__.py
Lines 161 to 167 in d36acf7
To the following seems to fix this millisecond issue.
def time2str_vtt(x):
return "{hour:02d}:{minute:02d}:{second:02d}.{millisecond:03d}".format(
hour=int(x) // 3600,
minute=(int(x) // 60) % 60,
second=int(x) % 60,
millisecond=int(x * 1000) % 1000)
It's a good idea to add the flag --language and support also other lang.
Thank you
Right after moviePy reports done I get the following (MacOS 10.15.7)
Traceback (most recent call last): File "/usr/local/bin/auto-caption", line 7, in <module> main() File "/usr/local/lib/python3.8/site-packages/auto_caption/__init__.py", line 226, in main auto_caption(args.video, output, fmt=fmt, lang="en") File "/usr/local/lib/python3.8/site-packages/auto_caption/__init__.py", line 199, in auto_caption sentences = segment_setences(words) File "/usr/local/lib/python3.8/site-packages/auto_caption/__init__.py", line 119, in segment_setences for tokens2d in tqdm(nnsplit.NNSplit(lang).split([content])): File "backend.py", line 5, in create_session File "/usr/local/lib/python3.8/site-packages/onnxruntime/capi/session.py", line 195, in __init__ self._create_inference_session(providers, provider_options) File "/usr/local/lib/python3.8/site-packages/onnxruntime/capi/session.py", line 200, in _create_inference_session sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) onnxruntime.capi.onnxruntime_pybind11_state.NoSuchFile: [ONNXRuntimeError] : 3 : NO_SUCHFILE : Load model from en failed:Load model en failed. File doesn't exist
latest vosk,onnxruntime, and nnsplit via pip3. libbomp via homebrew. attempted pip install of kaldi-active-grammar and dragonfly[kalidi] afterwards with no effect. ~/.auto-captions/models/en/... was created from zip download on the first run of the program. Apologies if I'm missing something obvious, new area for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.