Git Product home page Git Product logo

auto-subs's Introduction

Hi there

πŸ“š I'm a Computer Science Masters student at Trinity College Dublin
πŸš€ Best languages are Java, Javascript and Python
🌞 Interned at ChannelSight last summer (web crawling)
🏒 Currently a Software Engineer Intern at Workday

Some of my Projects 🎨

For the 2023 Trinity College SWENG projects, I led a team of 10 people to develop a reimagined Architecture Portfolio Center for IBM. We created a fully customizable ReactJS web app, utilising SQLite and Kubernetes for our backend. Our application serves as a central information hub for all projects under an organisation. Quickly and easily find details about any project using text search and project tag filters. Short Demo Video + Read more

2. Proxy Server πŸ“‘

A web proxy server which fetches items from the Web on behalf of a Web client (i.e browser) instead of the client fetching them directly. Supports Caching and Access Control.

A secure application for encrypting files before they are uploaded to the cloud so that only users in the encryption group can decrypt the files. Uses a combination of symmetric and asymmetric encryption to ensure that files are completely secure, and to enable the adding and removing users from the encryption group so that files can be securely shared between multiple people.

For the 2022 Trinity College SWENG projects, my team developed a fully featured web-based UI (using the .Net framework), with supporting APIs on top of Dell’s existing database (using PostgreSQL). I built the frontend and connected it to the backend API using C#. The program allows for all analytical and management tasks of the dataset, increasing the visibility and productivity of all admin tasks related to the database.

πŸ”½ More projects below πŸ”½

Connect with me:

image

tmoroney

auto-subs's People

Contributors

gr3su avatar tmoroney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-subs's Issues

Max. Characters not working

You already answered my comment on Youtube. So I just wanted to add this here to make it easier for you to keep track of the issues that can be fixed in future updates.

At the moment "max. characters" doesn't seem to work properly. For example I set the max. characters to 11 and max. words to 3. Now I still get lines that look like this: "usually not what". These are 3 words but obviously more than 11 characters. So it doesn't really work the way I expected it to.

You said it might be caused by a setting called "regroup" from the latest update. It regroups words together using an algorithm so that the sentences flow better, but it seems to be interfering with these other parameters. I'm looking forward to the updated version. πŸ‘

How to install Step 2?

Well, Step 2: Install Stable-TS ... Run this command. ...
Where should I run this command?

In PowerShell? It does not work ... (The term 'pip' is not recognized ...)
In Python? It does not work ... (invalid syntax)
In Resolve Console? It does not work ... (invalid syntax)

Importing own speech model

Hi, I from Poland and I want to import polish model to this program? How can I do this? Also big love to the creator of this plugin <3

"No Text+ found in media pool" even when it is

Hello! Let me just start by saying I've tested this plugin extensively and on the small transcription model is far superior to the default subtitles in everything except the timings. Really good job!
The issue im having is when im trying to use it to subtitle multiple tracks (one at a time) with different subtitles templates. Its very finicky if its gonna detect the Text+ in the folder or not. My request is if it would be possible to add a way for us to select which text+ we want to use with a drop down menu, similar to how the Snapcaptions plugin does it instead of dragging it to the media pool.

Thank you so much

Biggest Issue

Transcribing Audio...
Failed to load audio: ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
C:\Users\Suoxe\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Utility\audio.unknown: No such file or directory

I got it to transcribe once. But then the rest failed. Even with the new pushed version, the Format always changes to wave but MP3 codec stays the same.

list index out of range

I have this problem when i try to generate the subs, it gives me an srt file but it doesn't do it automaticly and when i import it mysefl the presets on the text+ doesnt aply, srry if this is a super easy thing to fix, i don't know much about programing, ty for ur time c:

Using model -> [ small ]
MarkIn: 86400
Rendering Audio for Transcription...
Progress: 0 %
Progress: 0 %
Progress: 0 %
Progress: 100 %
Audio Rendering Complete!
Transcribing Audio...

Transcribe: 0%| | 0/76.61 [00:00<?, ?sec/s]

Detected language: spanish

Transcribe: 0%| | 0/76.61 [00:06<?, ?sec/s]
Transcribe: 35%|###4 | 26.58/76.61 [00:33<01:02, 1.24s/sec]
Transcribe: 73%|#######3 | 55.94/76.61 [00:54<00:19, 1.07sec/s]
Transcribe: 100%|##########| 76.61/76.61 [01:10<00:00, 1.15sec/s]
Transcribe: 100%|##########| 76.61/76.61 [01:10<00:00, 1.09sec/s]
Saved: C:\Users\cinde\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Utility\audio.srt
Transcription Complete!
Subtitles saved to -> [ C:\Users\cinde\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Utility\audio.srt ]
Adjusting timestamps by 0:00:00
Found 73 subtitles in SRT file
list index out of range

It doesn't start

DR 18.6.5 Studio
Windows 11 Pro

The script installed itself correctly. no errors.
But when I fire it up on DaVinci, it doesn't start at all.

To install the script I chose for the auto installer in PowerShell

Can't see the subs

I did a sample and work fine. The second one I'm working with, works fine and add the Text+, but can't see the subtitles in the video.
image

Cannot Access The Lower Section

Basically, Im on a laptop and I don't have full size of windows that are openned, so I can't use the advanced section.
Thank you for making this script.

Regenerating the timeline text doesn't support non-English characters

Hi, I'm amused with your hard work, and I appreciate it a lot 😍

However, the problem is that it does not support non-English characters when I generate the timeline text with i.e. Polish subtitles. I have to fix that manually, which can be cumbersome.

I'll be grateful, if you manage to fix that issue πŸ’•

Received:
image

Expected:
image

List Index Out of Range

I have seen that others have had a similar problem where subtitles fail to transcribe to the timeline due to the text template selection not having options as described in #31 A possible solution is also mentioned in #36 however, after testing with the changes made, the bug remained with the same error result

Using model -> [ small ]
MarkIn: 108000
Rendering Audio for Transcription...
Progress: 100 %
Audio Rendering Complete!
Transcribing Audio...

Transcribe: 0%| | 0/4.25 [00:00<?, ?sec/s]

Detected language: spanish

Transcribe: 0%| | 0/4.25 [00:02<?, ?sec/s]
Transcribe: 100%|##########| 4.25/4.25 [00:10<00:00, 2.57s/sec]
Transcribe: 100%|##########| 4.25/4.25 [00:10<00:00, 2.57s/sec]
Saved: C:\Users\MRgro_0\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Utility\audio.srt
Transcription Complete!
Subtitles saved to -> [ C:\Users\MRgro_0\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Utility\audio.srt ]
Adjusting timestamps by 0:00:00
Found 4 subtitles in SRT file
list index out of range

I followed the instructions specified for automatic setup

DecodingOptions.__init__() got an unexpected keyword argument 'regroup'

I keep running into issues with the script not running,

Audio Rendering Complete!
Transcribing Audio...
DecodingOptions.init() got an unexpected keyword argument 'regroup'

After removing the "regroup" and "only_voice_freq"(which also didn't let my code go through), it still gives out an error for:

'dict' object has no attribute 'split_by_punctuation'
'dict' object has no attribute 'merge_by_gap'
'dict' object has no attribute 'split_by_length'

Removing those steps, I just got stuck on this:

'dict' object has no attribute 'to_srt_vtt'

Any help on what's up is appreciated!

Text+ Elements are placed 1 hour after they are supposed to

Auto-Subs v1.8
Davinci Resolve 18.6
MacOS Sonoma 14.2.1

When I place In- and Out-Points and start the process with "Generate Subtitles" everything is fine until the script places the Text+ elements. They are placed not exactly one hour behind my In- and Out-Points. I assume this is due to the fact that Davinci starts with "already 1 hour on the clock". The timeline starts at 1:00:00:00 and this causes confusion.

Example:

srt file is
01:15:38,670 --> 01:15:38,930

image

text+ ist placed on
02:15:34:04

image

subtitles overview in the auto-subs window:
03:15:45:26

image

Something is very off regarding the timecodes

In addition: is there an option in the current version to just create the SRT file and skip the placing of the Text+ element like it was possible in the old version?

Thank you very much. I can only imagine how big of a pain in the butt this was to code.

Not opening on macOS Sonoma

I followed all the steps without error messages, but when I go to Workspace > Scripts > auto-subs nothing opens. I checked the console in DaVinci Resolve to see if Python 3 was working, and it is, but there's an error message showing:

File "/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs-light.py", line 107
    <title>auto-subs/auto-subs-light.py at main Β· tmoroney/auto-subs Β· GitHub</title>
                                                ^
SyntaxError: invalid character 'Β·' (U+00B7)

Anyone knows what the issue and how to solve it?

OS: macOS Sonoma 14.5
DaVinci Resolve 19 beta

CAPITALIZATION + Censoring small bug

If you have the [Format Text] set to ALL UPPERCASE and have words typed into [Censored Words] in lowercase it will keep the edges of the censored word lowercase
Not a program breaking bug, but a smallfix to make these edges capitalized would help especially in the case a user is using a long csv of lowercase words to censor

Good timing, no subs

So the script timed captions right, at least i think so, but text isnt added, all it says is "template" which i used to create the template
image

No module named "stable-whisper"

I installed the script, but it seems that it doesn't work for me.
Auto subs light works.

Traceback (most recent call last):
File "", line 1, in
NameError: name 'i' is not defined. Did you mean: 'id'?
Traceback (most recent call last):
File "/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs.py", line 1, in
import stable_whisper
ModuleNotFoundError: No module named 'stable_whisper'

I asked in the stable-whisper github but apparently they have no idea

Text not found/no audio detected...

Its throwing errors that say the above and its not putting any subtitles anywhere, the clips I'm using have audio I have no clue why its not working. Pls help

[Mac OS] [Fixed] Error no2 No such fille or directory ffmpeg

Hi all,

Brew being difficult to install as well as ffmpeg in some cases, i found a fix for this error on youtube. Here is the link to properly install brew and ffmpeg : https://www.youtube.com/watch?v=dJ8y-VlMNAo&ab_channel=ProgrammingKnowledge

Once completely followed, auto-sub should work just fine.

In addition, a picture of what the error looks like :
Capture d’écran 2024-06-14 aΜ€ 15 27 57

Sorry for using the issues channel as it is already fixed, but i thought it could be helpful to others.

Error when transcribing audio

Using model -> [ medium.en ]
Rendering Audio for Transcription...
Progress:  0 %
Progress:  100 %
Audio Rendering Complete!
Transcribing Audio...
[WinError 193] %1 is not a valid Win32 application

Not sure where this would be caused because the lack of a traceback in the console.

No such file or directory: "ffmpeg"

Hi!
I tried to install all the various components which seems successful (I checked for each one if it is), but somehow in DaVinci, it still can't detect ffmpeg, and thus doesn't work. I'm on Mac (Sonoma 14.4.1) so did it through Brew. I've tried multiple things, like reinstalling it, installing the latest version, also downloading ffmepg from the website, but that didn't work (there is a security lock on the file). I tried to find more info on Reddit but haven't found anyone with that specific issue. Any ideas?

Screenshot 2024-04-17 at 18 53 40

I can't Install

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:20

  • ... Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
      eption
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Light Version also does not work

First at all, in the setup of lite version there is a mistake.
"Skip step 1 of the installation guide" is not true.
You have to install Python, which is part of step 1.

After installation i load [auto-subs-light.py] into the Resolve Studio (18.6), i load the srt file ... but nothing happends.

Sorry bro ... nothing works here.

[ERROR] Not exporting the video

Hello,
I have being testing the script multiple times, but I always have this error in the console.
The when I click generate it goes into the exporting tab but doesn't export (puts the video in the queue but does not export it)
Using model -> [ small.en ]
MarkIn: 86400
Rendering Audio for Transcription...
Audio Rendering Complete!
Transcribing Audio...
FFmpeg failed to read "C:\Users\Leona\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Utility\audio.mov".

Davinci Resolve unable to load plugin: fusionoperators.dl

Hi tmoroney!

Thanks for the script. If it would work I would be very happy. Unfortunately, no luck.

Running Windows 10 Pro, Davinci Resolve 18.6. I used auto install which ended with the message that I could find it under "Scripts". Now each time I open Davinci I get the error davinci resolve unable to load plugin: fusionoperators.dll Ofter clicking OK. Davinci crashes. As this happens every time, Davinci has become unusable for me 😒

I tried running Davinci as Administrator, but that did nothing.

Has this happen before (to someone else) and do you know a solution?

Greets,
Dustin Watts

No text+ found in the media pool

After the script finishes transcribing it says this:
image
And if i go to the destination it talks about, i can see the file with subtitles.

Naming Text+ clips according to captions

Hi,
I love this! It works so well, and saves an enormous amount of time. I appreciate it.

It'd be even better if clips would be named as their captions like so:

image
image


You immediately see the content in the timeline, as opposed to having to click and check:
image

I do word-for-word subtitles, so it's hard to find specific words sometimes.

Thanks!

String Index out of Range

I jusst started using this plugin and it worked fine at first. But I updated davinchi from 18.6.5. to 18.6.6 and it stop working.
Now i get an error message saying: String Index Out of Range

I tried following the #30 but that didn't help.

Screenshot 2024-05-31 172835

where is the problem ?

function: 0x0287be3188
[string "???"]:8: attempt to index global 'cmp' (a nil value)
Traceback (most recent call last):
File "/Users/mymac/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs.py", line 1, in
import stable_whisper
ModuleNotFoundError: No module named 'stable_whisper'
[string "???"]:8: attempt to index global 'cmp' (a nil value)
Traceback (most recent call last):
File "/Users/mymac/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs.py", line 1, in
import stable_whisper
ModuleNotFoundError: No module named 'stable_whisper'
MediaIn1 cannot get frame for time 398
MediaOut1 cannot get Parameter for Input at time 398
MediaOut1 failed at time 398
MediaIn1 cannot get frame for time 398
MediaOut1 cannot get Parameter for Input at time 398
MediaOut1 failed at time 398
Traceback (most recent call last):
File "/Users/mymac/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs.py", line 1, in
import stable_whisper
ModuleNotFoundError: No module named 'stable_whisper'
Traceback (most recent call last):
File "/Users/mymac/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs.py", line 1, in
import stable_whisper
ModuleNotFoundError: No module named 'stable_whisper'
Traceback (most recent call last):
File "/Users/mymac/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/auto-subs.py", line 1, in
import stable_whisper
ModuleNotFoundError: No module named 'stable_whisper'

Screen Shot 2023-06-10 at 5 00 21 PM

Timing of single word subtitles are inaccurate

When using one word per line, the subs are off by anywhere from 1 to 7 frames on average, with some subs being off by a few seconds. By the end of a 1 minute clip, the subtitles will be off by several seconds in total. The only solution seems to be manually adjusting 80% or more of the subtitle positions, and because they aren't consistent (I.e all off by the same amount of frames), it is very time consuming to fix.

Is there any best practices for improving the timing? Does it have to do with project framerate, or the settings of the initial audio export by the script?

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.