Spaces:
Running on Zero
Running on Zero
github-actions[bot] commited on
Commit Β·
1fa323e
1
Parent(s): fe88632
deploy: switch to chatterbox requirements @ f0510f6
Browse files
README.md
CHANGED
|
@@ -45,43 +45,56 @@ Video β Extract Audio β Whisper Transcription β LLM Translation
|
|
| 45 |
|
| 46 |
---
|
| 47 |
|
| 48 |
-
##
|
| 49 |
|
| 50 |
### Prerequisites
|
| 51 |
|
| 52 |
-
- Python 3.10+
|
| 53 |
-
- FFmpeg
|
| 54 |
-
- OpenAI API key
|
| 55 |
|
| 56 |
-
###
|
| 57 |
|
| 58 |
```bash
|
| 59 |
-
# Install uv (
|
| 60 |
curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 61 |
|
| 62 |
-
# Clone and
|
| 63 |
-
git clone https://github.com/
|
| 64 |
-
cd VideoVoice
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
# Configure
|
| 68 |
cp .env.example .env
|
| 69 |
-
# Edit .env
|
| 70 |
```
|
| 71 |
|
| 72 |
-
###
|
|
|
|
|
|
|
| 73 |
|
| 74 |
```bash
|
| 75 |
-
|
|
|
|
| 76 |
```
|
| 77 |
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
| 85 |
|
| 86 |
```bash
|
| 87 |
uv run python pipeline.py --input data/my_video.mp4 --target-lang Spanish
|
|
|
|
| 45 |
|
| 46 |
---
|
| 47 |
|
| 48 |
+
## Running Locally
|
| 49 |
|
| 50 |
### Prerequisites
|
| 51 |
|
| 52 |
+
- Python 3.10+ (`requires-python = ">=3.10,<3.13"`)
|
| 53 |
+
- FFmpeg (`brew install ffmpeg` on macOS, `sudo apt install ffmpeg` on Ubuntu)
|
| 54 |
+
- An OpenAI API key
|
| 55 |
|
| 56 |
+
### First-time setup
|
| 57 |
|
| 58 |
```bash
|
| 59 |
+
# 1. Install uv (skip if you already have it)
|
| 60 |
curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 61 |
|
| 62 |
+
# 2. Clone and enter the repo
|
| 63 |
+
git clone https://github.com/Video-Voice/VideoVoice-be.git
|
| 64 |
+
cd VideoVoice-be
|
| 65 |
+
|
| 66 |
+
# 3. Install deps with the chatterbox TTS engine (default for local dev)
|
| 67 |
+
# Use `--extra omnivoice` instead if you want OmniVoice. The two extras
|
| 68 |
+
# are mutually exclusive β pick one.
|
| 69 |
+
uv sync --extra chatterbox
|
| 70 |
|
| 71 |
+
# 4. Configure env vars
|
| 72 |
cp .env.example .env
|
| 73 |
+
# Edit .env β at minimum set OPENAI_API_KEY and ARTIFACTS_ROOT=./data
|
| 74 |
```
|
| 75 |
|
| 76 |
+
### One-time: hide the vendored chatterbox folder
|
| 77 |
+
|
| 78 |
+
The repo ships a vendored `./chatterbox/` folder that the HF Chatterbox Space needs (it has ZeroGPU-specific tweaks). Locally we want Python to import the PyPI `chatterbox-tts` package instead, so tell git to ignore the working-tree state for that folder and delete it locally:
|
| 79 |
|
| 80 |
```bash
|
| 81 |
+
git ls-files chatterbox/ | xargs git update-index --skip-worktree
|
| 82 |
+
rm -rf chatterbox/
|
| 83 |
```
|
| 84 |
|
| 85 |
+
HEAD still contains the folder, so HF deploys are unaffected. Reverse with `git update-index --no-skip-worktree` + `git checkout HEAD -- chatterbox/`.
|
| 86 |
+
|
| 87 |
+
### Run the server
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
uv run python server.py
|
| 91 |
+
```
|
| 92 |
|
| 93 |
+
Open [http://localhost:8000](http://localhost:8000). `/api/*` are the backend routes; `/` serves the legacy static UI in `frontend/`. If the port is in use, set `PORT=8001`.
|
| 94 |
|
| 95 |
+
Per-job artifacts land in `$ARTIFACTS_ROOT/<job_id>/`. With `ARTIFACTS_ROOT=./data` (in `.env`) that's `./data/<job_id>/` next to the repo β same layout the repo has always used.
|
| 96 |
|
| 97 |
+
### Run the pipeline headlessly
|
| 98 |
|
| 99 |
```bash
|
| 100 |
uv run python pipeline.py --input data/my_video.mp4 --target-lang Spanish
|