Comments (4)
Apologies for the delay. This is now implemented. Each audio file is saved locally and transcriptions on all formats are saved to the same directory (#13)
from frogbase.
Yup! That should be doable! I'll be releasing a big update in the next few days and will add this in :)
from frogbase.
Any update on this? I didn't see the option available (but then again, I'm a noob and my "Instructions" page is broken due to some operator error, lol). I'd love to be able to export SRT captions straight from this awesome app!
from frogbase.
I was just looking for the exactly same feature and as it seems not yet included I just added it to the file transcribe.py
as follows (just elaborating on the answer by Cate9021 so that it works with the current version)
on the top of transcribe.py
add the following two imports
import os
from whisper.utils import write_srt,write_vtt,write_txt
and in the method def transcribe
add
self.text = self.raw_output["text"]
self.language = self.raw_output["language"]
self.segments = self.raw_output["segments"]
## -----------new code start
transcript_basename = self.name + '__' + whisper_model
# save TXT
with open(os.path.join(self.save_dir, transcript_basename + ".txt"), "w", encoding="utf-8") as txt:
write_txt(self.segments, file=txt)
# save VTT
with open(os.path.join(self.save_dir, transcript_basename + ".vtt"), "w", encoding="utf-8") as vtt:
write_vtt(self.segments, file=vtt)
# save SRT
with open(os.path.join(self.save_dir, transcript_basename + ".srt"), "w", encoding="utf-8") as srt:
write_srt(self.segments, file=srt)
## -----------new code end
# Remove token ids from the output
for segment in self.segments:
del segment["tokens"]
This creates the transcript files in the folder local/[Audio/Video Name]
when you are transcribing an audio/video. The variable transcript_basename
sets the file name which you might want to change according to your preferences (i added the model name as i am evaluating the different models right now)
from frogbase.
Related Issues (20)
- Solving environment: failed HOT 1
- Help. Still can't get it to run HOT 3
- Youtube translation issue HOT 3
- Winerror 2 The system cannot find the file specified HOT 1
- Error while deploying with Portainer HOT 2
- Implement Massively Multilingual Speech - Meta's Open Source model with less than half of Whispers error rate
- Update to streamlit 1.20.0 or higher to avoid altair.vegalite.v4 module missing issue HOT 5
- Feature request: Implement word-level confidence score visualisation by color coding the transcript HOT 2
- RuntimeError: The size of tensor a (261) must match the size of tensor b (3) at non-singleton dimension 3 HOT 1
- ModuleNotFoundError: No module named 'sqlalchemy HOT 1
- Cant run it HOT 3
- Discord link dead HOT 1
- Unable to upload local content HOT 2
- Aparece esse erro, e não carrega o vídeo ou a midia enviada
- Error when uploading local files HOT 2
- error at startup : unsupported operand type(s) for |: 'type' and 'NoneType' HOT 7
- error report
- "Download error" when attempting to upload from local storage
- TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' HOT 2
- No module named openai? idid everything in the nontechnical HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frogbase.