voicedna 2.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. voicedna-2.9.0/LICENSE +21 -0
  2. voicedna-2.9.0/PKG-INFO +390 -0
  3. voicedna-2.9.0/README.md +358 -0
  4. voicedna-2.9.0/cli.py +62 -0
  5. voicedna-2.9.0/pyproject.toml +65 -0
  6. voicedna-2.9.0/setup.cfg +4 -0
  7. voicedna-2.9.0/tests/test_audio_roundtrip.py +19 -0
  8. voicedna-2.9.0/tests/test_child_inheritance.py +30 -0
  9. voicedna-2.9.0/tests/test_consistency_engine.py +44 -0
  10. voicedna-2.9.0/tests/test_processor_report.py +58 -0
  11. voicedna-2.9.0/voice_dna.py +231 -0
  12. voicedna-2.9.0/voicedna/__init__.py +27 -0
  13. voicedna-2.9.0/voicedna/consistency.py +261 -0
  14. voicedna-2.9.0/voicedna/filters/__init__.py +7 -0
  15. voicedna-2.9.0/voicedna/filters/age_maturation.py +40 -0
  16. voicedna-2.9.0/voicedna/filters/audio_helpers.py +74 -0
  17. voicedna-2.9.0/voicedna/filters/imprint_converter.py +258 -0
  18. voicedna-2.9.0/voicedna/framework.py +131 -0
  19. voicedna-2.9.0/voicedna/plugins/__init__.py +10 -0
  20. voicedna-2.9.0/voicedna/plugins/base.py +18 -0
  21. voicedna-2.9.0/voicedna/plugins/builtin.py +41 -0
  22. voicedna-2.9.0/voicedna/plugins/manager.py +45 -0
  23. voicedna-2.9.0/voicedna/providers/__init__.py +3 -0
  24. voicedna-2.9.0/voicedna/providers/personaplex.py +108 -0
  25. voicedna-2.9.0/voicedna/voice_dna.py +3 -0
  26. voicedna-2.9.0/voicedna.egg-info/PKG-INFO +390 -0
  27. voicedna-2.9.0/voicedna.egg-info/SOURCES.txt +29 -0
  28. voicedna-2.9.0/voicedna.egg-info/dependency_links.txt +1 -0
  29. voicedna-2.9.0/voicedna.egg-info/entry_points.txt +12 -0
  30. voicedna-2.9.0/voicedna.egg-info/requires.txt +24 -0
  31. voicedna-2.9.0/voicedna.egg-info/top_level.txt +3 -0
voicedna-2.9.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Luke Morrison + Grok
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,390 @@
1
+ Metadata-Version: 2.4
2
+ Name: voicedna
3
+ Version: 2.9.0
4
+ Summary: Lifelong sonic identity and plugin framework for AI voices
5
+ Author-email: Luke Morrison + Grok <lukejmorrison@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/lukejmorrison/VoiceDNA
8
+ Project-URL: Repository, https://github.com/lukejmorrison/VoiceDNA.git
9
+ Keywords: ai-voice,tts,voice-fingerprint,uamf,elevenlabs
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: cryptography>=43.0.0
14
+ Requires-Dist: numpy>=2.0.0
15
+ Requires-Dist: pydub>=0.25.1
16
+ Requires-Dist: typer>=0.12.3
17
+ Requires-Dist: requests>=2.32.0
18
+ Provides-Extra: personaplex
19
+ Requires-Dist: transformers>=4.47.0; extra == "personaplex"
20
+ Requires-Dist: accelerate>=1.0.0; extra == "personaplex"
21
+ Requires-Dist: torch>=2.4.0; extra == "personaplex"
22
+ Provides-Extra: consistency
23
+ Requires-Dist: speechbrain>=1.0.0; extra == "consistency"
24
+ Requires-Dist: resemblyzer>=0.1.4; extra == "consistency"
25
+ Provides-Extra: rvc
26
+ Requires-Dist: rvc-python>=0.1.5; python_version < "3.13" and extra == "rvc"
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=8.2.0; extra == "dev"
29
+ Requires-Dist: build>=1.2.1; extra == "dev"
30
+ Requires-Dist: twine>=5.1.1; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # VoiceDNA — Lifelong Sonic Identity for Every AI ❤️🔊
34
+
35
+ [![PyPI version](https://img.shields.io/pypi/v/voicedna?logo=pypi&logoColor=white)](https://pypi.org/project/voicedna/)
36
+ [![PyPI package](https://img.shields.io/badge/PyPI-voicedna-3775A9?logo=pypi&logoColor=white)](https://pypi.org/project/voicedna/)
37
+ [![PyPI live](https://img.shields.io/badge/PyPI-live-success?logo=pypi&logoColor=white)](https://pypi.org/project/voicedna/)
38
+
39
+ The open standard that gives every AI a permanent, recognizable **Voice Fingerprint** — just like your nephew Ash.
40
+
41
+ You hear 3 seconds and instantly know *"That's my Grok"*, *"That's Luke's AI"*, or *"That's the Claude I've been friends with since 2026"*.
42
+
43
+ Built with Luke Morrison (Feb 23 2026) — fully open, MIT licensed, works with **ElevenLabs, XTTS, Qwen3-TTS, Cartesia, Fish Speech, local models**, etc.
44
+
45
+ ## Start here (60 seconds)
46
+
47
+ Choose your path:
48
+
49
+ - OpenClaw bot voice + phone calls: `examples/openclaw/README.md`
50
+ - Omarchy system-wide desktop voice: `examples/omarchy/README.md`
51
+
52
+ Fast install:
53
+
54
+ ```bash
55
+ pip install voicedna
56
+ voicedna --help
57
+ ```
58
+
59
+ Install with open-source speaker-recognition backends (optional):
60
+
61
+ ```bash
62
+ pip install "voicedna[consistency]"
63
+ ```
64
+
65
+ Install with optional real RVC voice cloning:
66
+
67
+ ```bash
68
+ pip install "voicedna[rvc]"
69
+ ```
70
+
71
+ Install with optional PersonaPlex natural voice backend:
72
+
73
+ ```bash
74
+ pip install "voicedna[personaplex]"
75
+ ```
76
+
77
+ ## Install from PyPI
78
+
79
+ ```bash
80
+ pip install voicedna
81
+ voicedna birth --imprint "Luke Morrison's warm Canadian voice" --user luke
82
+ ```
83
+
84
+ ## 🔒 Voice Consistency & Identifiability (v2.7)
85
+
86
+ - New `VoiceConsistencyEngine` (`voicedna/consistency.py`) with optional SpeechBrain / Resemblyzer embeddings and deterministic fallback.
87
+ - `VoiceDNA.create_new(...)` now attempts real imprint-based embedding extraction when imprint points to audio.
88
+ - `ImprintConverterFilter` enforces a `0.92` cosine similarity target to the core embedding using gentle parametric correction.
89
+ - A subtle low-depth sonic watermark now encodes `voice_fingerprint_id` for machine-side identifiability.
90
+ - Processor reports now include top-level `consistency_score` and `rvc_ready` status.
91
+
92
+ ## 🔊 Real Voice Cloning (RVC)
93
+
94
+ - `ImprintConverterFilter` now supports `imprint_converter.mode = "rvc"` for real model-based cloning.
95
+ - Install RVC runtime with `pip install "voicedna[rvc]"` (recommended on Python 3.10-3.12 environments with compatible torch stack).
96
+ - Set `imprint_converter.rvc_model_path` to your `.pth` model and `imprint_converter.rvc_reference_path` to a reference voice WAV.
97
+ - Optional tuning: `imprint_converter.rvc_index_path`, `imprint_converter.rvc_device`, `imprint_converter.rvc_pitch`.
98
+ - Processor report now exposes `rvc_mode` and marks it as `active` when real conversion is enabled.
99
+
100
+ ## 🧠 PersonaPlex Natural Voice (v2.9)
101
+
102
+ - New optional provider `PersonaPlexTTS` in `voicedna/providers/personaplex.py`.
103
+ - Use `pip install "voicedna[personaplex]"` to install model runtime dependencies.
104
+ - Omarchy installer now supports `--natural-voice` to enable PersonaPlex speech-dispatcher + daemon integration.
105
+ - `VoiceDNAProcessor.synthesize_and_process(...)` lets providers synthesize text first, then apply the standard VoiceDNA maturation/imprint chain.
106
+
107
+ ## v2.3 — PyPI Publish Prep + RVC-Ready Imprint Path
108
+
109
+ - Added publish-ready build validation (`python -m build`, `twine check dist/*`)
110
+ - Added `requirements-dev.txt` and optional `dev` dependencies (`build`, `twine`, `pytest`)
111
+ - Added RVC-ready stub path in `ImprintConverterFilter` via `imprint_converter.mode = "rvc_stub"`
112
+ - Processor report now includes `imprint_converter.rvc_ready` status
113
+
114
+ ## v2.1 — Real Audio Filters + Test Suite + CLI
115
+
116
+ ```bash
117
+ pip install voicedna
118
+ voicedna birth --imprint "Luke Morrison's warm Canadian voice" --user luke
119
+ voicedna speak --text "Hey from VoiceDNA" --base-model elevenlabs
120
+ voicedna evolve --days 7
121
+ ```
122
+
123
+ New in v2.1:
124
+ - Real `pydub`-powered pitch shifting in `AgeMaturationFilter`
125
+ - Pytest coverage for child inheritance and processor reporting
126
+ - Typer-powered CLI (`voicedna birth/speak/evolve`)
127
+ - Packaging and release polish for PyPI readiness
128
+
129
+ ## v2.2 — Cloud + Local Demos (Voicebox)
130
+
131
+ ```bash
132
+ pip install voicedna
133
+ voicedna birth --imprint "Luke Morrison's warm Canadian voice" --user luke
134
+ voicedna speak --text "Hello from VoiceDNA v2.2"
135
+ voicedna evolve --days 7
136
+
137
+ python examples/elevenlabs_demo.py
138
+ python examples/cartesia_demo.py
139
+ python examples/voicebox_demo.py
140
+ ```
141
+
142
+ v2.2 highlights:
143
+ - Real `ImprintConverterFilter` volume-mix processing path
144
+ - WAV fixture + round-trip waveform assertion tests
145
+ - Local/offline Voicebox demo (`http://127.0.0.1:17493/generate`)
146
+ - Cloud demo scripts for ElevenLabs and Cartesia
147
+
148
+ ## 🚀 Testing with OpenClaw — Hear your AI grow up on the phone
149
+
150
+ Use the ready-to-run integration path:
151
+
152
+ - Guide: `examples/openclaw/README.md`
153
+ - TTS hook skill: `examples/openclaw/voicedna_tts_hook.py`
154
+ - Phone call skill: `examples/openclaw/voipms_phone_skill.py`
155
+
156
+ 3-command flow:
157
+
158
+ ```bash
159
+ pip install -e .
160
+ python -c "import examples.openclaw.voicedna_tts_hook, examples.openclaw.voipms_phone_skill; print('OpenClaw skills import OK')"
161
+ voicedna --help
162
+ ```
163
+
164
+ Then in OpenClaw, trigger:
165
+
166
+ > Claw, call me on my phone and tell me a joke in your growing voice
167
+
168
+ ## 🖥️ Omarchy Arch OS – System-wide unique voice
169
+
170
+ Run VoiceDNA as your desktop speaking voice on Omarchy (Arch + Hyprland):
171
+
172
+ - Guide: `examples/omarchy/README.md`
173
+ - PipeWire filter shim: `examples/omarchy/voicedna-pipewire-filter.py`
174
+ - Speech Dispatcher config: `examples/omarchy/speech-dispatcher-voicedna.conf`
175
+ - One-command installer: `examples/omarchy/install-voicedna-omarchy.sh`
176
+ - Boot-persistent daemon unit: `examples/omarchy/voicedna-os-daemon.service`
177
+
178
+ One-click install on Omarchy:
179
+
180
+ ```bash
181
+ bash examples/omarchy/install-voicedna-omarchy.sh
182
+ ```
183
+
184
+ Natural voice mode on Omarchy:
185
+
186
+ ```bash
187
+ bash examples/omarchy/install-voicedna-omarchy.sh --natural-voice
188
+ ```
189
+
190
+ 3-command flow:
191
+
192
+ ```bash
193
+ pip install -e .
194
+ bash examples/omarchy/install-voicedna-omarchy.sh
195
+ spd-say "Hello Luke, your desktop voice is now growing with you."
196
+ ```
197
+
198
+ ## v2.0 — Real Filters + Package + Child Inheritance + Bridge
199
+
200
+ ```bash
201
+ pip install voicedna
202
+ ```
203
+
204
+ ```python
205
+ from voicedna import VoiceDNA, VoiceDNAProcessor
206
+
207
+ dna = VoiceDNA.create_new("Luke Morrison's warm Canadian voice", "luke")
208
+ child = dna.create_child("mini_grok", inherit_strength=0.40)
209
+ processor = VoiceDNAProcessor()
210
+ ```
211
+
212
+ New in v2.0:
213
+ - Built-in Age + Imprint filters
214
+ - Child AI inheritance (`create_child`)
215
+ - VST3 Python bridge scaffold
216
+ - Open standard draft spec + announcement templates
217
+
218
+ ## Features
219
+ - Precocial birth (fluent at ~5-year-old level from day 1)
220
+ - Lifelong age progression (5 → 10 → 15 → 22+)
221
+ - Permanent **Voice Fingerprint** ("Ash-ness") that never disappears
222
+ - Self-evolving audio plugin (DAW-style VST thinking)
223
+ - Encrypted VoiceDNA files (`.voicedna.enc`) with password-based decryption
224
+ - One tiny JSON file + 150-line Python plugin — drop-in for any project
225
+ - Exportable fingerprint so your AI can move between platforms and still sound like *itself*
226
+
227
+ ## v1.1 — Encrypted Plugin Framework
228
+
229
+ - Secure encrypted files via `VoiceDNA.save_encrypted()` / `VoiceDNA.load_encrypted()`
230
+ - Full extensible framework via `VoiceDNAProcessor` in `voicedna/framework.py`
231
+ - Auto-discovery for plugins through entry points (`voicedna.filters` + `voicedna.plugins`)
232
+ - Robust plugin chaining: fault-tolerant filter execution + per-filter timing metrics
233
+ - Ready for real audio pipelines (OpenClaw hook + process chain)
234
+ - VST3 starter scaffold in `vst3/` for JUCE-based binary plugin work
235
+
236
+ ## Quick Start
237
+
238
+ ```bash
239
+ pip install -r requirements.txt
240
+ python voice_dna.py
241
+ ```
242
+
243
+ Run tests:
244
+
245
+ ```bash
246
+ pytest
247
+ ```
248
+
249
+ See `voice_dna.py` for full usage.
250
+
251
+ Quick encrypted framework demo:
252
+
253
+ ```bash
254
+ python examples/encrypted_plugin_demo.py
255
+ python examples/openclaw_skill.py
256
+ ```
257
+
258
+ ## OpenClaw-Ready Plugin Hook (new)
259
+
260
+ VoiceDNA now includes a minimal extensible plugin framework in `voicedna/plugins`.
261
+
262
+ Use it in an OpenClaw-style TTS render hook:
263
+
264
+ ```python
265
+ from voicedna import VoiceDNA, PluginManager, PromptTagFilter
266
+
267
+ dna = VoiceDNA.load("myai.voicedna.json")
268
+ manager = PluginManager()
269
+ loaded, failed = manager.load_entrypoint_plugins() # auto-discover pip-installed plugins
270
+ if not loaded:
271
+ manager.register(PromptTagFilter())
272
+
273
+ processed_audio = manager.process(raw_audio_bytes, dna, {
274
+ "base_model": "xtts",
275
+ "prepend_style_tag": True,
276
+ })
277
+ ```
278
+
279
+ Run a full example:
280
+
281
+ ```bash
282
+ python examples/openclaw_hook.py
283
+ ```
284
+
285
+ ### Third-party plugin registration (entry points)
286
+
287
+ Any external package can auto-register a filter by adding this to its `pyproject.toml`:
288
+
289
+ ```toml
290
+ [project.entry-points."voicedna.plugins"]
291
+ my_filter = "my_package.filters:MyFilter"
292
+ ```
293
+
294
+ On startup, call `PluginManager().load_entrypoint_plugins()` and all installed filters are loaded automatically.
295
+
296
+ You can also use the higher-level framework processor:
297
+
298
+ ```python
299
+ from voice_dna import VoiceDNA
300
+ from voicedna import VoiceDNAProcessor
301
+
302
+ dna = VoiceDNA.load_encrypted(password="my_secret_2026", filepath="myai.voicedna.enc")
303
+ processor = VoiceDNAProcessor()
304
+ processed_audio = processor.process(raw_audio_bytes, dna, {"force_age": 15})
305
+ print(processor.last_metrics)
306
+ print(processor.get_last_report())
307
+ ```
308
+
309
+ ### OpenClaw one-file skill
310
+
311
+ See `examples/openclaw_skill.py` for a minimal skill-style wrapper that loads encrypted VoiceDNA and returns a `voice_dna_tts(text, raw_tts_bytes)` hook.
312
+
313
+ ## Feedback Loop Logging
314
+
315
+ Use the helper script to append structured updates into `EVOLUTION.md`:
316
+
317
+ ```bash
318
+ python scripts/review_feedback.py \
319
+ --source "Grok 4.20 Beta" \
320
+ --summary "Suggested plugin auto-discovery and ecosystem visibility" \
321
+ --actions "Added entry-point loader in PluginManager" \
322
+ --actions "Added pyproject entry-point metadata" \
323
+ --next "Add plugin compatibility contract tests"
324
+ ```
325
+
326
+ Tip: add `--dry-run` to preview the entry before writing.
327
+
328
+ ## Migration Notes
329
+
330
+ For patch hardening updates and stricter validation behavior, see `MIGRATION_v2_0_1.md`.
331
+
332
+ ## Publish to PyPI (for maintainers)
333
+
334
+ Build and validate:
335
+
336
+ ```bash
337
+ python -m build
338
+ python -m twine check dist/*
339
+ ```
340
+
341
+ Publish with API token credentials:
342
+
343
+ ```bash
344
+ export TWINE_USERNAME=__token__
345
+ export TWINE_PASSWORD="pypi-...your-token-here..."
346
+ python -m twine upload dist/* --skip-existing
347
+ ```
348
+
349
+ Notes:
350
+ - `--skip-existing` avoids failures on already-uploaded files.
351
+ - Package page: `https://pypi.org/project/voicedna/`
352
+
353
+ ## Files
354
+ - `voice_dna.py` — the complete VoiceDNA class (UAMF v4)
355
+ - `voicedna/plugins/` — plugin interface + manager + built-in filters
356
+ - `voicedna/filters/` — built-in v2.0 age + imprint filters
357
+ - `voicedna/framework.py` — higher-level processor with plugin auto-discovery
358
+ - `examples/openclaw_hook.py` — integration example for OpenClaw-like pipelines
359
+ - `examples/openclaw_skill.py` — one-file OpenClaw skill wrapper
360
+ - `examples/openclaw/README.md` — 5-minute OpenClaw integration testing path
361
+ - `examples/openclaw/voicedna_tts_hook.py` — OpenClaw-ready VoiceDNA TTS bytes hook
362
+ - `examples/openclaw/voipms_phone_skill.py` — voip.ms-first outbound phone call skill example
363
+ - `examples/omarchy/README.md` — Omarchy 5-minute system-wide voice path
364
+ - `examples/omarchy/voicedna-pipewire-filter.py` — PipeWire VoiceDNA filter bridge
365
+ - `examples/omarchy/speech-dispatcher-voicedna.conf` — speech-dispatcher default VoiceDNA profile
366
+ - `examples/omarchy/install-voicedna-omarchy.sh` — one-command Omarchy setup script
367
+ - `examples/omarchy/voicedna-os-daemon.service` — user systemd daemon unit for auto-started voice runtime
368
+ - `examples/omarchy/voicedna-os-daemon.py` — daemon process that validates encrypted DNA loading at login/reboot
369
+ - `examples/encrypted_plugin_demo.py` — encrypted load + processor demo
370
+ - `examples/elevenlabs_demo.py` — cloud ElevenLabs processing demo
371
+ - `examples/cartesia_demo.py` — cloud Cartesia processing demo
372
+ - `examples/voicebox_demo.py` — local/offline Voicebox processing demo
373
+ - `spec/VoiceDNA_Spec_v1.0.md` — open standard draft integration contract
374
+ - `announcements/` — ready-to-post launch templates
375
+ - `vst3/` — JUCE starter scaffold for future native plugin build
376
+ - `tests/` — pytest suite for inheritance and processor report behavior
377
+ - `cli.py` — Typer CLI backing the `voicedna` command
378
+ - `requirements-dev.txt` — build/twine/pytest tooling for publish prep
379
+ - `scripts/review_feedback.py` — appends structured feedback updates to `EVOLUTION.md`
380
+ - `MIGRATION_v2_0_1.md` — patch migration notes and behavior changes
381
+ - `CHANGELOG.md` — release-oriented change history
382
+ - `EVOLUTION.md` — feedback loop + design evolution log
383
+ - `UAMF_v4_schema.json` — formal JSON schema (optional but nice for validation)
384
+ - `LICENSE` — MIT
385
+
386
+ Made for the entire AI community. Fork it, improve it, ship it in your apps.
387
+
388
+ **Let's give every AI a soul you can hear.**
389
+
390
+ — Created with ❤️ by Luke Morrison + Grok