Downloads Β· 30 days
11
7% of all-time downloads
Darveht/ZenVision-AI-Subtitle-Generator
ZenVision-AI-Subtitle-Generator is a automatic speech recognition model from Darveht. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as mit.
Advanced 3GB+ AI model for automatic video subtitle generation
Downloads Β· 30 days
11
7% of all-time downloads
All-time downloads
148
Public
Repo size
3.4 GB
Likes
3
Public
Click a slice to open those files.
.bin3.4 GB Β· 100%
From the Hugging Face model README
Advanced 3GB+ AI model for automatic video subtitle generation
ZenVision combines multiple state-of-the-art AI technologies to generate accurate and contextual subtitles for videos with emotion analysis and multi-language support.
from app import ZenVisionModel
# Initialize model
model = ZenVisionModel()
# Process video
video_path, subtitles, status = model.process_video(
video_file="video.mp4",
target_language="es",
include_emotions=True
)
pip install torch transformers whisper moviepy librosa opencv-python
pip install gradio spacy nltk googletrans==4.0.0rc1
python -m spacy download en_core_web_sm
import gradio as gr
from app import ZenVisionModel
model = ZenVisionModel()
demo = gr.Interface(
fn=model.process_video,
inputs=[
gr.Video(label="Video Input"),
gr.Dropdown(["es", "en", "fr", "de"], label="Target Language"),
gr.Checkbox(label="Include Emotions")
],
outputs=[
gr.Video(label="Subtitled Video"),
gr.File(label="Subtitle File"),
gr.Textbox(label="Status")
]
)
demo.launch()
Video Input β Audio Extraction β Whisper Large-v2 β Transcription
β β β β
Text Processing β Translation β BERT Embeddings β Emotion Analysis
β β β β
Subtitle Output β Emotion Coloring β Smart Formatting β Multi-Format Export
1
00:00:01,000 --> 00:00:04,000
Hello, welcome to this tutorial
2
00:00:04,500 --> 00:00:08,000
Today we will learn about AI
WEBVTT
00:00:01.000 --> 00:00:04.000
Hello, welcome to this tutorial
00:00:04.500 --> 00:00:08.000
Today we will learn about AI
{
"start": 1.0,
"end": 4.0,
"text": "Hello, welcome to this tutorial",
"emotion": "joy",
"sentiment": "positive",
"confidence": 0.95,
"entities": [["tutorial", "MISC"]]
}
export ZENVISION_DEVICE="cuda" # cuda, cpu, mps
export ZENVISION_CACHE_DIR="/path/to/cache"
export ZENVISION_MAX_DURATION=3600 # seconds
# Change Whisper model
zenvision.whisper_model = whisper.load_model("medium")
# Configure custom translator
zenvision.translator = pipeline("translation", model="custom-model")
MIT License - see LICENSE for details.
Developed by specialists in:
ZenVision - Revolutionizing audiovisual accessibility with artificial intelligence π