commit 6a6da2d06631da1e974a93ce32f9a74755f3d400 Author: Mikael Lövqvist Date: Sun Jun 7 08:54:31 2026 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eba74f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c547a3e --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Text to voice interface + +## Overview + +This project aims to provide text to voice with voice cloning ability. It is using chatterbox as backend. + + +## Origin + +This project started as a [vibe-coded](https://en.wikipedia.org/wiki/Vibe_coding) [experiment](https://gitea.efforting.tech/mikael-lovqvists-claude-agent/claude-voice-experiment) but this version is somewhat more hands on. + + +## Setup + +### Setup [venv](https://docs.python.org/3/library/venv.html) for [python](https://www.python.org/) + + Run [`setup-venv.sh`](./setup-venv.sh). + + > [!NOTE] + > The default location is a directory called `venv` that is created next to the script, but you can override it by using the environment variable `PYTHON_ENV` to point to a different location. + > + > ```console + > PYTHON_ENV='/some/path' ./setup-venv.s + > ``` \ No newline at end of file diff --git a/setup-venv.sh b/setup-venv.sh new file mode 100755 index 0000000..726ab57 --- /dev/null +++ b/setup-venv.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Creates a venv in ./venv and installs Python deps for Chatterbox +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VENV="${PYTHON_ENV:-${SCRIPT_DIR}/venv}" + +if [ ! -d "${VENV}" ]; then + echo "==> creating venv at ${VENV}" + python3 -m venv "${VENV}" +fi + +echo "==> installing Python dependencies" +"${VENV}/bin/pip" install --upgrade pip --quiet +"${VENV}/bin/pip" install chatterbox-tts + + +echo "" +echo "==> venv ready at ${VENV}"