superclonica-gpu-cuda 0.6.25__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 (67) hide show
  1. superclonica_gpu_cuda-0.6.25/LICENSE.txt +201 -0
  2. superclonica_gpu_cuda-0.6.25/NOTICE.txt +29 -0
  3. superclonica_gpu_cuda-0.6.25/PKG-INFO +244 -0
  4. superclonica_gpu_cuda-0.6.25/README.md +207 -0
  5. superclonica_gpu_cuda-0.6.25/SUPERTONIC_CODE_LICENSE.txt +21 -0
  6. superclonica_gpu_cuda-0.6.25/SUPERTONIC_MODEL_LICENSE.txt +209 -0
  7. superclonica_gpu_cuda-0.6.25/pyproject.toml +54 -0
  8. superclonica_gpu_cuda-0.6.25/setup.cfg +4 -0
  9. superclonica_gpu_cuda-0.6.25/src/superclonica/__init__.py +5 -0
  10. superclonica_gpu_cuda-0.6.25/src/superclonica/__main__.py +59 -0
  11. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/LICENSE +21 -0
  12. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/__init__.py +3 -0
  13. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/config.py +247 -0
  14. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/core.py +531 -0
  15. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/loader.py +462 -0
  16. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/pipeline.py +415 -0
  17. superclonica_gpu_cuda-0.6.25/src/superclonica/_supertonic/utils.py +217 -0
  18. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_runtime_heads.onnx +0 -0
  19. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_runtime_parent.onnx +0 -0
  20. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_runtime_window.npz +0 -0
  21. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_v15.npz +0 -0
  22. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_v16.npz +0 -0
  23. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_v21.json +46 -0
  24. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/confirmed_v21.npz +0 -0
  25. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/edge_denoiser_multivoice_v5.npz +0 -0
  26. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/fade_spectral_v8.npz +0 -0
  27. superclonica_gpu_cuda-0.6.25/src/superclonica/assets/prefix_noise_v1.npz +0 -0
  28. superclonica_gpu_cuda-0.6.25/src/superclonica/audio_io.py +18 -0
  29. superclonica_gpu_cuda-0.6.25/src/superclonica/batching.py +137 -0
  30. superclonica_gpu_cuda-0.6.25/src/superclonica/chunker.py +203 -0
  31. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/__init__.py +1 -0
  32. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/boundary.py +43 -0
  33. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/effects.py +83 -0
  34. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/ending_effect_v17.py +56 -0
  35. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/ending_effect_v18.py +63 -0
  36. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/ending_effect_v18b.py +11 -0
  37. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/ending_effect_v19.py +49 -0
  38. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/learned_repair_v15.py +124 -0
  39. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/onnx_zero_ending.py +118 -0
  40. superclonica_gpu_cuda-0.6.25/src/superclonica/confirmed/terminal_declick_v16.py +65 -0
  41. superclonica_gpu_cuda-0.6.25/src/superclonica/cpu_graph.py +305 -0
  42. superclonica_gpu_cuda-0.6.25/src/superclonica/cuda_graph.py +439 -0
  43. superclonica_gpu_cuda-0.6.25/src/superclonica/denoise.py +181 -0
  44. superclonica_gpu_cuda-0.6.25/src/superclonica/devices.py +278 -0
  45. superclonica_gpu_cuda-0.6.25/src/superclonica/duration_guard.py +37 -0
  46. superclonica_gpu_cuda-0.6.25/src/superclonica/edge_denoiser.py +258 -0
  47. superclonica_gpu_cuda-0.6.25/src/superclonica/ending.py +1558 -0
  48. superclonica_gpu_cuda-0.6.25/src/superclonica/ending_effect_gate.py +140 -0
  49. superclonica_gpu_cuda-0.6.25/src/superclonica/ending_reverb.py +92 -0
  50. superclonica_gpu_cuda-0.6.25/src/superclonica/engine.py +140 -0
  51. superclonica_gpu_cuda-0.6.25/src/superclonica/fade_selector.py +47 -0
  52. superclonica_gpu_cuda-0.6.25/src/superclonica/finisher.py +96 -0
  53. superclonica_gpu_cuda-0.6.25/src/superclonica/lanes.py +282 -0
  54. superclonica_gpu_cuda-0.6.25/src/superclonica/loudness.py +139 -0
  55. superclonica_gpu_cuda-0.6.25/src/superclonica/model_store.py +79 -0
  56. superclonica_gpu_cuda-0.6.25/src/superclonica/prefix_denoiser.py +109 -0
  57. superclonica_gpu_cuda-0.6.25/src/superclonica/resources.py +11 -0
  58. superclonica_gpu_cuda-0.6.25/src/superclonica/slang.py +53 -0
  59. superclonica_gpu_cuda-0.6.25/src/superclonica/spectral_fade.py +156 -0
  60. superclonica_gpu_cuda-0.6.25/src/superclonica/synthesis.py +387 -0
  61. superclonica_gpu_cuda-0.6.25/src/superclonica/text.py +41 -0
  62. superclonica_gpu_cuda-0.6.25/src/superclonica_gpu_cuda.egg-info/PKG-INFO +244 -0
  63. superclonica_gpu_cuda-0.6.25/src/superclonica_gpu_cuda.egg-info/SOURCES.txt +65 -0
  64. superclonica_gpu_cuda-0.6.25/src/superclonica_gpu_cuda.egg-info/dependency_links.txt +1 -0
  65. superclonica_gpu_cuda-0.6.25/src/superclonica_gpu_cuda.egg-info/entry_points.txt +2 -0
  66. superclonica_gpu_cuda-0.6.25/src/superclonica_gpu_cuda.egg-info/requires.txt +13 -0
  67. superclonica_gpu_cuda-0.6.25/src/superclonica_gpu_cuda.egg-info/top_level.txt +1 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,29 @@
1
+ Superclonica
2
+ Copyright 2026 superclonica.com
3
+
4
+ Licensed under the Apache License, Version 2.0 (LICENSE.txt). The Apache License
5
+ does not grant permission to use the name "Superclonica" or related trade names
6
+ except as required to describe the origin of the work.
7
+
8
+ Use of the Supertonic 3 model through this package is subject to paragraph 5 and
9
+ Attachment A of the BigScience Open RAIL-M license (SUPERTONIC_MODEL_LICENSE.txt);
10
+ those use restrictions apply to every user regardless of the license of this code.
11
+
12
+ Superclonica is built on Supertonic 3 by Supertone.
13
+ https://huggingface.co/Supertone/supertonic-3
14
+ https://github.com/supertone-inc/supertonic
15
+
16
+ Supertonic code: Copyright (c) 2025 Supertone Inc., MIT License.
17
+ Supertonic 3 model: BigScience Open RAIL-M License.
18
+ Copies of both upstream licenses accompany this distribution.
19
+
20
+ The package includes the MIT-licensed core modules of Supertonic SDK 1.3.1 under
21
+ the internal namespace superclonica._supertonic (license in that directory).
22
+ Superclonica adds text processing, chunked and parallel inference, rewritten model
23
+ graphs for CUDA graphs and CPU threading, learned audio finishing and denoising.
24
+ The rewrites change graph structure only; the original Supertonic model parameters
25
+ are unchanged and nothing is written to the model directory.
26
+
27
+ The base Supertonic weights are obtained separately from their original repository.
28
+ This is an independent derivative, not an official Supertone release. Third-party
29
+ dependencies retain their own licenses.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.4
2
+ Name: superclonica-gpu-cuda
3
+ Version: 0.6.25
4
+ Summary: Faster, cleaner Supertonic 3 text-to-speech: robust text cleanup, learned audio finishing and fast inference (NVIDIA CUDA 12)
5
+ Author: superclonica.com
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://superclonica.com/
8
+ Project-URL: Supertonic 3 model, https://huggingface.co/Supertone/supertonic-3
9
+ Keywords: tts,text-to-speech,speech-synthesis,supertonic,onnx,multilingual
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
17
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE.txt
21
+ License-File: NOTICE.txt
22
+ License-File: SUPERTONIC_CODE_LICENSE.txt
23
+ License-File: SUPERTONIC_MODEL_LICENSE.txt
24
+ Requires-Dist: numpy>=1.24
25
+ Requires-Dist: scipy>=1.10
26
+ Requires-Dist: onnx<2,>=1.16
27
+ Requires-Dist: huggingface-hub>=0.23
28
+ Requires-Dist: filelock>=3.13
29
+ Requires-Dist: soundfile>=0.12
30
+ Requires-Dist: pyloudnorm>=0.1.1
31
+ Requires-Dist: num2words>=0.5.13
32
+ Requires-Dist: onnxruntime-gpu[cuda,cudnn]==1.26.0
33
+ Requires-Dist: nvidia-cudnn-cu12==9.10.2.21
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest>=8; extra == "test"
36
+ Dynamic: license-file
37
+
38
+ # Superclonica
39
+
40
+ Faster, cleaner speech from [Supertonic 3](https://huggingface.co/Supertone/supertonic-3):
41
+ the same model and voices, with better sound and about 1.5x the speed of stock Supertonic on a
42
+ GPU (1.6x on a CPU). 31 languages.
43
+
44
+ Custom voices for it - free and paid, or trained from your own recording - are at
45
+ [superclonica.com](https://superclonica.com/).
46
+
47
+ ## Install
48
+
49
+ For an NVIDIA GPU (Windows or Linux x86-64, Python 3.11+):
50
+
51
+ ```bash
52
+ pip install superclonica-gpu-cuda
53
+ ```
54
+
55
+ For any CPU (Windows, Linux, macOS, Python 3.10+):
56
+
57
+ ```bash
58
+ pip install superclonica-cpu
59
+ ```
60
+
61
+ Install one of them per environment: both provide the same `superclonica` module. To switch
62
+ from the CPU package to the GPU one:
63
+
64
+ ```bash
65
+ pip uninstall -y superclonica-cpu onnxruntime
66
+ pip install superclonica-gpu-cuda
67
+ ```
68
+
69
+ ### Requirements
70
+
71
+ * **GPU package:** CUDA 12 and cuDNN come from pip; only an NVIDIA driver with CUDA 12 support
72
+ is needed (R525 or newer; RTX 50-series cards need R570 or newer). Without a working GPU it
73
+ falls back to the CPU with a warning.
74
+ * **Linux:** glibc 2.28 or newer (Ubuntu 20.04, Debian 10, RHEL 8 and later).
75
+ * **macOS on Intel:** Python 3.10-3.13; ONNX Runtime publishes no newer Intel macOS builds.
76
+ * **Windows on ARM:** Python 3.12 or newer; NumPy and SciPy publish no older ARM builds.
77
+
78
+ ### The model
79
+
80
+ The model (about 385 MB) is downloaded once on first use from its original Hugging Face
81
+ repository, at a pinned revision, into `~/.cache/supertonic3` - the same folder the official
82
+ `supertonic` package uses. Set `SUPERTONIC_CACHE_DIR` to keep it elsewhere, or pass an existing
83
+ copy to work offline:
84
+
85
+ ```python
86
+ tts = Superclonica(model_dir="path/to/supertonic-3")
87
+ ```
88
+
89
+ ## Quick start
90
+
91
+ ```python
92
+ from superclonica import Superclonica
93
+
94
+ tts = Superclonica() # GPU if available, else CPU
95
+ audio, sr = tts.synthesize("Hello! Nice to meet you.", voice="F3", lang="en", seed=7)
96
+ tts.save("hello.wav", audio)
97
+ ```
98
+
99
+ From the command line:
100
+
101
+ ```bash
102
+ superclonica --text "Good morning, everyone." --voice M1 --lang en --output hello.wav
103
+ ```
104
+
105
+ Create the engine once and reuse it: start-up takes a few seconds.
106
+
107
+ ## Better than stock Supertonic
108
+
109
+ ### Sound
110
+
111
+ * **Clean phrase edges.** Small learned models remove clicks and noise at the start and end,
112
+ and stray sounds the model sometimes adds after the last word (a click, a breath, an extra
113
+ syllable, a hum) are cut away. A second pass over the finished phrase removes the faint
114
+ breaths, thumps and clicks the model's hiss hid, and a piece that comes out empty or cut short
115
+ is rendered again.
116
+ * **Words stay whole.** The cleanup keeps the words' own sounds - a final s or t that stands
117
+ apart after its closure, a whispered first vowel, a last word after a pause - which is checked
118
+ against the model's raw output with a phoneme recognizer on thousands of renders in
119
+ 30+ languages.
120
+ * **No clipping.** The model often peaks above full scale; a look-ahead limiter lowers just
121
+ those peaks.
122
+ * **No dead air.** The model pads 0.25-0.6 s of silence before speech and 0.6-0.9 s after it;
123
+ this is trimmed to 80 ms and 200 ms, so speech starts sooner (`trim_silence=False` keeps the
124
+ padding).
125
+ * **Quiet background.** A denoiser and a pause gate remove the model's hiss between words
126
+ (about 40 dB lower than stock).
127
+ * **Fewer stutters and repeated words.** Long text is spoken in pieces of at most 160 characters
128
+ with natural pauses; stock uses up to 300, where repeats become several times more frequent.
129
+
130
+ ### Text
131
+
132
+ * **Numbers are spoken as words** in 27 languages; stock misreads larger numbers in some
133
+ languages.
134
+ * **Any text works.** Emoji, symbols and characters the model doesn't know are cleaned up
135
+ instead of failing the request; words like "can't" and "well-known" stay intact.
136
+ * **Abbreviations** such as "pls", "brb", "idk" and "btw" are spelled out before speaking;
137
+ stock reads them as made-up words. `slang=False` keeps them as written.
138
+
139
+ ### Speed
140
+
141
+ 24 short phrases in 8 languages, same settings for both:
142
+
143
+ | | Stock Supertonic | Superclonica |
144
+ |---|---|---|
145
+ | RTX 5070 Ti, median phrase | 174 ms | **117 ms** |
146
+ | Ryzen 7 5800X (4 threads), median phrase | 697 ms | **432 ms** |
147
+
148
+ CUDA graphs on GPU, multi-threaded model rewrites on CPU, parallel lanes and batches.
149
+
150
+ ## Custom voices
151
+
152
+ The ten built-in voices are just the start. [superclonica.com](https://superclonica.com/) is a
153
+ marketplace of custom Supertonic 3 voices, and they work with Superclonica as they are:
154
+
155
+ * try any voice online for free, and download the free ones without signing up;
156
+ * train a voice from your own 5-15 second recording, free, on your own NVIDIA GPU;
157
+ * or order a custom voice from one of the authors.
158
+
159
+ Each voice is a Supertonic voice-style JSON file:
160
+
161
+ ```python
162
+ audio, sr = tts.synthesize("Welcome back!", voice="my_voice.json", lang="en")
163
+ ```
164
+
165
+ ## API
166
+
167
+ ### `Superclonica(...)`
168
+
169
+ ```python
170
+ Superclonica(model_dir=None, total_steps=None, speed=1.05, *,
171
+ device="auto", device_id=0, threads=None, lanes=1,
172
+ gpu_memory_mb=1024, cuda_graph="auto", chunking=True, numbers=True,
173
+ denoise=True, target_lufs=-18.0, trim_silence=True, slang=True)
174
+ ```
175
+
176
+ | Parameter | What it does |
177
+ |---|---|
178
+ | `model_dir` | An existing Supertonic 3 copy (default: the automatic download above). |
179
+ | `total_steps` | Model steps per phrase (default 8). |
180
+ | `speed` | Speaking rate. |
181
+ | `device` | `"auto"` (GPU if it works, else CPU), `"cuda"` or `"cpu"`. |
182
+ | `device_id`, `gpu_memory_mb`, `cuda_graph` | GPU number, memory limit per model session, CUDA graphs (`"auto"`, `True`, `False`). |
183
+ | `threads` | CPU threads (default: one per physical core). |
184
+ | `lanes` | Independent model copies for the pieces of a long text and concurrent callers. |
185
+ | `chunking`, `numbers`, `denoise`, `trim_silence`, `slang` | Turn the text and sound steps above on or off. |
186
+ | `target_lufs` | Loudness used by `normalize=True`. |
187
+
188
+ ### `synthesize`
189
+
190
+ ```python
191
+ synthesize(text, voice="M1", lang="en", *, seed=None, effect="auto", numbers=None,
192
+ normalize=False, return_report=False)
193
+ ```
194
+
195
+ Returns `(audio, sample_rate)`: float32 mono at 44.1 kHz; with `return_report=True` also a dict
196
+ describing the run. `normalize=True` brings the phrase to `target_lufs`; `effect="off"` disables
197
+ the ending effects (the cleanup always runs).
198
+
199
+ ### `synthesize_batch`
200
+
201
+ Several texts at once, with the same options; voices, languages and seeds may be single values or
202
+ one per text, and the results keep the input order:
203
+
204
+ ```python
205
+ results = tts.synthesize_batch(["First line.", "Second line."],
206
+ voices="F3", langs="en", seeds=[1, 2])
207
+ for audio, sr in results:
208
+ print(len(audio) / sr, "seconds")
209
+ ```
210
+
211
+ ### `save`
212
+
213
+ `tts.save(path, audio)` writes WAV (16-bit) or any other format soundfile supports.
214
+
215
+ ### Voices and languages
216
+
217
+ * **Voices:** `M1`-`M5`, `F1`-`F5`, or any Supertonic voice-style JSON, such as a custom voice
218
+ from [superclonica.com](https://superclonica.com/).
219
+ * **Languages (31):** `ar` `bg` `cs` `da` `de` `el` `en` `es` `et` `fi` `fr` `hi` `hr` `hu` `id`
220
+ `it` `ja` `ko` `lt` `lv` `nl` `pl` `pt` `ro` `ru` `sk` `sl` `sv` `tr` `uk` `vi`
221
+
222
+ ## Command line
223
+
224
+ ```bash
225
+ superclonica --text "Good morning!" --voice F3 --lang en --seed 7 --output morning.wav
226
+ superclonica --text-file story.txt --voice my_voice.json --lang en --output story.wav
227
+ superclonica --help
228
+ ```
229
+
230
+ ## Responsible use
231
+
232
+ The Supertonic 3 model is licensed under the BigScience Open RAIL-M license. Its use restrictions
233
+ (Attachment A in `SUPERTONIC_MODEL_LICENSE.txt`) apply to everyone using it through this package:
234
+ among others, do not impersonate people without their consent, do not defame or harass, and
235
+ disclose that generated content is machine-generated.
236
+
237
+ ## License
238
+
239
+ Apache-2.0, © 2026 superclonica.com. An independent derivative of Supertonic, not an official
240
+ Supertone release. The bundled Supertonic SDK code is MIT; the Supertonic 3 model is under the
241
+ BigScience Open RAIL-M license. See `NOTICE.txt`.
242
+
243
+ More about the project, custom voices and how to make your own:
244
+ [superclonica.com](https://superclonica.com/).
@@ -0,0 +1,207 @@
1
+ # Superclonica
2
+
3
+ Faster, cleaner speech from [Supertonic 3](https://huggingface.co/Supertone/supertonic-3):
4
+ the same model and voices, with better sound and about 1.5x the speed of stock Supertonic on a
5
+ GPU (1.6x on a CPU). 31 languages.
6
+
7
+ Custom voices for it - free and paid, or trained from your own recording - are at
8
+ [superclonica.com](https://superclonica.com/).
9
+
10
+ ## Install
11
+
12
+ For an NVIDIA GPU (Windows or Linux x86-64, Python 3.11+):
13
+
14
+ ```bash
15
+ pip install superclonica-gpu-cuda
16
+ ```
17
+
18
+ For any CPU (Windows, Linux, macOS, Python 3.10+):
19
+
20
+ ```bash
21
+ pip install superclonica-cpu
22
+ ```
23
+
24
+ Install one of them per environment: both provide the same `superclonica` module. To switch
25
+ from the CPU package to the GPU one:
26
+
27
+ ```bash
28
+ pip uninstall -y superclonica-cpu onnxruntime
29
+ pip install superclonica-gpu-cuda
30
+ ```
31
+
32
+ ### Requirements
33
+
34
+ * **GPU package:** CUDA 12 and cuDNN come from pip; only an NVIDIA driver with CUDA 12 support
35
+ is needed (R525 or newer; RTX 50-series cards need R570 or newer). Without a working GPU it
36
+ falls back to the CPU with a warning.
37
+ * **Linux:** glibc 2.28 or newer (Ubuntu 20.04, Debian 10, RHEL 8 and later).
38
+ * **macOS on Intel:** Python 3.10-3.13; ONNX Runtime publishes no newer Intel macOS builds.
39
+ * **Windows on ARM:** Python 3.12 or newer; NumPy and SciPy publish no older ARM builds.
40
+
41
+ ### The model
42
+
43
+ The model (about 385 MB) is downloaded once on first use from its original Hugging Face
44
+ repository, at a pinned revision, into `~/.cache/supertonic3` - the same folder the official
45
+ `supertonic` package uses. Set `SUPERTONIC_CACHE_DIR` to keep it elsewhere, or pass an existing
46
+ copy to work offline:
47
+
48
+ ```python
49
+ tts = Superclonica(model_dir="path/to/supertonic-3")
50
+ ```
51
+
52
+ ## Quick start
53
+
54
+ ```python
55
+ from superclonica import Superclonica
56
+
57
+ tts = Superclonica() # GPU if available, else CPU
58
+ audio, sr = tts.synthesize("Hello! Nice to meet you.", voice="F3", lang="en", seed=7)
59
+ tts.save("hello.wav", audio)
60
+ ```
61
+
62
+ From the command line:
63
+
64
+ ```bash
65
+ superclonica --text "Good morning, everyone." --voice M1 --lang en --output hello.wav
66
+ ```
67
+
68
+ Create the engine once and reuse it: start-up takes a few seconds.
69
+
70
+ ## Better than stock Supertonic
71
+
72
+ ### Sound
73
+
74
+ * **Clean phrase edges.** Small learned models remove clicks and noise at the start and end,
75
+ and stray sounds the model sometimes adds after the last word (a click, a breath, an extra
76
+ syllable, a hum) are cut away. A second pass over the finished phrase removes the faint
77
+ breaths, thumps and clicks the model's hiss hid, and a piece that comes out empty or cut short
78
+ is rendered again.
79
+ * **Words stay whole.** The cleanup keeps the words' own sounds - a final s or t that stands
80
+ apart after its closure, a whispered first vowel, a last word after a pause - which is checked
81
+ against the model's raw output with a phoneme recognizer on thousands of renders in
82
+ 30+ languages.
83
+ * **No clipping.** The model often peaks above full scale; a look-ahead limiter lowers just
84
+ those peaks.
85
+ * **No dead air.** The model pads 0.25-0.6 s of silence before speech and 0.6-0.9 s after it;
86
+ this is trimmed to 80 ms and 200 ms, so speech starts sooner (`trim_silence=False` keeps the
87
+ padding).
88
+ * **Quiet background.** A denoiser and a pause gate remove the model's hiss between words
89
+ (about 40 dB lower than stock).
90
+ * **Fewer stutters and repeated words.** Long text is spoken in pieces of at most 160 characters
91
+ with natural pauses; stock uses up to 300, where repeats become several times more frequent.
92
+
93
+ ### Text
94
+
95
+ * **Numbers are spoken as words** in 27 languages; stock misreads larger numbers in some
96
+ languages.
97
+ * **Any text works.** Emoji, symbols and characters the model doesn't know are cleaned up
98
+ instead of failing the request; words like "can't" and "well-known" stay intact.
99
+ * **Abbreviations** such as "pls", "brb", "idk" and "btw" are spelled out before speaking;
100
+ stock reads them as made-up words. `slang=False` keeps them as written.
101
+
102
+ ### Speed
103
+
104
+ 24 short phrases in 8 languages, same settings for both:
105
+
106
+ | | Stock Supertonic | Superclonica |
107
+ |---|---|---|
108
+ | RTX 5070 Ti, median phrase | 174 ms | **117 ms** |
109
+ | Ryzen 7 5800X (4 threads), median phrase | 697 ms | **432 ms** |
110
+
111
+ CUDA graphs on GPU, multi-threaded model rewrites on CPU, parallel lanes and batches.
112
+
113
+ ## Custom voices
114
+
115
+ The ten built-in voices are just the start. [superclonica.com](https://superclonica.com/) is a
116
+ marketplace of custom Supertonic 3 voices, and they work with Superclonica as they are:
117
+
118
+ * try any voice online for free, and download the free ones without signing up;
119
+ * train a voice from your own 5-15 second recording, free, on your own NVIDIA GPU;
120
+ * or order a custom voice from one of the authors.
121
+
122
+ Each voice is a Supertonic voice-style JSON file:
123
+
124
+ ```python
125
+ audio, sr = tts.synthesize("Welcome back!", voice="my_voice.json", lang="en")
126
+ ```
127
+
128
+ ## API
129
+
130
+ ### `Superclonica(...)`
131
+
132
+ ```python
133
+ Superclonica(model_dir=None, total_steps=None, speed=1.05, *,
134
+ device="auto", device_id=0, threads=None, lanes=1,
135
+ gpu_memory_mb=1024, cuda_graph="auto", chunking=True, numbers=True,
136
+ denoise=True, target_lufs=-18.0, trim_silence=True, slang=True)
137
+ ```
138
+
139
+ | Parameter | What it does |
140
+ |---|---|
141
+ | `model_dir` | An existing Supertonic 3 copy (default: the automatic download above). |
142
+ | `total_steps` | Model steps per phrase (default 8). |
143
+ | `speed` | Speaking rate. |
144
+ | `device` | `"auto"` (GPU if it works, else CPU), `"cuda"` or `"cpu"`. |
145
+ | `device_id`, `gpu_memory_mb`, `cuda_graph` | GPU number, memory limit per model session, CUDA graphs (`"auto"`, `True`, `False`). |
146
+ | `threads` | CPU threads (default: one per physical core). |
147
+ | `lanes` | Independent model copies for the pieces of a long text and concurrent callers. |
148
+ | `chunking`, `numbers`, `denoise`, `trim_silence`, `slang` | Turn the text and sound steps above on or off. |
149
+ | `target_lufs` | Loudness used by `normalize=True`. |
150
+
151
+ ### `synthesize`
152
+
153
+ ```python
154
+ synthesize(text, voice="M1", lang="en", *, seed=None, effect="auto", numbers=None,
155
+ normalize=False, return_report=False)
156
+ ```
157
+
158
+ Returns `(audio, sample_rate)`: float32 mono at 44.1 kHz; with `return_report=True` also a dict
159
+ describing the run. `normalize=True` brings the phrase to `target_lufs`; `effect="off"` disables
160
+ the ending effects (the cleanup always runs).
161
+
162
+ ### `synthesize_batch`
163
+
164
+ Several texts at once, with the same options; voices, languages and seeds may be single values or
165
+ one per text, and the results keep the input order:
166
+
167
+ ```python
168
+ results = tts.synthesize_batch(["First line.", "Second line."],
169
+ voices="F3", langs="en", seeds=[1, 2])
170
+ for audio, sr in results:
171
+ print(len(audio) / sr, "seconds")
172
+ ```
173
+
174
+ ### `save`
175
+
176
+ `tts.save(path, audio)` writes WAV (16-bit) or any other format soundfile supports.
177
+
178
+ ### Voices and languages
179
+
180
+ * **Voices:** `M1`-`M5`, `F1`-`F5`, or any Supertonic voice-style JSON, such as a custom voice
181
+ from [superclonica.com](https://superclonica.com/).
182
+ * **Languages (31):** `ar` `bg` `cs` `da` `de` `el` `en` `es` `et` `fi` `fr` `hi` `hr` `hu` `id`
183
+ `it` `ja` `ko` `lt` `lv` `nl` `pl` `pt` `ro` `ru` `sk` `sl` `sv` `tr` `uk` `vi`
184
+
185
+ ## Command line
186
+
187
+ ```bash
188
+ superclonica --text "Good morning!" --voice F3 --lang en --seed 7 --output morning.wav
189
+ superclonica --text-file story.txt --voice my_voice.json --lang en --output story.wav
190
+ superclonica --help
191
+ ```
192
+
193
+ ## Responsible use
194
+
195
+ The Supertonic 3 model is licensed under the BigScience Open RAIL-M license. Its use restrictions
196
+ (Attachment A in `SUPERTONIC_MODEL_LICENSE.txt`) apply to everyone using it through this package:
197
+ among others, do not impersonate people without their consent, do not defame or harass, and
198
+ disclose that generated content is machine-generated.
199
+
200
+ ## License
201
+
202
+ Apache-2.0, © 2026 superclonica.com. An independent derivative of Supertonic, not an official
203
+ Supertone release. The bundled Supertonic SDK code is MIT; the Supertonic 3 model is under the
204
+ BigScience Open RAIL-M license. See `NOTICE.txt`.
205
+
206
+ More about the project, custom voices and how to make your own:
207
+ [superclonica.com](https://superclonica.com/).