etienneab3d / whispertimesync Goto Github PK
View Code? Open in Web Editor NEWSynchronize Whisper's timestamps over an existing accurate transcription
Synchronize Whisper's timestamps over an existing accurate transcription
The issue with WhisperTimeSync with WhisperHallu is that if you need to use Whisper Hallu, it means that there are long silences and noise that prevent an accurate transcription. So you use WhisperHallu to cut the audio for easier transcription, but you can't sync it with WhisperTimeSync because whispertimesync, lol the original whisper, doesn't recognize the correct timestamps in the first place...
java -Xmx4G -jar WhisperTimeSync.jar "KatyPerry-Firework_Vocals.wav.srt" "KatyPerry-Firework.txt"
java.lang.ArrayIndexOutOfBoundsException: 2
at com.cubAIx.WhisperTimeSync.WhisperTimeSync.main(WhisperTimeSync.java:120)
For the txt file, I am using the demo data from the repo.
Srt:
1
00:00:00,000 --> 00:00:21,620
Do you ever feel like a plastic bag drifting through the wind, wanting to start again?
2
00:00:22,000 --> 00:00:29,360
Do you ever feel so paper thin, like a house apart, on the road from cave in in?
3
00:00:29,840 --> 00:00:36,360
Do you ever feel already buried deep, six feet under screens and no one seems to hear
4
00:00:36,380 --> 00:00:37,320
a thing?
5
00:00:37,400 --> 00:00:43,430
Do you know that there's still a chance for you, cause there's a spark in you, and you
6
00:00:43,430 --> 00:00:51,360
just gotta ignite the light and let it shine.
7
00:00:59,020 --> 00:01:10,000
Cause baby you're a firework, come on show em what you're worth, make em go ah ah ah,
8
00:01:10,400 --> 00:01:11,960
as you shoot across the sky.
9
00:01:11,960 --> 00:01:13,020
Baby you're a firework, come on let your colors burst, and let them burn.
10
00:01:21,800 --> 00:01:40,270
You don't have to feel like a wasted space, your original cannot be replaced, if you only
11
00:01:40,270 --> 00:01:46,460
knew what the future holds, after a hurricane comes a rainbow.
12
00:01:46,760 --> 00:01:53,400
Maybe a reason why all the doors are closed, so you could open one that leads you to the
13
00:01:53,400 --> 00:01:54,380
perfect road.
14
00:01:54,740 --> 00:02:02,280
Like a lightning bolt, your heart will glow, and when it's time to go, you just gotta ignite
15
00:02:03,600 --> 00:02:16,240
the light and let it shine, just own the night like the 4th of July.
16
00:02:16,340 --> 00:02:27,360
Cause baby you're a firework, come on show em what you're worth, make em go ah ah ah,
17
00:02:27,600 --> 00:02:29,660
as you shoot across the sky.
18
00:02:34,100 --> 00:02:40,840
Baby you're a firework, come on let your colors burst, and let them burn.
19
00:02:43,100 --> 00:02:45,120
You're gonna leave a mark, you know.
20
00:02:48,600 --> 00:02:56,660
Boom boom boom, even brighter than the moon moon moon, it's always been inside of you
21
00:02:57,100 --> 00:03:00,980
you you, and now it's time to let it through.
22
00:03:02,100 --> 00:03:13,650
Cause baby you're a firework, come on show em what you're worth, make em go ah ah ah,
23
00:03:13,650 --> 00:03:16,300
as you shoot across the sky.
24
00:03:18,360 --> 00:03:30,500
Baby you're a firework, come on let your colors burst, make em go ah ah ah, you're gonna leave
25
00:03:30,500 --> 00:03:31,200
a mark.
26
00:03:37,600 --> 00:03:47,660
Even brighter than the moon moon moon, boom boom boom, even brighter than the moon moon
27
00:03:47,660 --> 00:03:48,520
moon moon.
Hi,
Tried with the following text
Des politiques de l'opposition ont aussi réagi. On peut citer le leader de la France Insoumise Jean-Luc Mélenchon qui a qualifié Emmanuel Macron de président complètement hors de la réalité. Et de son côté la présidente du rassemblement national à l'Assemblée Nationale Marine Le Pen, la jugée, je cite, coincée dans un monde parallèle. Bref l'intersyndicale, donc l'ensemble des syndicats, ont appelé à un 1er mai massif et à un raz-de-marée populaire et historique. On verra donc à quoi ressembleront les manifestations aussi dans les prochains jours. En tout cas merci à ceux qui ont suivi ce discours d'Emmanuel Macron en direct sur ma chaîne YouTube. J'ai essayé de vous résumer tout ça en parallèle. J'espère que ça vous aura plu, abonnez-vous si ce n'est pas encore le cas pour ne pas louper ça. Et on passe tout de suite au second sujet. Avant de passer aux actualités en bref, on continue avec un 2ème sujet très important. Des combats ont éclaté ce week-end au Soudan, un pays donc d'Afrique du Nord. Et ça inquiète beaucoup la communauté internationale, je vous explique. Alors les combats ont eu lieu à Khartoum, la capitale du Soudan, et c'est d'ailleurs la 1ère fois de l'histoire du pays que des combats ont lieu dans la capitale. Les médias présents sur place décrivent des tirs à larmes lourdes en pleine rue et des explosions quasiment ininterrompues. Les combats se sont aussi étendus à l'aéroport du pays, ce qui a donné lieu à des images impressionnantes, notamment d'un avion incendié. Ils ont continué ce dimanche en s'étendant dans d'autres régions du pays. Alors ces combats, ils opposent deux camps. D'un côté, il y a les forces armées soudanaises, les FAS, donc l'armée soudanaise aujourd'hui. Elle est dirigée par le général Abdel Fattah Al-Bourhan, c'est le dirigeant en fait du Soudan aujourd'hui. Ce dirigeant a pris le pouvoir par un coup d'État en 2021.
And got:
107
00:03:30,420 --> 00:03:32,330
Des politiques de
108
00:03:32,340 --> 00:03:34,550
l'opposition ont aussi réagi. On peut
109
00:03:34,560 --> 00:03:36,649
citer le leader de la France Insoumise
110
00:03:36,659 --> 00:03:38,089
Jean-Luc Mélenchon qui a qualifié
111
00:03:38,099 --> 00:03:39,649
Emmanuel Macron de président
112
00:03:39,659 --> 00:03:42,229
complètement hors de la réalité. Et de
113
00:03:42,239 --> 00:03:43,850
son côté la présidente du rassemblement
114
00:03:43,860 --> 00:03:45,830
national à l'Assemblée Nationale Marine
115
00:03:45,840 --> 00:03:48,110
Le Pen, la jugée, je cite, coincée dans un
116
00:03:48,120 --> 00:03:50,089
monde parallèle. Bref l'intersyndicale,
117
00:03:50,099 --> 00:03:52,190
donc l'ensemble des syndicats, ont appelé à
118
00:03:52,200 --> 00:03:55,309
un 1er mai massif et à un raz-de-marée
119
00:03:55,319 --> 00:03:57,470
populaire et historique. On verra donc à
120
00:03:57,480 --> 00:03:58,729
quoi ressembleront les manifestations aussi dans les prochains jours. En tout cas merci
121
00:03:58,739 --> 00:04:59,810
à ceux qui ont suivi ce discours d'Emmanuel Macron en direct sur ma chaîne YouTube. J'ai essayé de vous résumer tout ça en parallèle. J'espère que ça vous aura plu, abonnez-vous si ce n'est pas encore le cas pour ne pas louper ça. Et on passe tout de suite au second sujet. Avant de passer aux actualités en bref, on continue avec un 2ème sujet très important. Des combats ont éclaté ce week-end au Soudan, un pays donc d'Afrique du Nord. Et ça inquiète beaucoup la communauté internationale, je vous explique. Alors les combats ont eu lieu à Khartoum, la capitale du Soudan, et c'est d'ailleurs la 1ère fois de l'histoire du pays que des combats ont lieu dans la capitale. Les médias présents sur place décrivent des tirs à larmes lourdes en pleine rue et des explosions quasiment ininterrompues. Les combats se sont aussi étendus à l'aéroport du pays, ce qui a donné lieu à des images impressionnantes, notamment d'un avion incendié. Ils ont continué ce dimanche en s'étendant dans d'autres régions du pays. Alors ces combats, ils opposent deux camps. D'un côté, il y a les forces armées soudanaises, les FAS, donc l'armée soudanaise aujourd'hui. Elle est dirigée par le général Abdel Fattah Al-Bourhan,
122
00:04:59,820 --> 00:05:01,790
c'est le dirigeant en fait du Soudan
123
00:05:01,800 --> 00:05:04,189
aujourd'hui. Ce dirigeant a pris le
124
00:05:04,199 --> 00:05:06,830
pouvoir par un coup d'État en 2021.
Noe the large chunk of text at 121
Hi, will there be a possibility in the future for the code to use CUDA? This would help in times when I'm using the .mp4 file instead of an .srt file to align the codes better, but it just takes a long time and doesn't take advantage of my GPU
"An error occurred while loading the archive"
I got this error when trying to download the ComPair.exe for cross-lingual alignment. It would not start. Is there a fix? Thank you.
First, THANK YOU for this great pieces of Software ❤️ !! I am amazed how well this tool apply text to a subtitle file.
Problem:
When I try to apply a bigger text (156 KB) to a long SRT file (424 KB) the execution fails with this output:
Error: Command failed: java -Xmx30G -jar /usr/src/cli/WhisperTimeSync.jar ./upload/192b597d-bb16-42a3-b1a0-793031a99f07/input.srt ./upload/192b597d-bb16-42a3-b1a0-793031a99f07/input.txt de
Killed
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:514:28)
at Pipe.<anonymous> (node:net:323:12)
This is a Whisper SRT Transcription of a Video with a duration of 4 hours 51 mins.
How I can resolve this problem?
Hi, when I try to sync subtitles longer than about 30 minutes, WhisperTimeSync gives me the following error:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.cubAIx.WhisperTimeSync.CubaixAlignerSimple.align(CubaixAlignerSimple.java:42)
at com.cubAIx.WhisperTimeSync.CubaixAlignerSimple.syncMarks1to2(CubaixAlignerSimple.java:16)
at com.cubAIx.WhisperTimeSync.WhisperTimeSync.process(WhisperTimeSync.java:48)
at com.cubAIx.WhisperTimeSync.WhisperTimeSync.main(WhisperTimeSync.java:91)
I solve it by splitting the subtitles into two parts, but it's not very comfortable.
Hello, is it possible to adapt your project to the Whisper's JSON output? I'm working on karaoke program for Windows, and need all words in the lyrics to be timestamped.
I'll be glad to issue a PR for this feature but unfortunately I'm not proficient in Python programming (mostly use a C# & C++).
Hello,
Is it possible to highlight the text and give a maximum width to the output? i'm taking as exaple this command from whisper
whisper path/text.wav --word_timestamps True --max_line_width 22 --max_line_count 1 --highlight_words True --output_format srt
Thanks in advance, and great tool!
Hello,
Is it possible to generate and synchronize subtitles with Whisper's "word_timestamps" parameter?
Thank you!
A version that can run of Google colab
Problem description: openai/whisper#1770 (comment)
I've uploaded the data at: https://ben.ist-toll.xyz/k/whisper-test-files/
You example is excellent but if i want to transcribe audio non-English (it is not automatically detected ), what should I add before or after?
!nvidia-smi
!python3 WhisperTimeSync/transcribe.py WhisperTimeSync/data/[ ].mp3 large
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.