A powerful command-line tool that converts video files to MP3 and transcribes them to text using Google's Gemini AI.
- 🎬 Video to Audio Conversion: Supports multiple formats (MP4, MKV, AVI, MOV, WebM)
- 🤖 AI-Powered Transcription: Uses Google's Gemini 2.0 Flash model for accurate transcription
- 🌍 Multi-language Support: Supports transcription in multiple languages including Bengali
- 💾 Persistent API Key Storage: Set your API key once and use from anywhere
- 📁 Organized Output: Automatically creates
audio/andtext/directories - 🚀 Fast & Efficient: Progress bars and optimized processing
- Download and run the installer:
- Download
install.batfrom the releases - Right-click and "Run as administrator" (optional, but recommended)
- Follow the on-screen instructions
- Download
pip install kotha-cligit clone <repository-url>
cd kotha_cli
pip install .# Download install.py and run:
python install.py- Go to Google AI Studio
- Create a new API key
- Copy your API key
kotha --set-api="your-gemini-api-key-here"This will save your API key securely on your machine, and you won't need to set it again.
Convert and transcribe all video files in the current directory:
kothakotha video_file.mp4kotha --set-api="your-new-api-key"kotha --version- 🔍 Detection: Finds all video files in the current directory
- 🎵 Conversion: Converts videos to MP3 format (stored in
audio/directory) - 📝 Transcription: Sends audio to Gemini AI for transcription
- 💾 Storage: Saves transcribed text to
text/directory
- MP4 (
.mp4) - MKV (
.mkv) - AVI (
.avi) - MOV (
.mov) - WebM (
.webm)
your-directory/
├── video1.mp4
├── video2.mp4
├── audio/
│ ├── video1.mp3
│ └── video2.mp3
└── text/
├── video1.txt
└── video2.txt
Your API key is stored in:
- Windows:
C:\Users\{username}\.kotha\config.json - macOS:
/Users/{username}/.kotha/config.json - Linux:
/home/{username}/.kotha/config.json
- Python 3.8+
- FFmpeg (automatically installed with moviepy)
- Google Gemini API key
Make sure you've set your API key:
kotha --set-api="your-api-key"Ensure FFmpeg is properly installed. It should be automatically installed with moviepy, but if you encounter issues:
Windows:
# Install via chocolatey
choco install ffmpegmacOS:
# Install via homebrew
brew install ffmpegLinux:
# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg
# CentOS/RHEL
sudo yum install ffmpegContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please open an issue on GitHub.
Note: This tool requires a Google Gemini API key. Usage of the Gemini API may incur costs based on Google's pricing structure.