Instructions to use autotools/ai_video_studio with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use autotools/ai_video_studio with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="autotools/ai_video_studio", filename="runtime/Auto Movie Reviewer/models/Phi-3.5-mini-balanced.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use autotools/ai_video_studio with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf autotools/ai_video_studio:Q4_K_M # Run inference directly in the terminal: llama cli -hf autotools/ai_video_studio:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf autotools/ai_video_studio:Q4_K_M # Run inference directly in the terminal: llama cli -hf autotools/ai_video_studio:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf autotools/ai_video_studio:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf autotools/ai_video_studio:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf autotools/ai_video_studio:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf autotools/ai_video_studio:Q4_K_M
Use Docker
docker model run hf.co/autotools/ai_video_studio:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use autotools/ai_video_studio with Ollama:
ollama run hf.co/autotools/ai_video_studio:Q4_K_M
- Unsloth Studio
How to use autotools/ai_video_studio with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for autotools/ai_video_studio to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for autotools/ai_video_studio to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for autotools/ai_video_studio to start chatting
- Atomic Chat new
- Docker Model Runner
How to use autotools/ai_video_studio with Docker Model Runner:
docker model run hf.co/autotools/ai_video_studio:Q4_K_M
- Lemonade
How to use autotools/ai_video_studio with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull autotools/ai_video_studio:Q4_K_M
Run and chat with the model
lemonade run user.ai_video_studio-Q4_K_M
List all available models
lemonade list
ποΈ KokoClone
KokoClone is a fast, real-time compatible multilingual voice cloning system built on top of Kokoro-ONNX, one of the fastest open-source neural TTS engines available today.
It allows you to:
- Text β Clone: Type text in multiple languages, provide a short reference audio clip, and instantly generate speech in that same voice.
- Audio β Clone: Re-voice an existing audio recording to sound like any reference speaker β no transcription needed.
Features
Multilingual Speech Generation
Generate native speech in English (en), Hindi (hi), French (fr), Japanese (ja), Chinese (zh), Italian (it), Portuguese (pt), and Spanish (es).
Zero-Shot Voice Cloning
Upload a 3β10 second voice sample and KokoClone instantly transfers its vocal characteristics to the generated speech.
Audio-to-Audio Voice Conversion
Upload any existing speech recording and re-voice it to sound like a reference speaker. The pipeline skips TTS entirely and runs purely through the Kanade voice-conversion model. Works on recordings of any length thanks to automatic VRAM-aware chunking!
Automatic Model Handling
On the first run, the required model weights (.onnx and .bin files) are automatically downloaded from Hugging Face and placed in the correct directories.
Real-Time Friendly
Built on Kokoro's efficient ONNX runtime pipeline, KokoClone detects your hardware and runs smoothly on both standard laptops (CPU) and workstations (GPU).
Live Demo
Try it instantly without installing anything:
π KokoClone on Hugging Face Spaces
Installation
You can set up KokoClone using either Conda (Recommended) or uv.
1. Clone the Repository
git clone https://github.com/Ashish-Patnaik/kokoclone.git
cd kokoclone
2. Set Up the Environment & Install Dependencies
Option A: Using Conda (Recommended)
conda create -n kokoclone python=3.12.12 -y
conda activate kokoclone
For CPU Users (Mac / Standard Laptops):
pip install torch torchaudio --index-url [https://download.pytorch.org/whl/cpu](https://download.pytorch.org/whl/cpu)
pip install -r requirements.txt
For GPU Users (Nvidia GPUs):
pip install -r requirements.txt
pip install kokoro-onnx[gpu]
Option B: Using uv
If you prefer uv for fast package management:
# For CPU Users
uv sync
# For GPU Users (Nvidia)
uv sync --extra gpu
# Activate the environment
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
Usage
KokoClone is highly flexible and can be used via Web UI, CLI, or Python API.
1. Web Interface (Gradio)
Launch the interactive web app:
python app.py
- Tab 1 (Text β Clone): Enter text, pick a language, upload a reference voice, and generate.
- Tab 2 (Audio β Clone): Upload source audio and a reference voice, and get back re-voiced audio.
2. Command Line Interface (CLI)
Generate speech directly from your terminal.
Text to cloned speech (default mode):
python cli.py --text "Hello from KokoClone" --lang en --ref reference.wav --out output.wav
Audio to re-voiced speech:
python cli.py --mode convert --source original_speech.wav --ref target_voice.wav --out revoiced.wav
| Argument | Default | Description |
|---|---|---|
--mode |
tts |
tts (text β speech) or convert (audio β re-voiced audio) |
--text |
β | Text to synthesize (required for tts mode) |
--lang |
en |
Language code: en hi fr ja zh it es pt |
--source |
β | Path to source audio (required for convert mode) |
--ref |
β | Path to reference voice audio (always required) |
--out |
output.wav |
Output file path |
3. Python API
Integrate KokoClone into your own Python applications.
Text to Cloned Speech:
from core.cloner import KokoClone
cloner = KokoClone()
cloner.generate(
text="This voice is cloned using KokoClone.",
lang="en",
reference_audio="reference.wav",
output_path="output.wav"
)
Audio-to-Audio Voice Conversion:
import soundfile as sf
from kanade_tokenizer import load_audio
from core.cloner import KokoClone
from core.chunked_convert import chunked_voice_conversion
cloner = KokoClone()
# Load audio tensors
source_wav = load_audio("source_speech.wav", sample_rate=cloner.sample_rate).to(cloner.device)
ref_wav = load_audio("target_voice.wav", sample_rate=cloner.sample_rate).to(cloner.device)
# Convert using VRAM-aware chunking
converted = chunked_voice_conversion(
kanade=cloner.kanade,
vocoder_model=cloner.vocoder,
source_wav=source_wav,
ref_wav=ref_wav,
sample_rate=cloner.sample_rate,
)
sf.write("revoiced_output.wav", converted.numpy(), cloner.sample_rate)
Memory Management for Long Audio
The chunked_voice_conversion function in core/chunked_convert.py handles memory automatically when converting long audio recordings:
- VRAM Budget: On CUDA, chunks are sized so each forward pass uses at most 50% of total GPU memory (configurable via the
vram_fractionparameter). - RoPE Ceiling: The Kanade
mel_decoderTransformer has positional embeddings precomputed for 1,024 mel frames. Chunk windows are hard-capped below this limit (β 8.9s of source audio per chunk) with a 10% safety margin to prevent recomputation and quality degradation. - Overlap Smoothing: Each chunk includes a 0.5s overlap on both sides to suppress boundary artifacts.
- Single-Pass Vocoding: The full reassembled mel spectrogram is passed to the vocoder in one shot for clean waveform reconstruction.
Project Structure
app.py β Gradio Web Interface (two-tab UI)
cli.py β Command-line tool (tts and convert modes)
inference.py β Example API usage script
core/
βββ cloner.py β Core TTS + voice cloning engine
βββ chunked_convert.py β VRAM-aware chunked audio conversion
model/ β Downloaded Kokoro model weights (Auto-populates)
voice/ β Downloaded Kokoro voice bins (Auto-populates)
Star History
Acknowledgments
This project builds upon the incredible open-source work of:
- Kokoro-ONNX β for fast and efficient neural speech synthesis.
- Kanade Tokenizer β for the brilliant zero-shot voice conversion architecture.
License
Licensed under the Apache 2.0 License.