piper speaking speeds

This commit is contained in:
MasterPhooey
2025-12-22 20:03:18 -06:00
parent 1f57796858
commit f1282bef8e
2 changed files with 10 additions and 3 deletions

View File

@@ -232,7 +232,7 @@
},
"outputs": [],
"source": [
"# Generate a large number of wake word samples for training\n",
"# Generate a large number of wake word samples for training (with length-scale sweep)\n",
"import sys, subprocess\n",
"from pathlib import Path\n",
"\n",
@@ -240,14 +240,21 @@
"MODELS_DIR = REPO_DIR / \"models\"\n",
"MODEL_NAME = \"en_US-libritts_r-medium.pt\"\n",
"\n",
"MAX_SAMPLES = 50000\n",
"BATCH_SIZE = 100\n",
"\n",
"# Piper \"speed\" control via piper-sample-generator is length_scale(s)\n",
"LENGTH_SCALES = [\"0.85\", \"0.95\", \"1.00\", \"1.05\", \"1.15\"]\n",
"\n",
"cmd = [\n",
" sys.executable,\n",
" str(REPO_DIR / \"generate_samples.py\"),\n",
" TARGET_WORD,\n",
" \"--model\", str(MODELS_DIR / MODEL_NAME),\n",
" \"--max-samples\", \"50000\",\n",
" \"--batch-size\", \"100\",\n",
" \"--max-samples\", str(MAX_SAMPLES),\n",
" \"--batch-size\", str(BATCH_SIZE),\n",
" \"--output-dir\", \"generated_samples\",\n",
" \"--length-scales\", *LENGTH_SCALES,\n",
"]\n",
"\n",
"print(\"→\", \" \".join(cmd))\n",