Skip to main content

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

  • Accept most popular audio, video, subtitle files and url--mainly using yt-dlp as input.

  • Editing the files by using LLM to rewriting and translating the content into a readable written markdown files.

  • Support input with multiple languages.

  • offer an commandline and gradio GUI with multiple options for further personal setting

Install

prerequest

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wenbi-0.11.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wenbi-0.11.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file wenbi-0.11.0.tar.gz.

File metadata

  • Download URL: wenbi-0.11.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for wenbi-0.11.0.tar.gz
Algorithm Hash digest
SHA256 9b7f124dc460465f8f370b2c103c970ddff95f638c0db6239d23fca0d8ee2431
MD5 e0d8f7bda64de3f4bac42144d36273a4
BLAKE2b-256 5d62dc0cfcfdb2fd7ea380e35831eb47535581f33ffaeed0af87ed5eb3d7e324

See more details on using hashes here.

File details

Details for the file wenbi-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: wenbi-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for wenbi-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c36b4ed80c617f0b9c6183d0e3a1ffcd6c58457630e9c7aec2a796f58445956
MD5 b635f696eddea5d84ea67109d265b31a
BLAKE2b-256 56d878e4db76440c15ba385124c6f357c4bf242b6f68a1dcc88d5b73b77ee417

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page