A simple tool to make the video, audio, subtitle and video-url (especially youtube) content into a written markdown files with the ability to rewritten the oral expression into written ones, or translating the content into a target language by using LLM.
Project description
Wenbi
A simple tool to make the video, audio, subtitle and video-url (especially youtube) content into a written markdown files with the ability to rewritten the oral expression into written ones, or translating the content into a target language by using LLM.
Initally, this porject is just serving to my website GCDFL. We do a service to turn its lectures into a written files for easier further editing.
Note: LLM can make mistakes and cannot be fully trusted. LLM can only be used for preliminary processing of data, some elementary work, and in this sense, LLM does greatly improve editing efficiency.
you can try the demo, right now only remove the timestamps and joining the lines.
Features
-
:100: Accept most popular audio, video, subtitle files and url--mainly using yt-dlp as input.
-
:100: Editing the files by using LLM to rewriting and translating the content into a readable written markdown files.
-
:100: Support input with multiple languages.
-
:100: offer an commandline and gradio GUI with multiple options for further personal settings
-
:x: Right now are only support Ollama models, working on other models in OpenAi, Google and others.
Cons
- This project right now is main server to the language English, Chinese, Japanese. For other languages, trying to use a different Ollama models.
Install
prerequest
- Install Ollama and dowload a model. The default model for this project is qwen2.5.
method one
pip install wenbi
:notice: you may nedd install llvmlite and numba first, then install wenbi. Of course, you need install on a virtue environment.
After install, you can simply using wenbi commandline.
method two from source
- install rye
first step clone this repository
git clone https://github.com/Areopaguaworkshop/wenbi.git
second step
cd wenbi
mv pyproject.toml pyproject-bk.toml
rye init
third step
copy whole content of the pyproject-bk.toml into pyproject.toml
Then run
source .venv/bin/activate
rye pin 3.12
rye sync
four step
You can choose commandline or webGUI through gradio.
- gradio
python main.py
Then go to http://localhost:7860.
- commandline
'python cli.py --help'
usage: cli.py [-h] [--language LANGUAGE] [--llm LLM] [--multi-language] [--translate-lang TRANSLATE_LANG] [--output-dir OUTPUT_DIR] input
wenbi: Convert video, audio, url or subtitle files to CSV and written Markdown outputs.
positional arguments: input Path to input file or URL
options: -h, --help show this help message and exit --language LANGUAGE Transcribe Language (optional) --llm LLM Large Language Model identifier (optional) --multi-language Enable multi-language processing (default: False) --translate-lang TRANSLATE_LANG Target translation language (default: Chinese) --output-dir OUTPUT_DIR Output directory (optional)
Note: if you want to convert the audio file of multi-language, you should set multi-language as True. for commandline is --multi-language. you nedd a HUGGINGFACE_TOKEN in you environment. by export HUGGINGFACE_TOKEN="you HUGGINGFACE_TOKEN here".
Enjoy!
Buy me a Cofee.
License:
AI-Subtitle-Editor is licensed under the Apache License 2.0 found in the LICENSE file in the root directory of this repository.
Citation:
title = {wenbi},
author = {Yuan, Yongjia},
year = {2024},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wenbi-0.14.5.tar.gz.
File metadata
- Download URL: wenbi-0.14.5.tar.gz
- Upload date:
- Size: 77.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4fdd523ff5c3f3eeb0a9e10e4ebcb9a6a74e1c2a679154ed563e5178f6bec9
|
|
| MD5 |
476d25a73069d5c3b369c12ab0e13728
|
|
| BLAKE2b-256 |
a3a113aab436607e041862f106f7b98569cfa65e37875ce490453fad885a8f95
|
File details
Details for the file wenbi-0.14.5-py3-none-any.whl.
File metadata
- Download URL: wenbi-0.14.5-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e250e02739083253bea603afe859017f78ca932555e0a1944fc004d31dcff9af
|
|
| MD5 |
6e5f3a01c9973322e3d8b954e75586f0
|
|
| BLAKE2b-256 |
8c03c4b1918f2b77d37eaac407517983a23a09bf767a7313e898dc6e7358ba2f
|