Coder Social home page Coder Social logo

auto-caption's People

Contributors

aguang-xyz avatar quantumentangledandy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

auto-caption's Issues

AttributeError: type object 'NNSplit' has no attribute 'load'

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'

Milliseconds are invalid VTT

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

def time2str_vtt(x):
return "{hour:02d}:{minute:02d}:{second:02d}.{millisecond}".format(
hour=int(x) // 3600,
minute=(int(x) // 60) % 60,
second=int(x) % 60,
millisecond=int(x * 1000) % 1000)

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)

MacOS Fails to load en model

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.