diff --git a/docs/experiments/piper-female-voices-2026-10-17/README.md b/docs/experiments/piper-female-voices-2026-10-17/README.md new file mode 100644 index 0000000..c2932d1 --- /dev/null +++ b/docs/experiments/piper-female-voices-2026-10-17/README.md @@ -0,0 +1,32 @@ +# Piper female voice auditions — 17 October 2026 + +User requested female Piper samples generated on AT-Helper. Downloaded existing +public German Eva K. (x_low), Kerstin (low), Ramona (low) from +https://huggingface.co/rhasspy/piper-voices. Exact revision, per-file SHA256, +model sizes, synthetic text and real CPU timings are in `manifest.json`. +ONNX SHA256 values were checked against the repository's LFS object IDs. + +The existing `/opt/athena-helper-tts/piper-venv/bin/python3` ran `generate.py` +on AT-Helper Xeon X3450, explicitly `PiperVoice.load(..., use_cuda=False)`. +Each voice generated the same approximately 12–13-second text in about1.1s. +All three resulting MP3s were fully decoded with local FFmpeg before delivery. +No subjective quality/listening score is claimed. + +Upstream model cards: Kerstin dataset CC0; Eva K./Ramona refer to the M-AILABS +dataset terms at https://www.caito.de/2019/01/03/the-m-ailabs-speech-dataset/. +Model cards are preserved alongside downloaded weights on Helper. These are +legacy low/x_low models at16kHz. Piper emitted missing-phoneme warnings for a +combining cedilla during each generation; samples were retained without +silently changing text, phoneme maps or the runtime. + +No Piper API/gateway configuration, service, default voice, Athena/Strata or +Hermes setting changed. Public downloaded voice models and generated WAV/MP3 +remain in `/opt/athena-helper-tts/female-samples-20261017/{voice}/`. +Local playable delivery copies are in workspace +`work/piper-female-samples-20261017/`; binaries/audio are not committed to Git. + +Reproduce with the existing Piper runtime and FFmpeg: +`python3 generate.py ` (run with the Piper venv). +No new service or runtime is required. Downloaded public weights can be +recovered using the recorded revision/checksums; no private voice or credential +backup requirement is added. No native full-host restore was tested. diff --git a/docs/experiments/piper-female-voices-2026-10-17/generate.py b/docs/experiments/piper-female-voices-2026-10-17/generate.py new file mode 100644 index 0000000..e0e2740 --- /dev/null +++ b/docs/experiments/piper-female-voices-2026-10-17/generate.py @@ -0,0 +1,34 @@ +"""Download pinned official Piper voices, generate identical local CPU samples.""" +import urllib.request,json,hashlib,time,wave,subprocess,gc,sys +from pathlib import Path +root=Path('/opt/athena-helper-tts/female-samples-20261017');root.mkdir(parents=True,exist_ok=True) +def request(url): + with urllib.request.urlopen(url,timeout=180) as r:return r.read() +revision=sys.argv[1] if len(sys.argv)>1 else json.loads(request('https://huggingface.co/api/models/rhasspy/piper-voices'))['sha'] +voices=[('eva_k','x_low'),('kerstin','low'),('ramona','low')] +text='Hallo Michael. Ich bin eine der weiblichen Piper-Stimmen. Heute testen wir die Sprachausgabe auf deinem AT-Helper. Dein Zug nach Karlsruhe fährt um fünf Uhr einundzwanzig. Welche Stimme gefällt dir am besten?' +manifest={'revision':revision,'source':'rhasspy/piper-voices','text':text,'device':'cpu','voices':[]} +(root/'text.txt').write_text(text) +for name,quality in voices: + folder=root/name;folder.mkdir(exist_ok=True);remote=f'de/de_DE/{name}/{quality}';stem=f'de_DE-{name}-{quality}' + tree=json.loads(request(f'https://huggingface.co/api/models/rhasspy/piper-voices/tree/{revision}/{remote}')) + hashes={Path(e['path']).name:e.get('lfs',{}).get('oid') for e in tree if e['type']=='file'} + files=[] + for filename in (stem+'.onnx',stem+'.onnx.json','MODEL_CARD'): + path=folder/filename + if not path.exists(): + data=request(f'https://huggingface.co/rhasspy/piper-voices/resolve/{revision}/{remote}/{filename}');path.write_bytes(data) + digest=hashlib.sha256(path.read_bytes()).hexdigest();expected=hashes.get(filename) + if expected:assert digest==expected,f'Checksum mismatch: {filename}' + files.append({'filename':filename,'sha256':digest,'bytes':path.stat().st_size}) + print(json.dumps({'voice':name,'downloaded':True}),flush=True) + from piper import PiperVoice,SynthesisConfig + t=time.monotonic();voice=PiperVoice.load(str(folder/(stem+'.onnx')),use_cuda=False);load=time.monotonic()-t + t=time.monotonic() + with wave.open(str(folder/(name+'.wav')),'wb') as out:voice.synthesize_wav(text,out,syn_config=SynthesisConfig()) + elapsed=time.monotonic()-t + with wave.open(str(folder/(name+'.wav'))) as w:duration=w.getnframes()/w.getframerate() + subprocess.run(['/usr/bin/ffmpeg','-nostdin','-v','error','-y','-i',str(folder/(name+'.wav')),'-map_metadata','-1','-c:a','libmp3lame','-b:a','128k',str(folder/(name+'.mp3'))],check=True) + row={'name':name,'quality':quality,'load_seconds':load,'generation_seconds':elapsed,'audio_seconds':duration,'realtime_factor':elapsed/duration,'files':files};manifest['voices'].append(row) + (root/'manifest.json').write_text(json.dumps(manifest,indent=2,ensure_ascii=False));print(json.dumps({k:v for k,v in row.items() if k!='files'}),flush=True) + del voice;gc.collect() diff --git a/docs/experiments/piper-female-voices-2026-10-17/manifest.json b/docs/experiments/piper-female-voices-2026-10-17/manifest.json new file mode 100644 index 0000000..88e665b --- /dev/null +++ b/docs/experiments/piper-female-voices-2026-10-17/manifest.json @@ -0,0 +1,83 @@ +{ + "revision": "c10ece1aade47bb51c153c893d14e5bf8e5b7117", + "source": "rhasspy/piper-voices", + "text": "Hallo Michael. Ich bin eine der weiblichen Piper-Stimmen. Heute testen wir die Sprachausgabe auf deinem AT-Helper. Dein Zug nach Karlsruhe fährt um fünf Uhr einundzwanzig. Welche Stimme gefällt dir am besten?", + "device": "cpu", + "voices": [ + { + "name": "eva_k", + "quality": "x_low", + "load_seconds": 2.737270950106904, + "generation_seconds": 1.0568510971497744, + "audio_seconds": 13.424, + "realtime_factor": 0.07872847863153862, + "files": [ + { + "filename": "de_DE-eva_k-x_low.onnx", + "sha256": "e88cf290fbfb768bf111330d2e8a46e376b0d85e3423a28bfebbc863a260dad8", + "bytes": 20628813 + }, + { + "filename": "de_DE-eva_k-x_low.onnx.json", + "sha256": "ef14b3dcb279ab4b18422a7a132877bee7a148821bd91152fb7ae9c4b3d79625", + "bytes": 4158 + }, + { + "filename": "MODEL_CARD", + "sha256": "187741f947241c18a8d8cdf773fcec75325172628442a866c2da44a5f23e590f", + "bytes": 246 + } + ] + }, + { + "name": "kerstin", + "quality": "low", + "load_seconds": 2.7556086708791554, + "generation_seconds": 1.1389891610015184, + "audio_seconds": 12.224, + "realtime_factor": 0.09317646932276819, + "files": [ + { + "filename": "de_DE-kerstin-low.onnx", + "sha256": "d352a7641892cebf2903859af94e9ba81a141110215fe3943bcda7f7da401b7a", + "bytes": 63104526 + }, + { + "filename": "de_DE-kerstin-low.onnx.json", + "sha256": "56e708556b7b9b7a53c4f8957e021421e69f11a600962bba554cffbe72cf2d47", + "bytes": 4158 + }, + { + "filename": "MODEL_CARD", + "sha256": "7019006374a5fe5358186d5f3333e9f904385e7bdfbb68bc85dafce1a3cddae5", + "bytes": 272 + } + ] + }, + { + "name": "ramona", + "quality": "low", + "load_seconds": 2.7415031869895756, + "generation_seconds": 1.1337595849763602, + "audio_seconds": 12.368, + "realtime_factor": 0.09166878921218953, + "files": [ + { + "filename": "de_DE-ramona-low.onnx", + "sha256": "a1068592532aad8c49bf3d1a01b8749c11d7dba726689ee28ad64e7b627ae4c5", + "bytes": 63104526 + }, + { + "filename": "de_DE-ramona-low.onnx.json", + "sha256": "64906ab7a050ac685fa3dcea044baa798f67ed77be164f9c668a69298c6487d2", + "bytes": 4157 + }, + { + "filename": "MODEL_CARD", + "sha256": "3b6dbf2cde464e35cbdd3c06fccb34bf8cd590878c251391e9fd0a6f1bb993da", + "bytes": 255 + } + ] + } + ] +}