Skip to main content

A versatile tool for YouTube media downloading and AI processing with SQLite-based glossary.

Project description

imansur-ytb

A professional, modular AI pipeline for high-quality YouTube media ingestion and technical translation.

Philosophy: Modular Pipeline Architecture

This library is designed as a series of independent pipeline components. Each module is decoupled, meaning you can use the downloader without the translator, or provide your own transcripts to the translation engine.

Installation

pip install imansur-ytb

Module 1: Media (The Collector)

Handles media downloading with zero-touch FFmpeg management.

from imansur_ytb import get_video

# Returns a list of metadata dictionaries containing file paths
media_list = get_video("https://youtube.com/watch?v=...", audio_only=True)

Module 2: Translator (The Intelligence)

A standalone technical translation engine optimized for English-to-Turkish dubbing scripts. It features AI Term Discovery and persistent SQLite memory.

from imansur_ytb import translate_transcript

# Use as a standalone tool for any transcript JSON
translated_data = translate_transcript(
    transcript_path="my_transcript.json",
    api_key="YOUR_GEMINI_KEY", # or set GEMINI_API_KEY in .env
    verbose=True
)

Key Features of Module 2:

  • Zero-Config .env Support: Automatically picks up GEMINI_API_KEY.
  • SQLite Glossary: Ships with a default 1300+ term technical dictionary.
  • Auto-Learning: Discovers new terms during translation and updates the local glossary.
  • Consistency: Uses a double-pass AI logic to ensure terminology remains consistent across the entire transcript.

Parameter Reference

translate_transcript(...)

Parameter Type Default Description
transcript_path str Required Path to the input JSON transcript
api_key str None Gemini API Key (Will check .env if None)
model str "gemini-2.0-flash" AI Model (Optimized for Flash)
db_path str "glossary.db" Path to the persistent glossary DB

Developed by imansur - Building the future of AI Dubbing.

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

imansur_ytb-0.2.2.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

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

imansur_ytb-0.2.2-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file imansur_ytb-0.2.2.tar.gz.

File metadata

  • Download URL: imansur_ytb-0.2.2.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for imansur_ytb-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1b40b3cab77d65a7748c7ea3fb6aa0d390ae91cc59d5f2b05cabedd7aff9f52c
MD5 aa66ff774cf6989e43d5854e439b115a
BLAKE2b-256 97906925d0d4dd9b626ed9269f228860f04e3dad59e3901993a6ab3a5ab883f0

See more details on using hashes here.

File details

Details for the file imansur_ytb-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: imansur_ytb-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for imansur_ytb-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab05a114b4d2d7e84e5dc58c0714f7c17ca279fd6ee2b96575d2b9cb01a1ef26
MD5 d40cf7ca5ddbb05965092ea3a06dfc95
BLAKE2b-256 eb73c3434d5f51114c06d655fd04702ff2a17e6cedd33ee15dd1ec07a59851c9

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