Files
UmbraAudio/tts_server/sync_voice_data.sh
B.D. Murphy c86e323d7a Initial commit: UmbraAudio audiobook generation program
Quality-first multi-pass audiobook generation from English manuscripts.

Includes:
- umbraaudio/ core package (pipeline, config, voices, web review UI)
- scripts/ CLI utilities + model download script
- tts_server/ remote TTS server
- specs/ design docs, tests/, pyproject.toml + uv.lock
- Qwen3-TTS git submodule (pinned 022e286) with local demo.py UI patch
  saved at scripts/qwen3_tts_demo_umbra_patch.patch
- .env with runtime config/secrets

Excluded (see .gitignore): models/ (downloaded via scripts/download_models.sh),
output/, logs/, .venv, .umbra runtime data, and book projects
(DealHunterShip_*), which are committed separately.
2026-08-30 07:58:24 -07:00

39 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Package the voice reference wavs + cached ICL voice prompts (.pt) so they can
# be copied to the target TTS server machine (GPU). The remote ChapterBuilder /
# server uses these to generate every utterance with each speaker's identical
# voice identity.
#
# Usage (run ON THIS Mac):
# ./sync_voice_data.sh [target_host:dir]
# - with no args: writes a tarball ./voice_data.tar.gz you can scp manually
# - with a scp-style target (user@host:/path): copies it there and extracts
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
PROJ="/Volumes/1TB_APL_Storage/UmbraAudio/DealHunterShip_4.0e_whole-to-audio/.umbra"
TARBALL="$SCRIPT_DIR/voice_data.tar.gz"
TMP="$(mktemp -d)"
mkdir -p "$TMP/voices" "$TMP/voice_prompts"
echo ">> Bundling voice references + cached prompts"
cp "$PROJ"/voices/*_ref.wav "$TMP/voices/" 2>/dev/null || echo " no ref wavs"
cp "$PROJ"/voice_prompts/*.pt "$TMP/voice_prompts/" 2>/dev/null || echo " no cached prompts"
echo " voices: $(ls "$TMP/voices" | wc -l | tr -d ' ') files"
echo " prompts: $(ls "$TMP/voice_prompts" | wc -l | tr -d ' ') files"
tar -czf "$TARBALL" -C "$TMP" voices voice_prompts
rm -rf "$TMP"
ls -lh "$TARBALL" | awk '{print ">> Wrote", $9, "("$5")"}'
if [ $# -ge 1 ]; then
target="$1"
echo ">> Copying + extracting to $target"
scp "$TARBALL" "$target:"
ssh "${target%:*}" "mkdir -p voice_prompts && tar -xzf voice_data.tar.gz && mv voices/* voice_prompts/ 2>/dev/null; echo done"
fi