sourojitdotcom commited on
Commit
f78effb
·
verified ·
1 Parent(s): 827ccc5

Private review: AksharaVP-17M release

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.gitattributes CHANGED
@@ -33,3 +33,27 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/architecture.png filter=lfs diff=lfs merge=lfs -text
37
+ assets/banner.gif filter=lfs diff=lfs merge=lfs -text
38
+ assets/banner.png filter=lfs diff=lfs merge=lfs -text
39
+ assets/landscape.png filter=lfs diff=lfs merge=lfs -text
40
+ assets/params.png filter=lfs diff=lfs merge=lfs -text
41
+ assets/results.png filter=lfs diff=lfs merge=lfs -text
42
+ assets/speech.gif filter=lfs diff=lfs merge=lfs -text
43
+ gguf/aksharavp-17m-f16.gguf filter=lfs diff=lfs merge=lfs -text
44
+ gguf/aksharavp-17m-f32.gguf filter=lfs diff=lfs merge=lfs -text
45
+ samples/en_clone.wav filter=lfs diff=lfs merge=lfs -text
46
+ samples/en_clone_reference.wav filter=lfs diff=lfs merge=lfs -text
47
+ samples/en_ishaan.wav filter=lfs diff=lfs merge=lfs -text
48
+ samples/en_meera.wav filter=lfs diff=lfs merge=lfs -text
49
+ samples/en_sneha.wav filter=lfs diff=lfs merge=lfs -text
50
+ samples/hi_clone.wav filter=lfs diff=lfs merge=lfs -text
51
+ samples/hi_clone_reference.wav filter=lfs diff=lfs merge=lfs -text
52
+ samples/hi_meera.wav filter=lfs diff=lfs merge=lfs -text
53
+ samples/hi_nandini.wav filter=lfs diff=lfs merge=lfs -text
54
+ samples/hi_siddharth.wav filter=lfs diff=lfs merge=lfs -text
55
+ samples/te_clone.wav filter=lfs diff=lfs merge=lfs -text
56
+ samples/te_clone_reference.wav filter=lfs diff=lfs merge=lfs -text
57
+ samples/te_lakshmi.wav filter=lfs diff=lfs merge=lfs -text
58
+ samples/te_sravani.wav filter=lfs diff=lfs merge=lfs -text
59
+ samples/te_srinivas.wav filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Attribution-NonCommercial 4.0 International
2
+
3
+ =======================================================================
4
+
5
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
6
+ does not provide legal services or legal advice. Distribution of
7
+ Creative Commons public licenses does not create a lawyer-client or
8
+ other relationship. Creative Commons makes its licenses and related
9
+ information available on an "as-is" basis. Creative Commons gives no
10
+ warranties regarding its licenses, any material licensed under their
11
+ terms and conditions, or any related information. Creative Commons
12
+ disclaims all liability for damages resulting from their use to the
13
+ fullest extent possible.
14
+
15
+ Using Creative Commons Public Licenses
16
+
17
+ Creative Commons public licenses provide a standard set of terms and
18
+ conditions that creators and other rights holders may use to share
19
+ original works of authorship and other material subject to copyright
20
+ and certain other rights specified in the public license below. The
21
+ following considerations are for informational purposes only, are not
22
+ exhaustive, and do not form part of our licenses.
23
+
24
+ Considerations for licensors: Our public licenses are
25
+ intended for use by those authorized to give the public
26
+ permission to use material in ways otherwise restricted by
27
+ copyright and certain other rights. Our licenses are
28
+ irrevocable. Licensors should read and understand the terms
29
+ and conditions of the license they choose before applying it.
30
+ Licensors should also secure all rights necessary before
31
+ applying our licenses so that the public can reuse the
32
+ material as expected. Licensors should clearly mark any
33
+ material not subject to the license. This includes other CC-
34
+ licensed material, or material used under an exception or
35
+ limitation to copyright. More considerations for licensors:
36
+ wiki.creativecommons.org/Considerations_for_licensors
37
+
38
+ Considerations for the public: By using one of our public
39
+ licenses, a licensor grants the public permission to use the
40
+ licensed material under specified terms and conditions. If
41
+ the licensor's permission is not necessary for any reason--for
42
+ example, because of any applicable exception or limitation to
43
+ copyright--then that use is not regulated by the license. Our
44
+ licenses grant only permissions under copyright and certain
45
+ other rights that a licensor has authority to grant. Use of
46
+ the licensed material may still be restricted for other
47
+ reasons, including because others have copyright or other
48
+ rights in the material. A licensor may make special requests,
49
+ such as asking that all changes be marked or described.
50
+ Although not required by our licenses, you are encouraged to
51
+ respect those requests where reasonable. More considerations
52
+ for the public:
53
+ wiki.creativecommons.org/Considerations_for_licensees
54
+
55
+ =======================================================================
56
+
57
+ Creative Commons Attribution-NonCommercial 4.0 International Public
58
+ License
59
+
60
+ By exercising the Licensed Rights (defined below), You accept and agree
61
+ to be bound by the terms and conditions of this Creative Commons
62
+ Attribution-NonCommercial 4.0 International Public License ("Public
63
+ License"). To the extent this Public License may be interpreted as a
64
+ contract, You are granted the Licensed Rights in consideration of Your
65
+ acceptance of these terms and conditions, and the Licensor grants You
66
+ such rights in consideration of benefits the Licensor receives from
67
+ making the Licensed Material available under these terms and
68
+ conditions.
69
+
70
+
71
+ Section 1 -- Definitions.
72
+
73
+ a. Adapted Material means material subject to Copyright and Similar
74
+ Rights that is derived from or based upon the Licensed Material
75
+ and in which the Licensed Material is translated, altered,
76
+ arranged, transformed, or otherwise modified in a manner requiring
77
+ permission under the Copyright and Similar Rights held by the
78
+ Licensor. For purposes of this Public License, where the Licensed
79
+ Material is a musical work, performance, or sound recording,
80
+ Adapted Material is always produced where the Licensed Material is
81
+ synched in timed relation with a moving image.
82
+
83
+ b. Adapter's License means the license You apply to Your Copyright
84
+ and Similar Rights in Your contributions to Adapted Material in
85
+ accordance with the terms and conditions of this Public License.
86
+
87
+ c. Copyright and Similar Rights means copyright and/or similar rights
88
+ closely related to copyright including, without limitation,
89
+ performance, broadcast, sound recording, and Sui Generis Database
90
+ Rights, without regard to how the rights are labeled or
91
+ categorized. For purposes of this Public License, the rights
92
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
93
+ Rights.
94
+ d. Effective Technological Measures means those measures that, in the
95
+ absence of proper authority, may not be circumvented under laws
96
+ fulfilling obligations under Article 11 of the WIPO Copyright
97
+ Treaty adopted on December 20, 1996, and/or similar international
98
+ agreements.
99
+
100
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
101
+ any other exception or limitation to Copyright and Similar Rights
102
+ that applies to Your use of the Licensed Material.
103
+
104
+ f. Licensed Material means the artistic or literary work, database,
105
+ or other material to which the Licensor applied this Public
106
+ License.
107
+
108
+ g. Licensed Rights means the rights granted to You subject to the
109
+ terms and conditions of this Public License, which are limited to
110
+ all Copyright and Similar Rights that apply to Your use of the
111
+ Licensed Material and that the Licensor has authority to license.
112
+
113
+ h. Licensor means the individual(s) or entity(ies) granting rights
114
+ under this Public License.
115
+
116
+ i. NonCommercial means not primarily intended for or directed towards
117
+ commercial advantage or monetary compensation. For purposes of
118
+ this Public License, the exchange of the Licensed Material for
119
+ other material subject to Copyright and Similar Rights by digital
120
+ file-sharing or similar means is NonCommercial provided there is
121
+ no payment of monetary compensation in connection with the
122
+ exchange.
123
+
124
+ j. Share means to provide material to the public by any means or
125
+ process that requires permission under the Licensed Rights, such
126
+ as reproduction, public display, public performance, distribution,
127
+ dissemination, communication, or importation, and to make material
128
+ available to the public including in ways that members of the
129
+ public may access the material from a place and at a time
130
+ individually chosen by them.
131
+
132
+ k. Sui Generis Database Rights means rights other than copyright
133
+ resulting from Directive 96/9/EC of the European Parliament and of
134
+ the Council of 11 March 1996 on the legal protection of databases,
135
+ as amended and/or succeeded, as well as other essentially
136
+ equivalent rights anywhere in the world.
137
+
138
+ l. You means the individual or entity exercising the Licensed Rights
139
+ under this Public License. Your has a corresponding meaning.
140
+
141
+
142
+ Section 2 -- Scope.
143
+
144
+ a. License grant.
145
+
146
+ 1. Subject to the terms and conditions of this Public License,
147
+ the Licensor hereby grants You a worldwide, royalty-free,
148
+ non-sublicensable, non-exclusive, irrevocable license to
149
+ exercise the Licensed Rights in the Licensed Material to:
150
+
151
+ a. reproduce and Share the Licensed Material, in whole or
152
+ in part, for NonCommercial purposes only; and
153
+
154
+ b. produce, reproduce, and Share Adapted Material for
155
+ NonCommercial purposes only.
156
+
157
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
158
+ Exceptions and Limitations apply to Your use, this Public
159
+ License does not apply, and You do not need to comply with
160
+ its terms and conditions.
161
+
162
+ 3. Term. The term of this Public License is specified in Section
163
+ 6(a).
164
+
165
+ 4. Media and formats; technical modifications allowed. The
166
+ Licensor authorizes You to exercise the Licensed Rights in
167
+ all media and formats whether now known or hereafter created,
168
+ and to make technical modifications necessary to do so. The
169
+ Licensor waives and/or agrees not to assert any right or
170
+ authority to forbid You from making technical modifications
171
+ necessary to exercise the Licensed Rights, including
172
+ technical modifications necessary to circumvent Effective
173
+ Technological Measures. For purposes of this Public License,
174
+ simply making modifications authorized by this Section 2(a)
175
+ (4) never produces Adapted Material.
176
+
177
+ 5. Downstream recipients.
178
+
179
+ a. Offer from the Licensor -- Licensed Material. Every
180
+ recipient of the Licensed Material automatically
181
+ receives an offer from the Licensor to exercise the
182
+ Licensed Rights under the terms and conditions of this
183
+ Public License.
184
+
185
+ b. No downstream restrictions. You may not offer or impose
186
+ any additional or different terms or conditions on, or
187
+ apply any Effective Technological Measures to, the
188
+ Licensed Material if doing so restricts exercise of the
189
+ Licensed Rights by any recipient of the Licensed
190
+ Material.
191
+
192
+ 6. No endorsement. Nothing in this Public License constitutes or
193
+ may be construed as permission to assert or imply that You
194
+ are, or that Your use of the Licensed Material is, connected
195
+ with, or sponsored, endorsed, or granted official status by,
196
+ the Licensor or others designated to receive attribution as
197
+ provided in Section 3(a)(1)(A)(i).
198
+
199
+ b. Other rights.
200
+
201
+ 1. Moral rights, such as the right of integrity, are not
202
+ licensed under this Public License, nor are publicity,
203
+ privacy, and/or other similar personality rights; however, to
204
+ the extent possible, the Licensor waives and/or agrees not to
205
+ assert any such rights held by the Licensor to the limited
206
+ extent necessary to allow You to exercise the Licensed
207
+ Rights, but not otherwise.
208
+
209
+ 2. Patent and trademark rights are not licensed under this
210
+ Public License.
211
+
212
+ 3. To the extent possible, the Licensor waives any right to
213
+ collect royalties from You for the exercise of the Licensed
214
+ Rights, whether directly or through a collecting society
215
+ under any voluntary or waivable statutory or compulsory
216
+ licensing scheme. In all other cases the Licensor expressly
217
+ reserves any right to collect such royalties, including when
218
+ the Licensed Material is used other than for NonCommercial
219
+ purposes.
220
+
221
+
222
+ Section 3 -- License Conditions.
223
+
224
+ Your exercise of the Licensed Rights is expressly made subject to the
225
+ following conditions.
226
+
227
+ a. Attribution.
228
+
229
+ 1. If You Share the Licensed Material (including in modified
230
+ form), You must:
231
+
232
+ a. retain the following if it is supplied by the Licensor
233
+ with the Licensed Material:
234
+
235
+ i. identification of the creator(s) of the Licensed
236
+ Material and any others designated to receive
237
+ attribution, in any reasonable manner requested by
238
+ the Licensor (including by pseudonym if
239
+ designated);
240
+
241
+ ii. a copyright notice;
242
+
243
+ iii. a notice that refers to this Public License;
244
+
245
+ iv. a notice that refers to the disclaimer of
246
+ warranties;
247
+
248
+ v. a URI or hyperlink to the Licensed Material to the
249
+ extent reasonably practicable;
250
+
251
+ b. indicate if You modified the Licensed Material and
252
+ retain an indication of any previous modifications; and
253
+
254
+ c. indicate the Licensed Material is licensed under this
255
+ Public License, and include the text of, or the URI or
256
+ hyperlink to, this Public License.
257
+
258
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
259
+ reasonable manner based on the medium, means, and context in
260
+ which You Share the Licensed Material. For example, it may be
261
+ reasonable to satisfy the conditions by providing a URI or
262
+ hyperlink to a resource that includes the required
263
+ information.
264
+
265
+ 3. If requested by the Licensor, You must remove any of the
266
+ information required by Section 3(a)(1)(A) to the extent
267
+ reasonably practicable.
268
+
269
+ 4. If You Share Adapted Material You produce, the Adapter's
270
+ License You apply must not prevent recipients of the Adapted
271
+ Material from complying with this Public License.
272
+
273
+
274
+ Section 4 -- Sui Generis Database Rights.
275
+
276
+ Where the Licensed Rights include Sui Generis Database Rights that
277
+ apply to Your use of the Licensed Material:
278
+
279
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
280
+ to extract, reuse, reproduce, and Share all or a substantial
281
+ portion of the contents of the database for NonCommercial purposes
282
+ only;
283
+
284
+ b. if You include all or a substantial portion of the database
285
+ contents in a database in which You have Sui Generis Database
286
+ Rights, then the database in which You have Sui Generis Database
287
+ Rights (but not its individual contents) is Adapted Material; and
288
+
289
+ c. You must comply with the conditions in Section 3(a) if You Share
290
+ all or a substantial portion of the contents of the database.
291
+
292
+ For the avoidance of doubt, this Section 4 supplements and does not
293
+ replace Your obligations under this Public License where the Licensed
294
+ Rights include other Copyright and Similar Rights.
295
+
296
+
297
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
298
+
299
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
300
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
301
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
302
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
303
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
304
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
305
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
306
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
307
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
308
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
309
+
310
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
311
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
312
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
313
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
314
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
315
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
316
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
317
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
318
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
319
+
320
+ c. The disclaimer of warranties and limitation of liability provided
321
+ above shall be interpreted in a manner that, to the extent
322
+ possible, most closely approximates an absolute disclaimer and
323
+ waiver of all liability.
324
+
325
+
326
+ Section 6 -- Term and Termination.
327
+
328
+ a. This Public License applies for the term of the Copyright and
329
+ Similar Rights licensed here. However, if You fail to comply with
330
+ this Public License, then Your rights under this Public License
331
+ terminate automatically.
332
+
333
+ b. Where Your right to use the Licensed Material has terminated under
334
+ Section 6(a), it reinstates:
335
+
336
+ 1. automatically as of the date the violation is cured, provided
337
+ it is cured within 30 days of Your discovery of the
338
+ violation; or
339
+
340
+ 2. upon express reinstatement by the Licensor.
341
+
342
+ For the avoidance of doubt, this Section 6(b) does not affect any
343
+ right the Licensor may have to seek remedies for Your violations
344
+ of this Public License.
345
+
346
+ c. For the avoidance of doubt, the Licensor may also offer the
347
+ Licensed Material under separate terms or conditions or stop
348
+ distributing the Licensed Material at any time; however, doing so
349
+ will not terminate this Public License.
350
+
351
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
352
+ License.
353
+
354
+
355
+ Section 7 -- Other Terms and Conditions.
356
+
357
+ a. The Licensor shall not be bound by any additional or different
358
+ terms or conditions communicated by You unless expressly agreed.
359
+
360
+ b. Any arrangements, understandings, or agreements regarding the
361
+ Licensed Material not stated herein are separate from and
362
+ independent of the terms and conditions of this Public License.
363
+
364
+
365
+ Section 8 -- Interpretation.
366
+
367
+ a. For the avoidance of doubt, this Public License does not, and
368
+ shall not be interpreted to, reduce, limit, restrict, or impose
369
+ conditions on any use of the Licensed Material that could lawfully
370
+ be made without permission under this Public License.
371
+
372
+ b. To the extent possible, if any provision of this Public License is
373
+ deemed unenforceable, it shall be automatically reformed to the
374
+ minimum extent necessary to make it enforceable. If the provision
375
+ cannot be reformed, it shall be severed from this Public License
376
+ without affecting the enforceability of the remaining terms and
377
+ conditions.
378
+
379
+ c. No term or condition of this Public License will be waived and no
380
+ failure to comply consented to unless expressly agreed to by the
381
+ Licensor.
382
+
383
+ d. Nothing in this Public License constitutes or may be interpreted
384
+ as a limitation upon, or waiver of, any privileges and immunities
385
+ that apply to the Licensor or You, including from the legal
386
+ processes of any jurisdiction or authority.
387
+
388
+ =======================================================================
389
+
390
+ Creative Commons is not a party to its public
391
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
392
+ its public licenses to material it publishes and in those instances
393
+ will be considered the “Licensor.” The text of the Creative Commons
394
+ public licenses is dedicated to the public domain under the CC0 Public
395
+ Domain Dedication. Except for the limited purpose of indicating that
396
+ material is shared under a Creative Commons public license or as
397
+ otherwise permitted by the Creative Commons policies published at
398
+ creativecommons.org/policies, Creative Commons does not authorize the
399
+ use of the trademark "Creative Commons" or any other trademark or logo
400
+ of Creative Commons without its prior written consent including,
401
+ without limitation, in connection with any unauthorized modifications
402
+ to any of its public licenses or any other arrangements,
403
+ understandings, or agreements concerning use of licensed material. For
404
+ the avoidance of doubt, this paragraph does not form part of the
405
+ public licenses.
406
+
407
+ Creative Commons may be contacted at creativecommons.org.
408
+
LICENSE-MIT-kyutai-pocket-tts ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Permission is hereby granted, free of charge, to any
2
+ person obtaining a copy of this software and associated
3
+ documentation files (the "Software"), to deal in the
4
+ Software without restriction, including without
5
+ limitation the rights to use, copy, modify, merge,
6
+ publish, distribute, sublicense, and/or sell copies of
7
+ the Software, and to permit persons to whom the Software
8
+ is furnished to do so, subject to the following
9
+ conditions:
10
+
11
+ The above copyright notice and this permission notice
12
+ shall be included in all copies or substantial portions
13
+ of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
17
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
18
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
22
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
+ DEALINGS IN THE SOFTWARE.
NOTICE ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AksharaVP-17M — component notices
2
+ ==================================
3
+
4
+ Credit line (required): "AksharaVP-17M by Sourojit Dhua (sourojitdotcom), https://huggingface.co/sourojitdotcom/AksharaVP-17M"
5
+
6
+ 1. AksharaVP weights (model.safetensors tensors student.*, and the GGUF copies of them)
7
+ Licence: CC-BY-NC-4.0 (LICENSE). Trained by Sourojit Dhua. Knowledge-distilled from Hima TTS nano
8
+ (Prahaladha/hima-tts-nano-hi, Prahaladha/hima-tts-nano-te) with the written permission of its authors; the flow-map
9
+ head was initialised from that teacher's head.
10
+
11
+ 2. Mimi decoder (model.safetensors tensors mimi.*, and the GGUF copies of them)
12
+ Kyutai, Pocket TTS, language "english_7m_2026-10" (kyutai/pocket-tts-without-voice-cloning), redistributed UNCHANGED.
13
+ Licence: CC-BY-4.0, https://creativecommons.org/licenses/by/4.0/ . These tensors stay under CC-BY-4.0; the
14
+ non-commercial terms of item 1 do not apply to them.
15
+
16
+ 3. clone_encoder.safetensors (optional, zero-shot cloning only) and voices.safetensors (12 built-in voice prompts)
17
+ From Hima TTS nano (codec encoder path and shipped voice prompts), redistributed with its authors' permission
18
+ under the terms of item 1.
19
+
20
+ 4. Code
21
+ aksharavp_tts/model.py, tts.py, __main__.py, gguf_load.py: Sourojit Dhua, CC-BY-NC-4.0 with the weights.
22
+ aksharavp_tts/flow_head.py: MLP-AdaLN flow head, derived from https://github.com/LTH14/mar (MIT, (c) 2024 Tianhong Li)
23
+ via Kyutai Pocket TTS (MIT, LICENSE-MIT-kyutai-pocket-tts).
24
+ aksharavp_tts/normalize.py, indic_languages.py: text normaliser from Hima TTS nano, used with permission.
25
+ Runtime dependency: pocket-tts 4.0.1 (MIT, Kyutai) for the Mimi decoder modules.
26
+
27
+ 5. Data
28
+ Text: IndicCorp v2 (ai4bharat, CC0). Clone prompts in training: LibriTTS-R (CC-BY-4.0).
29
+ Evaluation: FLEURS (google/fleurs, CC-BY-4.0) dev split. The clone reference clips in samples/ are FLEURS dev recordings (CC-BY-4.0).
README.md ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ language:
4
+ - te
5
+ - hi
6
+ - en
7
+ pipeline_tag: text-to-speech
8
+ library_name: pytorch
9
+ tags:
10
+ - text-to-speech
11
+ - tts
12
+ - telugu
13
+ - hindi
14
+ - indian-english
15
+ - voice-cloning
16
+ - zero-shot
17
+ - tiny
18
+ - cpu
19
+ - on-device
20
+ - gguf
21
+ - knowledge-distillation
22
+ - flow-matching
23
+ - custom-architecture
24
+ datasets:
25
+ - ai4bharat/IndicCorpV2
26
+ - google/fleurs
27
+ metrics:
28
+ - cer
29
+ - wer
30
+ model-index:
31
+ - name: AksharaVP-17M
32
+ results:
33
+ - task:
34
+ type: text-to-speech
35
+ name: Text-to-speech intelligibility (Telugu, ASR facebook/mms-1b-all)
36
+ dataset:
37
+ type: google/fleurs
38
+ name: FLEURS te_in (dev, first 100 sentences)
39
+ split: validation
40
+ metrics:
41
+ - type: cer
42
+ name: CER (%)
43
+ value: 6.04
44
+ - type: wer
45
+ name: WER (%)
46
+ value: 28.94
47
+ - type: utmos
48
+ name: UTMOS22-strong
49
+ value: 2.64
50
+ - task:
51
+ type: text-to-speech
52
+ name: Text-to-speech intelligibility (Hindi, ASR facebook/mms-1b-all)
53
+ dataset:
54
+ type: google/fleurs
55
+ name: FLEURS hi_in (dev, first 100 sentences)
56
+ split: validation
57
+ metrics:
58
+ - type: cer
59
+ name: CER (%)
60
+ value: 4.57
61
+ - type: wer
62
+ name: WER (%)
63
+ value: 13.97
64
+ - type: utmos
65
+ name: UTMOS22-strong
66
+ value: 2.73
67
+ - task:
68
+ type: text-to-speech
69
+ name: Text-to-speech intelligibility (Indian English, ASR facebook/mms-1b-all)
70
+ dataset:
71
+ type: google/fleurs
72
+ name: FLEURS en_us (dev, first 100 sentences)
73
+ split: validation
74
+ metrics:
75
+ - type: cer
76
+ name: CER (%)
77
+ value: 4.37
78
+ - type: wer
79
+ name: WER (%)
80
+ value: 9.45
81
+ - type: utmos
82
+ name: UTMOS22-strong
83
+ value: 3.19
84
+ ---
85
+
86
+ <p align="center">
87
+ <img src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/assets/banner.gif" alt="AksharaVP-17M — Telugu, Hindi and Indian English text to speech in 17.6M parameters, animated banner" width="100%"/>
88
+ </p>
89
+
90
+ <p align="center">
91
+ <a href="https://huggingface.co/spaces/sourojitdotcom/AksharaVP-17M-demo"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Live%20demo-Speak%20in%20your%20browser-7c5cff" alt="Live demo"/></a>
92
+ <img src="https://img.shields.io/badge/parameters-17,643,026-a855f7" alt="Parameters"/>
93
+ <img src="https://img.shields.io/badge/languages-Telugu%20%C2%B7%20Hindi%20%C2%B7%20Indian%20English-22d3ee" alt="Languages"/>
94
+ <img src="https://img.shields.io/badge/voice%20cloning-zero--shot-ec4899" alt="Zero-shot cloning"/>
95
+
96
+ <img src="https://img.shields.io/badge/GGUF-f32%20%C2%B7%20f16-f59e0b" alt="GGUF"/>
97
+ <img src="https://img.shields.io/badge/license-CC%20BY--NC%204.0-f97316" alt="License"/>
98
+ </p>
99
+
100
+ # AksharaVP-17M
101
+
102
+ <h3 align="center">Telugu, Hindi and Indian English speech from one 17.6M-parameter checkpoint.<br/>Built-in voices, zero-shot voice cloning, and it runs on a laptop CPU.</h3>
103
+
104
+ | 17,643,026 | 6.04% · 4.57% · 4.37% | 12 + clone | 35.3 MB | 1 |
105
+ |:---:|:---:|:---:|:---:|:---:|
106
+ | parameters, decoder included | character error rate · te / hi / en (FLEURS dev) | built-in voices · zero-shot cloning | f16 GGUF (70.6 MB fp32) | checkpoint for all three languages |
107
+
108
+ AksharaVP-17M reads **Telugu**, **Hindi** (Devanagari) and **Indian English** aloud at 24 kHz. A small transformer writes continuous audio
109
+ latents one 80 ms frame at a time, a 4-step flow-map head samples each frame, and Kyutai's 2.6M-parameter Mimi decoder turns them into
110
+ a waveform. One file holds everything the speaking path needs: no phonemiser, no external vocoder, no GPU.
111
+
112
+ <p align="center">
113
+ <img src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/assets/speech.gif" alt="Animated waveforms of three real AksharaVP-17M outputs: Telugu, Hindi and Indian English" width="92%"/>
114
+ </p>
115
+
116
+ > ⚠️ **Naturalness is the weak point.** Speech is clear (low error rates below) but flatter and less expressive than large TTS systems:
117
+ > UTMOS is 2.64 (te), 2.73 (hi) and 3.19 (en) on a 1–5 scale. See the [Comparison](#comparison) section for how that sits next to bigger models.
118
+
119
+ ---
120
+
121
+ ## Listen
122
+
123
+ All clips are raw model output from the files in this repository (published sampler: guidance 1.25, temperature 0.3, 4 flow steps, seed 0) —
124
+ nothing hand-picked after listening. Texts were written for this card (they are not FLEURS evaluation sentences).
125
+
126
+ | Language | Voice | Text | Audio |
127
+ |---|---|---|---|
128
+ | Hindi | Meera | नमस्ते! मैं अक्षरा हूँ, और मैं हिंदी, तेलुगु और अंग्रेज़ी बोल सकती हूँ। | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/hi_meera.wav"></audio> |
129
+ | Hindi | Siddharth | कल सुबह दस बजे हमारी मीटिंग है, कृपया समय पर पहुँचिए। | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/hi_siddharth.wav"></audio> |
130
+ | Hindi | Nandini | बारिश के बाद हवा में मिट्टी की खुशबू कितनी अच्छी लगती है। | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/hi_nandini.wav"></audio> |
131
+ | Telugu | Lakshmi | నమస్కారం! నేను అక్షర, తెలుగు, హిందీ మరియు ఇంగ్లీష్ మాట్లాడగలను. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/te_lakshmi.wav"></audio> |
132
+ | Telugu | Srinivas | రేపు ఉదయం పది గంటలకు మన సమావేశం ఉంది, దయచేసి సమయానికి రండి. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/te_srinivas.wav"></audio> |
133
+ | Telugu | Sravani | వర్షం తర్వాత మట్టి వాసన ఎంతో హాయిగా ఉంటుంది. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/te_sravani.wav"></audio> |
134
+ | Indian English | Meera | Hello! I'm a tiny text to speech model that runs on an ordinary laptop processor. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/en_meera.wav"></audio> |
135
+ | Indian English | Ishaan | Your train to Hyderabad leaves from platform four at nine fifteen. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/en_ishaan.wav"></audio> |
136
+ | Indian English | Sneha | Small models can still speak clearly, if they are trained with care. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/en_sneha.wav"></audio> |
137
+
138
+ ### Zero-shot voice cloning
139
+
140
+ A few seconds of someone's speech in, the same voice reading new text out. The reference clips are FLEURS dev recordings (CC-BY-4.0); the
141
+ English row clones a Hindi speaker (cross-lingual). Cloning needs the optional `clone_encoder.safetensors` (9,749,024 parameters).
142
+
143
+ | Language | Reference clip | Text | AksharaVP-17M |
144
+ |---|---|---|---|
145
+ | Hindi | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/hi_clone_reference.wav"></audio> | यह आवाज़ सिर्फ़ कुछ सेकंड की रिकॉर्डिंग से बनाई गई है। | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/hi_clone.wav"></audio> |
146
+ | Telugu | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/te_clone_reference.wav"></audio> | ఈ గొంతు కేవలం కొన్ని సెకన్ల రికార్డింగ్ నుండి తయారైంది. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/te_clone.wav"></audio> |
147
+ | Indian English | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/en_clone_reference.wav"></audio> | This voice was copied from a few seconds of recorded speech. | <audio controls preload="none" src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/samples/en_clone.wav"></audio> |
148
+
149
+ ---
150
+
151
+ ## What it achieves
152
+
153
+ | # | Claim | The evidence |
154
+ |---|---|---|
155
+ | 1 | **Three languages, one 17.6M checkpoint.** | 17,643,026 parameters: 15,025,793 for text → latents and 2,617,233 for the decoder, counted from `model.safetensors`. Telugu, Hindi and Indian English share every weight. |
156
+ | 2 | **Smallest open TTS we found that speaks Telugu + Hindi + English from one checkpoint *and* clones voices.** | 27,392,050 parameters with the clone encoder. The next smallest we found: Pravega Pocket TTS 121.8M, DhVaani-0.5 122.8M, IndicF5 350.7M (Hub safetensors metadata, 17 Nov 2026). Smaller single-language Indic TTS exist (e.g. 8.9M-parameter per-language VITS models), but without cloning or a shared checkpoint. |
157
+ | 3 | **Low character error rates on all three languages.** | FLEURS dev, 100 sentences each, ASR by `facebook/mms-1b-all`: CER 6.04% te, 4.57% hi, 4.37% en. |
158
+ | 4 | **CPU only.** | See the live Space — it runs on a free 2-vCPU CPU instance. |
159
+ | 5 | **Bit-exact GGUF.** | The f32 GGUF reproduces the safetensors output sample-for-sample (max abs difference 0.0); the f16 GGUF is 35.3 MB with the same frame counts and max sample difference 0.023. |
160
+
161
+ <p align="center">
162
+ <img src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/assets/landscape.png" alt="Parameter counts of open TTS that speak Telugu, Hindi and English from one checkpoint and clone voices: AksharaVP-17M with clone encoder 27.4M, Pravega Pocket TTS 121.8M, DhVaani-0.5 122.8M, IndicF5 350.7M" width="100%"/>
163
+ </p>
164
+
165
+ **Stated plainly:** "smallest" here means the smallest *we found* in that specific category, by parameter count, on the date above — not a
166
+ claim about every TTS model in existence, and not a quality ranking. The other models in that chart were **not** evaluated by us.
167
+
168
+ ---
169
+
170
+ ## How it works
171
+
172
+ <p align="center"><img src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/assets/architecture.png" alt="Architecture: text and voice prompt into an 8-layer d320 transformer, a 4-step flow-map head producing 32-d latent frames at 12.5 Hz, Kyutai Mimi decoder to 24 kHz audio" width="100%"/></p>
173
+
174
+ - **Text:** characters, not phonemes. Telugu and Devanagari share one 128-slot table (same Unicode offsets), plus ASCII — a 256-symbol vocabulary with a rank-64 factorised embedding. Numbers, dates and symbols are expanded by the bundled normaliser.
175
+ - **Backbone:** 8 pre-LN transformer layers, width 320, grouped-query attention (5 query heads, 1 KV head), RoPE, causal. It reads `[text][voice prompt][frames so far]` and predicts the next frame's conditioning vector and an end-of-speech logit.
176
+ - **Flow-map head:** an MLP-AdaLN (512 wide, 6 blocks, two time inputs) that jumps from noise to a 32-d latent frame in 4 steps, with classifier-free guidance on its outputs.
177
+ - **Decoder:** Kyutai Pocket TTS's Mimi decoder (english_7m_2026-10), unchanged: 32-d latents at 12.5 Hz → 24 kHz audio.
178
+ - **Voices:** a voice is a prompt of up to 62 latent frames (~5 s). 12 are built in; cloning encodes your clip into the same space.
179
+
180
+ <p align="center"><img src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/assets/params.png" alt="Parameter budget: flow-map head 54%, transformer layers 30%, embeddings and projections 1%, Mimi decoder 15%" width="100%"/></p>
181
+
182
+ ---
183
+
184
+ ## Benchmarks
185
+
186
+ <p align="center"><img src="https://huggingface.co/sourojitdotcom/AksharaVP-17M/resolve/main/assets/results.png" alt="FLEURS dev results per language: CER, WER and UTMOS with 95% intervals" width="100%"/></p>
187
+
188
+ **FLEURS dev, first 100 sentences per language, built-in voices (cycled), published sampler, no retakes.** Brackets: 95% bootstrap intervals.
189
+ English uses FLEURS `en_us` sentences spoken with the built-in Indian voices.
190
+
191
+ | Language | CER % | WER % | UTMOS (1–5) |
192
+ |---|---:|---:|---:|
193
+ | Telugu | 6.04 <sub>[4.78, 7.46]</sub> | 28.94 <sub>[25.66, 32.43]</sub> | 2.64 <sub>[2.58, 2.69]</sub> |
194
+ | Hindi | 4.57 <sub>[3.79, 5.39]</sub> | 13.97 <sub>[12.25, 15.92]</sub> | 2.73 <sub>[2.66, 2.80]</sub> |
195
+ | Indian English | 4.37 <sub>[3.07, 5.87]</sub> | 9.45 <sub>[7.31, 11.83]</sub> | 3.19 <sub>[3.12, 3.25]</sub> |
196
+
197
+ - **ASR:** `facebook/mms-1b-all` (CTC, greedy, language adapters hin/tel/eng); CER/WER after Unicode NFC and punctuation removal. Telugu WER is high for every system we measured because Telugu words are long and agglutinative — one wrong character costs a whole word.
198
+ - **Naturalness:** UTMOS22-strong (SpeechMOS). It is an automatic predictor trained mostly on English; treat absolute values for Telugu/Hindi with care, but differences between systems on the same sentences are informative.
199
+ - **Dev, not test.** Every choice that shaped this release (checkpoint, guidance, temperature) was made on the dev split. A held-out test split exists and has not been used for this model.
200
+ - The demo and the Python API add an automatic retake when a take runs on or goes silent; the numbers above are **without** retakes.
201
+
202
+ ### CPU speed
203
+
204
+ See the live Space for timings on a free CPU instance.
205
+
206
+ ---
207
+
208
+ ## Comparison
209
+
210
+ Same benchmark for every row: FLEURS dev (first 100 sentences per language, same sentence ids), `facebook/mms-1b-all` CER / WER (%) and
211
+ UTMOS22-strong, each system with its own built-in voices and default sampler, **all measured by us on the same machine with the same scripts.**
212
+ Parameters = the speaking path (text → audio) excluding any clone-only encoder; fp32 size = parameters × 4 bytes.
213
+
214
+ | System | Parameters | fp32 size | Languages | Telugu CER / WER / **UTMOS** | Hindi CER / WER / **UTMOS** | English CER / WER / **UTMOS** |
215
+ |---|---:|---:|---|---|---|---|
216
+ | **AksharaVP-17M (this model)** | 17,643,026 | 70.6 MB | te · hi · en, one checkpoint | 6.04 / 28.94 / **2.64** | 4.57 / 13.97 / **2.73** | 4.37 / 9.45 / **3.19** |
217
+ | Hima TTS nano (hi + te checkpoints) | 72,160,162 | 288.6 MB | te+en / hi+en, two checkpoints | 6.54 / 31.43 / **3.51** | 4.88 / 15.06 / **3.60** | 5.29 / 11.47 / **4.04** |
218
+ | Kyutai Pocket TTS (english) | 99,752,802 | 399.0 MB | en only | — | — | 2.35 / 6.01 / **3.99** |
219
+ | Kyutai Pocket TTS english_7m_2026-10 | 6,862,578 | 27.5 MB | en only | — | — | 1.99 / 6.37 / **4.10** |
220
+ | Kyutai Pocket TTS english_2m_2026-10 | 1,922,846 | 7.7 MB | en only | — | — | 3.89 / 9.70 / **3.49** |
221
+
222
+ Notes: Hima TTS nano ships separate Telugu and Hindi checkpoints of 72,160,162 parameters each (English is spoken by the Hindi one; its English row uses that checkpoint). Pocket TTS rows are English-only models speaking with their own (non-Indian) built-in voices, so English accent differs from the Indian voices of the other rows. UTMOS is an English-centric predictor; compare systems within a language column, not across columns.
223
+
224
+ **Paired bootstrap, AksharaVP-17M − Hima TTS nano** (same 100 sentences per language, 10,000 resamples, seed 1; negative CER/WER = fewer errors, negative UTMOS = less natural):
225
+
226
+ | Language | ΔCER (points) | ΔWER (points) | ΔUTMOS |
227
+ |---|---|---|---|
228
+ | Telugu | -0.50 [-1.13, +0.16] (p=0.145) | -2.49 [-4.91, +0.00] (p=0.050) | -0.87 [-0.95, -0.79] |
229
+ | Hindi | -0.31 [-0.95, +0.28] (p=0.329) | -1.07 [-2.62, +0.44] (p=0.176) | -0.87 [-0.93, -0.80] |
230
+ | Indian English | -0.92 [-1.85, -0.09] (p=0.027) | -2.03 [-4.16, -0.15] (p=0.036) | -0.85 [-0.94, -0.76] |
231
+
232
+ Read honestly: AksharaVP-17M's error rates are **as low as or lower than** Hima TTS nano's (significant only for English CER/WER; Telugu and Hindi CER
233
+ differences are within noise), at about a quarter of the parameters — but it is **clearly less natural** (UTMOS about 0.85 lower in every language,
234
+ significant). Kyutai's English-only Pocket TTS models beat it on English on every metric, including the 6.9M one.
235
+
236
+ ---
237
+
238
+ ## Quick start
239
+
240
+ ```bash
241
+ pip install -U huggingface_hub
242
+ hf download sourojitdotcom/AksharaVP-17M --local-dir AksharaVP-17M
243
+ cd AksharaVP-17M
244
+ pip install -r requirements.txt
245
+ ```
246
+
247
+ ```python
248
+ from aksharavp_tts import AksharaVP
249
+
250
+ tts = AksharaVP(".") # loads model.safetensors (+ clone_encoder.safetensors if present)
251
+ audio = tts.say("నమస్కారం! మీరు ఎలా ఉన్నారు?", lang="te", voice="Lakshmi")
252
+ tts.save(audio, "telugu.wav")
253
+
254
+ audio = tts.say("कल सुबह दस बजे मिलते हैं।", lang="hi", voice="Siddharth")
255
+ audio = tts.say("Your table is ready.", lang="en", clone="my_voice.wav") # zero-shot cloning, 3–10 s clip
256
+ ```
257
+
258
+ ```bash
259
+ python -m aksharavp_tts "नमस्ते, आप कैसे हैं?" --lang hi --voice Meera -o hello.wav
260
+ python -m aksharavp_tts --list-voices
261
+ ```
262
+
263
+ Built-in voices — Hindi set: Meera, Sneha, Nandini (female), Siddharth, Ishaan, Nikhil (male); Telugu set: Lakshmi, Sravani, Bhavana (female),
264
+ Srinivas, Karthik, Pranay (male). Any voice can speak any of the three languages. Options: `temperature` (0.3), `cfg` (guidance, 1.25), `steps` (4), `seed`.
265
+
266
+ ## GGUF
267
+
268
+ | File | Size | Storage | Parity with `model.safetensors` |
269
+ |---|---:|---|---|
270
+ | `gguf/aksharavp-17m-f32.gguf` | 70.60 MB | F32, all 289 tensors | tensors identical (max abs diff 0.0); audio **bit-identical** on te/hi/en test sentences |
271
+ | `gguf/aksharavp-17m-f16.gguf` | 35.31 MB | F16, upcast on load | tensor max abs diff 0.0072; same frame counts; waveform max abs diff ≤ 0.023 |
272
+
273
+ GGUF v3 containers written with the `gguf` Python package; metadata holds the full config, parameter counts and sampler defaults.
274
+ **llama.cpp has no runtime for this architecture** — these are portable weight files. Load them back into PyTorch with:
275
+
276
+ ```python
277
+ from gguf_load import load_gguf
278
+ tts = load_gguf("gguf/aksharavp-17m-f16.gguf")
279
+ tts.save(tts.say("నమస్కారం", lang="te"), "out.wav")
280
+ ```
281
+
282
+ ## Files
283
+
284
+ | File | What |
285
+ |---|---|
286
+ | `model.safetensors` | the 17,643,026-parameter speaking path (`student.*` + `mimi.*` decoder), fp32, 70.6 MB |
287
+ | `clone_encoder.safetensors` | optional audio encoder for zero-shot cloning (9,749,024 params) |
288
+ | `voices.safetensors` | 12 built-in voice prompts (62 × 32 latents each) |
289
+ | `config.json` | architecture, parameter counts, sampler defaults, voices |
290
+ | `aksharavp_tts/` | PyTorch inference code (`AksharaVP.say`) and the text normaliser |
291
+ | `gguf/`, `gguf_load.py` | GGUF containers and loader |
292
+ | `samples/` | the audio on this page |
293
+ | `evaluation/` | measured numbers behind every table (benchmarks, comparison, GGUF parity, speed) |
294
+
295
+ ## Training
296
+
297
+ Knowledge distillation into a small student: latent-level L2 on the teacher's hidden states plus sample-level distillation of the flow head,
298
+ from a larger in-house teacher TTS, **Hima TTS nano** (used with its authors' written permission; the flow-map head is initialised from its head,
299
+ and the built-in voice prompts and clone encoder come from it). Teacher speech was generated for IndicCorp v2 sentences (CC0) in Telugu, Hindi and
300
+ English, with FLEURS dev/test sentences removed from the training text; LibriTTS-R (CC-BY-4.0) clips served as cloning prompts.
301
+ Final stage: 100,026 steps on one Kaggle T4 GPU (about 10.8 h), initialised from an earlier distilled checkpoint of the same architecture.
302
+
303
+ ## Limitations and responsible use
304
+
305
+ - **Naturalness** is the main gap: prosody is flatter than large models. Expect clear, slightly monotone speech.
306
+ - **Very short inputs** (one or two words) can run on or come out oddly; the API retakes automatically, but short phrases are the least reliable.
307
+ - **Code-mixed text** (English words inside Hindi/Telugu) works only as well as the character table allows; it was not specifically evaluated.
308
+ - **Cloning quality** depends on a clean 3–10 s clip; it was checked to work, but speaker similarity was not benchmarked for this release.
309
+ - **Do not clone a voice without the speaker's consent**, and label generated speech as synthetic.
310
+
311
+ ## Licence & attribution
312
+
313
+ - **AksharaVP weights and code:** [CC-BY-NC-4.0](LICENSE) — non-commercial; credit **Sourojit Dhua (sourojitdotcom)** and link this page.
314
+ - **Mimi decoder tensors (`mimi.*`):** Kyutai Pocket TTS, unchanged, **CC-BY-4.0**; they keep that licence.
315
+ - Flow-head code derives from MAR (MIT) via Kyutai Pocket TTS (MIT). Full list in [NOTICE](NOTICE).
316
+
317
+ ```text
318
+ AksharaVP-17M by Sourojit Dhua (sourojitdotcom) — https://huggingface.co/sourojitdotcom/AksharaVP-17M
319
+ ```
320
+
321
+ ```bibtex
322
+ @misc{dhua2026aksharavp,
323
+ title = {AksharaVP-17M: Telugu, Hindi and Indian-English text to speech in 17.6M parameters},
324
+ author = {Dhua, Sourojit},
325
+ year = {2026},
326
+ url = {https://huggingface.co/sourojitdotcom/AksharaVP-17M}
327
+ }
328
+ ```
aksharavp_tts/__init__.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ from .tts import AksharaVP, SAMPLE_RATE, LANG_NAMES
2
+ __all__ = ["AksharaVP", "SAMPLE_RATE", "LANG_NAMES"]
aksharavp_tts/__main__.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ from .tts import AksharaVP
3
+ ap = argparse.ArgumentParser(prog="python -m aksharavp_tts", description="AksharaVP-17M text to speech (te / hi / en)")
4
+ ap.add_argument("text"); ap.add_argument("--lang", default="hi", choices=["te", "hi", "en"]); ap.add_argument("--voice")
5
+ ap.add_argument("--clone", help="a 3-10 s clip of clear speech to copy"); ap.add_argument("-o", "--out", default="out.wav")
6
+ ap.add_argument("--model", default="."); ap.add_argument("--temperature", type=float); ap.add_argument("--cfg", type=float)
7
+ ap.add_argument("--steps", type=int); ap.add_argument("--seed", type=int, default=0); ap.add_argument("--list-voices", action="store_true")
8
+ a = ap.parse_args()
9
+ tts = AksharaVP(a.model, load_clone_encoder=bool(a.clone))
10
+ if a.list_voices:
11
+ for n, m in tts.voices.items(): print(n, m["gender"], m["set"])
12
+ else:
13
+ tts.save(tts.say(a.text, lang=a.lang, voice=a.voice, clone=a.clone, temperature=a.temperature, cfg=a.cfg, steps=a.steps, seed=a.seed), a.out); print("wrote", a.out)
aksharavp_tts/flow_head.py ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ """
3
+ Taken from
4
+ https://github.com/LTH14/mar/blob/fe470ac24afbee924668d8c5c83e9fec60af3a73/models/diffloss.py
5
+
6
+ """
7
+
8
+ import math
9
+
10
+ import torch
11
+ from torch import nn
12
+ from typing_extensions import Self
13
+
14
+
15
+
16
+ def modulate(x: torch.Tensor, shift: torch.Tensor, scale: torch.Tensor) -> torch.Tensor:
17
+ return x * (1 + scale) + shift
18
+
19
+
20
+ def _rms_norm(x: torch.Tensor, alpha: torch.Tensor, eps: float) -> torch.Tensor:
21
+ assert x.dim() >= alpha.dim()
22
+ x_dtype = x.dtype
23
+ var = eps + x.var(dim=-1, keepdim=True)
24
+ y = (x * (alpha.to(var) * torch.rsqrt(var))).to(x_dtype)
25
+ return y
26
+
27
+
28
+ class RMSNorm(nn.Module):
29
+ def __init__(self, dim: int, eps: float = 1e-5):
30
+ super().__init__()
31
+ self.eps = eps
32
+ alpha_shape = (dim,)
33
+ self.alpha = nn.Parameter(torch.full(alpha_shape, 1.0, requires_grad=True))
34
+
35
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
36
+ return _rms_norm(x, self.alpha, self.eps)
37
+
38
+
39
+ class LayerNorm(nn.Module):
40
+ """Reimplementation of LayerNorm because the default one doesn't support jvp."""
41
+
42
+ def __init__(self, channels: int, eps: float = 1e-6, elementwise_affine: bool = True):
43
+ super().__init__()
44
+ self.eps = eps
45
+ if elementwise_affine:
46
+ self.weight = nn.Parameter(torch.ones(channels))
47
+ self.bias = nn.Parameter(torch.zeros(channels))
48
+
49
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
50
+ mean = x.mean(dim=-1, keepdim=True)
51
+ var = x.var(dim=-1, unbiased=False, keepdim=True)
52
+ x = (x - mean) / torch.sqrt(var + self.eps)
53
+ if hasattr(self, "weight"):
54
+ x = x * self.weight + self.bias
55
+ return x
56
+
57
+
58
+ class TimestepEmbedder(nn.Module):
59
+ """Embeds scalar timesteps into vector representations."""
60
+
61
+ freqs: torch.Tensor
62
+
63
+ def __init__(
64
+ self, hidden_size: int, frequency_embedding_size: int = 256, max_period: int = 10000
65
+ ):
66
+ super().__init__()
67
+ blocks = [
68
+ nn.Linear(frequency_embedding_size, hidden_size, bias=True),
69
+ nn.SiLU(),
70
+ nn.Linear(hidden_size, hidden_size, bias=True),
71
+ ]
72
+ blocks.append(RMSNorm(hidden_size))
73
+ self.mlp = nn.Sequential(*blocks)
74
+ self.frequency_embedding_size = frequency_embedding_size
75
+ half = frequency_embedding_size // 2
76
+ self.register_buffer(
77
+ "freqs", torch.exp(-math.log(max_period) * torch.arange(start=0, end=half) / half)
78
+ )
79
+
80
+ def forward(self, t: torch.Tensor) -> torch.Tensor:
81
+ args = t * self.freqs.to(t.dtype)
82
+ embedding = torch.cat([torch.cos(args), torch.sin(args)], dim=-1)
83
+ assert not (self.frequency_embedding_size % 2)
84
+ t_emb = self.mlp(embedding)
85
+ return t_emb
86
+
87
+
88
+ class ResBlock(nn.Module):
89
+ """
90
+ A residual block that can optionally change the number of channels.
91
+ :param channels: the number of input channels.
92
+ """
93
+
94
+ def __init__(self, channels: int):
95
+ super().__init__()
96
+ self.channels = channels
97
+
98
+ self.in_ln = LayerNorm(channels, eps=1e-6)
99
+ self.mlp = nn.Sequential(
100
+ nn.Linear(channels, channels, bias=True),
101
+ nn.SiLU(),
102
+ nn.Linear(channels, channels, bias=True),
103
+ )
104
+
105
+ self.adaLN_modulation = nn.Sequential(
106
+ nn.SiLU(), nn.Linear(channels, 3 * channels, bias=True)
107
+ )
108
+
109
+ def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
110
+ shift_mlp, scale_mlp, gate_mlp = self.adaLN_modulation(y).chunk(3, dim=-1)
111
+ h = modulate(self.in_ln(x), shift_mlp, scale_mlp)
112
+ h = self.mlp(h)
113
+ return x + gate_mlp * h
114
+
115
+
116
+ class FinalLayer(nn.Module):
117
+ """
118
+ The final layer adopted from DiT.
119
+ """
120
+
121
+ def __init__(self, model_channels: int, out_channels: int):
122
+ super().__init__()
123
+ self.norm_final = LayerNorm(model_channels, elementwise_affine=False, eps=1e-6)
124
+ self.linear = nn.Linear(model_channels, out_channels, bias=True)
125
+ self.adaLN_modulation = nn.Sequential(
126
+ nn.SiLU(), nn.Linear(model_channels, 2 * model_channels, bias=True)
127
+ )
128
+
129
+ def forward(self, x: torch.Tensor, c: torch.Tensor) -> torch.Tensor:
130
+ shift, scale = self.adaLN_modulation(c).chunk(2, dim=-1)
131
+ x = modulate(self.norm_final(x), shift, scale)
132
+ x = self.linear(x)
133
+ return x
134
+
135
+
136
+ class SimpleMLPAdaLN(nn.Module):
137
+ """Taken from https://arxiv.org/abs/2406.11838.
138
+
139
+ The MLP for Diffusion Loss.
140
+ :param in_channels: channels in the input Tensor.
141
+ :param model_channels: base channel count for the model.
142
+ :param out_channels: channels in the output Tensor.
143
+ :param cond_channels: channels in the condition.
144
+ :param num_res_blocks: number of residual blocks per downsample.
145
+ """
146
+
147
+ def __init__(
148
+ self,
149
+ in_channels: int,
150
+ model_channels: int,
151
+ out_channels: int,
152
+ cond_channels: int,
153
+ num_res_blocks: int,
154
+ num_time_conds: int = 1,
155
+ ):
156
+ super().__init__()
157
+
158
+ self.in_channels = in_channels
159
+ self.model_channels = model_channels
160
+ self.out_channels = out_channels
161
+ self.num_res_blocks = num_res_blocks
162
+ self.num_time_conds = num_time_conds
163
+
164
+ self.time_embed = nn.ModuleList(
165
+ [TimestepEmbedder(model_channels) for _ in range(num_time_conds)]
166
+ )
167
+ self.cond_embed = nn.Linear(cond_channels, model_channels)
168
+
169
+ self.input_proj = nn.Linear(in_channels, model_channels)
170
+
171
+ res_blocks = []
172
+ for i in range(num_res_blocks):
173
+ res_blocks.append(ResBlock(model_channels))
174
+
175
+ self.res_blocks = nn.ModuleList(res_blocks)
176
+ self.final_layer = FinalLayer(model_channels, out_channels)
177
+
178
+ @classmethod
179
+ def from_pydantic_config(cls, cfg: FlowLMConfig, latent_dim: int, cond_dim: int) -> Self:
180
+ config = cfg.flow
181
+
182
+ flow_dim = config.dim
183
+ flow_depth = config.depth
184
+ if config.type == "lsd":
185
+ num_time_conds = 2
186
+ elif config.type == "flow_matching":
187
+ num_time_conds = 1
188
+ elif config.type in ("drifting", "pointwise"):
189
+ num_time_conds = 0
190
+ else:
191
+ raise ValueError(f"Unknown flow type: {config.type}")
192
+ return cls(
193
+ latent_dim, flow_dim, latent_dim, cond_dim, flow_depth, num_time_conds=num_time_conds
194
+ )
195
+
196
+ def forward(self, c: torch.Tensor, *args: torch.Tensor) -> torch.Tensor:
197
+ """
198
+ Apply the model to an input batch.
199
+ :param c: conditioning from AR transformer.
200
+ :param args: `num_time_conds` time tensors, then an [N x C] Tensor of
201
+ inputs. The released models use two (start and target time); other
202
+ training objectives use one or none.
203
+ :return: an [N x C] Tensor of outputs.
204
+ """
205
+ ts, x = args[:-1], args[-1]
206
+ assert len(ts) == self.num_time_conds, (
207
+ f"Expected {self.num_time_conds} time conditions, got {len(ts)}"
208
+ )
209
+ x = self.input_proj(x)
210
+ y = self.cond_embed(c)
211
+ if self.num_time_conds:
212
+ y = y + sum(emb(t) for emb, t in zip(self.time_embed, ts)) / self.num_time_conds
213
+
214
+ for block in self.res_blocks:
215
+ x = block(x, y)
216
+
217
+ return self.final_layer(x, y)
aksharavp_tts/indic_languages.py ADDED
The diff for this file is too large to render. See raw diff
 
aksharavp_tts/model.py ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """AksharaVP student (Design A): Pocket-style CALM-tiny over 32-d Mimi-VAE latents at 12.5 Hz.
2
+ Row: [text chars (shared Brahmic akshara offsets)][lang][ref frames <=62 or no-ref token][bos frame][frame_0]...[frame_n-1]
3
+ Backbone d224 x 8, GQA 8q/2kv (head 64), FFN 224, RoPE, pre-LN. Flow head: MLP-AdaLN 192 x 4, plain flow matching (t-only,
4
+ sinusoidal, parameter-free time features), Euler sampling. EOS head on the 64-d z. Parameter layout mirrors Kyutai english_7m
5
+ (design_params.py formula) with vocab 256."""
6
+ import math, torch, torch.nn as nn, torch.nn.functional as F
7
+
8
+ # ---------------- tokenizer: script-agnostic Brahmic offsets + ASCII ----------------
9
+ PAD, BOS, UNK, SPACE = 0, 1, 2, 3
10
+ LANG = {'hi': 4, 'te': 5, 'en': 6}
11
+ BRAHMIC = {0x0900: 'deva', 0x0C00: 'telu'}
12
+ def encode_text(s, lang):
13
+ ids = [BOS, LANG[lang]]
14
+ for ch in s:
15
+ o = ord(ch)
16
+ if ch == ' ': ids.append(SPACE)
17
+ elif 0x0900 <= o <= 0x097F or 0x0C00 <= o <= 0x0C7F: ids.append(8 + (o & 0x7F)) # 8..135 shared offset
18
+ elif 0x21 <= o <= 0x7E: ids.append(136 + o - 0x21) # 136..229
19
+ elif o in (0x200C, 0x200D): continue
20
+ else: ids.append(UNK)
21
+ return ids
22
+ VOCAB = 256
23
+
24
+ def rope(n, hd, theta=10000.0):
25
+ inv = 1.0 / (theta ** (torch.arange(0, hd, 2).float() / hd)); f = torch.outer(torch.arange(n).float(), inv)
26
+ return torch.cos(f), torch.sin(f)
27
+ def apply_rope(x, cos, sin):
28
+ x1, x2 = x[..., 0::2], x[..., 1::2]; c, s = cos[None, None].to(x.dtype), sin[None, None].to(x.dtype)
29
+ return torch.stack((x1 * c - x2 * s, x1 * s + x2 * c), -1).flatten(-2)
30
+
31
+ class Attn(nn.Module):
32
+ def __init__(s, d, hq, hkv, hd):
33
+ super().__init__(); s.hq, s.hkv, s.hd = hq, hkv, hd
34
+ s.in_proj = nn.Linear(d, (hq + 2 * hkv) * hd, bias=False); s.out_proj = nn.Linear(hq * hd, d, bias=False)
35
+ def forward(s, x, cos, sin, mask=None, cache=None, pos=0):
36
+ B, T, _ = x.shape; q, k, v = s.in_proj(x).split([s.hq * s.hd, s.hkv * s.hd, s.hkv * s.hd], -1)
37
+ q = q.view(B, T, s.hq, s.hd).transpose(1, 2); k = k.view(B, T, s.hkv, s.hd).transpose(1, 2); v = v.view(B, T, s.hkv, s.hd).transpose(1, 2)
38
+ q, k = apply_rope(q, cos[pos:pos + T], sin[pos:pos + T]), apply_rope(k, cos[pos:pos + T], sin[pos:pos + T])
39
+ if cache is not None:
40
+ kc, vc = cache; kc[:, :, pos:pos + T] = k; vc[:, :, pos:pos + T] = v; k, v = kc[:, :, :pos + T], vc[:, :, :pos + T]
41
+ r = s.hq // s.hkv; k = k.repeat_interleave(r, 1); v = v.repeat_interleave(r, 1)
42
+ y = F.scaled_dot_product_attention(q, k, v, attn_mask=mask, is_causal=(mask is None and cache is None))
43
+ return s.out_proj(y.transpose(1, 2).reshape(B, T, -1))
44
+
45
+ class Block(nn.Module):
46
+ def __init__(s, d, hq, hkv, hd, ff):
47
+ super().__init__(); s.norm1, s.norm2 = nn.LayerNorm(d), nn.LayerNorm(d); s.self_attn = Attn(d, hq, hkv, hd)
48
+ s.linear1, s.linear2 = nn.Linear(d, ff, bias=False), nn.Linear(ff, d, bias=False)
49
+ def forward(s, x, cos, sin, mask=None, cache=None, pos=0):
50
+ x = x + s.self_attn(s.norm1(x), cos, sin, mask, cache, pos)
51
+ return x + s.linear2(F.gelu(s.linear1(s.norm2(x)), approximate='tanh'))
52
+
53
+ def tfeat(t, dim=64):
54
+ half = dim // 2; f = torch.exp(-math.log(10000) * torch.arange(half, device=t.device) / half)
55
+ a = t[..., None].float() * 1000 * f; return torch.cat([a.cos(), a.sin()], -1)
56
+
57
+ class ResBlock(nn.Module):
58
+ def __init__(s, w):
59
+ super().__init__(); s.in_ln = nn.LayerNorm(w); s.mlp = nn.Sequential(nn.Linear(w, w), nn.SiLU(), nn.Linear(w, w))
60
+ s.adaLN_modulation = nn.Sequential(nn.SiLU(), nn.Linear(w, 3 * w))
61
+ def forward(s, x, c):
62
+ sh, sc, g = s.adaLN_modulation(c).chunk(3, -1)
63
+ return x + g * s.mlp(s.in_ln(x) * (1 + sc) + sh)
64
+
65
+ class FlowNet(nn.Module):
66
+ def __init__(s, lat, w, depth, zc):
67
+ super().__init__(); s.input_proj = nn.Linear(lat, w); s.cond_embed = nn.Linear(zc, w)
68
+ s.res_blocks = nn.ModuleList([ResBlock(w) for _ in range(depth)])
69
+ s.final_norm = nn.LayerNorm(w, elementwise_affine=False)
70
+ s.final_adaLN = nn.Sequential(nn.SiLU(), nn.Linear(w, 2 * w)); s.final_linear = nn.Linear(w, lat)
71
+ def forward(s, z, t, x):
72
+ c = s.cond_embed(z + tfeat(t, z.shape[-1])); h = s.input_proj(x)
73
+ for b in s.res_blocks: h = b(h, c)
74
+ sh, sc = s.final_adaLN(c).chunk(2, -1)
75
+ return s.final_linear(s.final_norm(h) * (1 + sc) + sh)
76
+
77
+ class Student(nn.Module):
78
+ def __init__(s, d=224, L=8, hq=8, hkv=2, hd=64, ff=224, fw=192, fdepth=4, lat=32, zc=64, rank=64, vocab=VOCAB, ref_frames=62, max_len=1024, lsd=False):
79
+ super().__init__(); s.d, s.lat, s.ref_frames = d, lat, ref_frames
80
+ s.embed = nn.Embedding(vocab, rank); s.embed_proj = nn.Linear(rank, d, bias=False) # rank-64 factorised text table
81
+ s.bos_before_voice = nn.Parameter(torch.zeros(1, 1, d)) # "no reference" token
82
+ s.speaker_proj_weight = nn.Linear(lat, d, bias=False) # reference (prompt) frames
83
+ s.input_linear = nn.Linear(lat, d, bias=False); s.bos_emb = nn.Parameter(torch.zeros(lat))
84
+ s.layers = nn.ModuleList([Block(d, hq, hkv, hd, ff) for _ in range(L)]); s.out_norm = nn.LayerNorm(d)
85
+ s.z_proj = nn.Linear(d, zc, bias=False); s.out_eos = nn.Linear(zc, 1); s.lsd = lsd
86
+ if lsd: # round 4 (Design D): Hima/Pocket-style LSD flow-map head (2 time conds), weights copied from Hima; z lives in Hima's (z+head) space
87
+ from .flow_head import SimpleMLPAdaLN
88
+ s.flow_net = SimpleMLPAdaLN(lat, fw, lat, zc, fdepth, num_time_conds=2)
89
+ else: s.flow_net = FlowNet(lat, fw, fdepth, zc)
90
+ s.register_buffer('emb_mean', torch.zeros(lat)); s.register_buffer('emb_std', torch.ones(lat))
91
+ cos, sin = rope(max_len, hd); s.register_buffer('cos', cos, persistent=False); s.register_buffer('sin', sin, persistent=False)
92
+
93
+ def prefix(s, text_ids, ref):
94
+ """text_ids [B,Tt] (PAD=0), ref [B,R,32] normalised or None-rows via ref_len=0 -> list built by caller."""
95
+ return s.embed_proj(s.embed(text_ids))
96
+
97
+ def forward_train(s, text, tlen, ref, rlen, frames, flen, flow_mult=4, hist_noise=0.0, return_z=False):
98
+ """text [B,Tt] tlen [B]; ref [B,R,32] (normalised) rlen [B] (0 = no ref); frames [B,N,32] normalised, flen [B].
99
+ Builds per-row sequences [text][ref or no-ref][bos][frames], right-padded; causal + key-padding mask."""
100
+ B, dev = text.shape[0], text.device
101
+ te = s.embed_proj(s.embed(text)); re_ = s.speaker_proj_weight(ref); fr = frames
102
+ if hist_noise > 0: fr = fr + hist_noise * torch.rand(B, 1, 1, device=dev) * torch.randn_like(fr)
103
+ fe = s.input_linear(torch.cat([s.bos_emb.expand(B, 1, -1).to(fr.dtype), fr], 1)) # [B,N+1,d]
104
+ nref = torch.where(rlen > 0, rlen, torch.ones_like(rlen))
105
+ P = tlen + nref; Ltot = int((P + flen + 1).max())
106
+ x = te.new_zeros(B, Ltot, s.d); valid = torch.zeros(B, Ltot, dtype=torch.bool, device=dev)
107
+ ar = torch.arange(max(Ltot, text.shape[1], ref.shape[1], frames.shape[1] + 1), device=dev)
108
+ # scatter pieces (vectorised via index arithmetic)
109
+ Tt, R, N1 = te.shape[1], re_.shape[1], fe.shape[1]
110
+ ti = ar[None, :Tt].expand(B, -1); tm = ti < tlen[:, None]
111
+ x[torch.arange(B, device=dev)[:, None].expand(-1, Tt)[tm], ti[tm]] = te[tm]
112
+ ri = ar[None, :R].expand(B, -1); rm = ri < rlen[:, None]
113
+ bidx = torch.arange(B, device=dev)[:, None]
114
+ x[bidx.expand(-1, R)[rm], (tlen[:, None] + ri)[rm]] = re_[rm]
115
+ nr = rlen == 0
116
+ if nr.any(): x[nr, tlen[nr]] = s.bos_before_voice[0, 0].to(x.dtype)
117
+ fi = ar[None, :N1].expand(B, -1); fm = fi < (flen + 1)[:, None]
118
+ x[bidx.expand(-1, N1)[fm], (P[:, None] + fi)[fm]] = fe[fm]
119
+ valid = ar[None, :Ltot] < (P + flen + 1)[:, None]
120
+ mask = (torch.ones(Ltot, Ltot, dtype=torch.bool, device=dev).tril()[None] & valid[:, None, :]) | torch.eye(Ltot, dtype=torch.bool, device=dev)[None]
121
+ mask = mask[:, None]
122
+ for blk in s.layers: x = blk(x, s.cos, s.sin, mask)
123
+ h = s.out_norm(x)
124
+ # outputs at positions P-1+... : position (P + j) holds input frame j-1 (bos at j=0); its output predicts frame j
125
+ oi = (P[:, None] + fi) # [B,N1]
126
+ z = s.z_proj(h[bidx.expand(-1, N1), oi.clamp(max=Ltot - 1)]) # [B,N1,zc]
127
+ eos_logit = s.out_eos(z).squeeze(-1) # predict stop at j==flen
128
+ eos_t = (fi == flen[:, None]).float(); em = fm
129
+ eos_loss = F.binary_cross_entropy_with_logits(eos_logit[em].float(), eos_t[em])
130
+ zm = fi < flen[:, None]; zt = z[:, :-1][zm[:, :-1]] if N1 > 1 else z[:, :0]
131
+ tgt = frames[zm[:, :-1]] # [M,32]
132
+ if flow_mult == 0: # round 4: head trained by sample-level KD outside (train_d.py)
133
+ return z.sum() * 0, eos_loss, z[:, :-1], zm[:, :-1]
134
+ zt = zt.repeat(flow_mult, 1); tgt = tgt.repeat(flow_mult, 1)
135
+ t = torch.rand(tgt.shape[0], device=dev); x0 = torch.randn_like(tgt)
136
+ xt = (1 - t[:, None]) * x0 + t[:, None] * tgt
137
+ v = s.flow_net(zt, t, xt)
138
+ flow_loss = F.mse_loss(v.float(), (tgt - x0).float())
139
+ if return_z: return flow_loss, eos_loss, z[:, :-1], zm[:, :-1] # z predicting frame j, mask j < flen
140
+ return flow_loss, eos_loss
141
+
142
+ def lsd_decode(s, z, x0, steps):
143
+ cur = x0
144
+ for i in range(steps):
145
+ a_, b_ = i / steps, (i + 1) / steps
146
+ cur = cur + s.flow_net(z, a_ * torch.ones_like(x0[..., :1]), b_ * torch.ones_like(x0[..., :1]), cur) * (b_ - a_)
147
+ return cur
148
+
149
+ @torch.no_grad()
150
+ def _prefix_x(s, text_ids, ref, dev):
151
+ parts = [s.embed_proj(s.embed(text_ids.to(dev)[None]))]
152
+ if ref is not None and len(ref): parts.append(s.speaker_proj_weight(((ref[:s.ref_frames].to(dev) - s.emb_mean) / s.emb_std)[None]))
153
+ else: parts.append(s.bos_before_voice)
154
+ parts.append(s.input_linear(s.bos_emb.view(1, 1, -1)))
155
+ return torch.cat(parts, 1)
156
+
157
+ def generate(s, text_ids, ref=None, max_frames=375, temperature=0.3, steps=4, eos_thr=0.0, cfg=1.0, solver='euler'):
158
+ """Single sentence. text_ids LongTensor [Tt]; ref [R,32] de-normalised latents or None. Returns [n,32] de-normalised.
159
+ cfg > 1: classifier-free guidance on the flow velocity; the unconditional row keeps only [BOS, lang] (the text_drop form
160
+ used in training) with the same voice prompt; shared noise; EOS read from the conditional row (as in Hima's sampler)."""
161
+ dev = s.emb_mean.device
162
+ xs = [s._prefix_x(text_ids, ref, dev)]
163
+ if cfg != 1.0: xs.append(s._prefix_x(text_ids[:2], ref, dev))
164
+ B = len(xs); n = max(x.shape[1] for x in xs) + max_frames + 1
165
+ caches = [[(torch.zeros(1, blk.self_attn.hkv, n, blk.self_attn.hd, device=dev), torch.zeros(1, blk.self_attn.hkv, n, blk.self_attn.hd, device=dev)) for blk in s.layers] for _ in xs]
166
+ def run(x, pos, cs):
167
+ T = x.shape[1]; m = None
168
+ if T > 1: m = torch.ones(T, pos + T, dtype=torch.bool, device=dev).tril(diagonal=pos)
169
+ for blk, c in zip(s.layers, cs): x = blk(x, s.cos, s.sin, m, c, pos)
170
+ return s.z_proj(s.out_norm(x))[:, -1]
171
+ zs = [run(x, 0, caches[b]) for b, x in enumerate(xs)]; ps = [x.shape[1] for x in xs]; out = []
172
+ for _ in range(max_frames):
173
+ if float(s.out_eos(zs[0])) > eos_thr: break
174
+ cur = temperature ** 0.5 * torch.randn(1, s.lat, device=dev)
175
+ def vel(x, tt):
176
+ t = torch.full((1,), tt, device=dev); v = s.flow_net(zs[0], t, x)
177
+ if B > 1: vu = s.flow_net(zs[1], t, x); v = vu + cfg * (v - vu)
178
+ return v
179
+ h = 1.0 / steps
180
+ if s.lsd: # Hima sampler: per-row LSD decode, CFG on the OUTPUTS with shared noise
181
+ xc = s.lsd_decode(zs[0], cur, steps)
182
+ cur = xc if B == 1 else (lambda xu: xu + cfg * (xc - xu))(s.lsd_decode(zs[1], cur, steps))
183
+ steps_ = 0
184
+ else: steps_ = steps
185
+ for i in range(steps_):
186
+ if solver == 'euler': cur = cur + h * vel(cur, i * h)
187
+ elif solver == 'midpoint': cur = cur + h * vel(cur + 0.5 * h * vel(cur, i * h), (i + 0.5) * h)
188
+ elif solver == 'heun':
189
+ k1 = vel(cur, i * h); xe = cur + h * k1
190
+ cur = cur + 0.5 * h * (k1 + vel(xe, (i + 1) * h)) if i < steps - 1 else xe # last step Euler (t=1 not trained)
191
+ else: raise ValueError(solver)
192
+ out.append(cur)
193
+ for b in range(B): zs[b] = run(s.input_linear(cur[:, None]), ps[b], caches[b]); ps[b] += 1
194
+ if not out: return torch.zeros(0, s.lat)
195
+ return (torch.cat(out, 0) * s.emb_std + s.emb_mean).cpu()
196
+
197
+ CONFIGS = {'A': {}, 'Cp': dict(d=320, L=8, hq=5, hkv=1, hd=64, ff=640, fw=256, fdepth=5),
198
+ 'DA': dict(zc=576, fw=512, fdepth=6, lsd=True), 'DCp': dict(d=320, L=8, hq=5, hkv=1, hd=64, ff=640, zc=576, fw=512, fdepth=6, lsd=True)} # Cp = plain (non-looped) ~9.76M capacity probe
199
+ def n_params(m): return sum(p.numel() for p in m.parameters()) + sum(b.numel() for n, b in m.named_buffers() if n in ('emb_mean', 'emb_std'))
200
+ if __name__ == '__main__':
201
+ m = Student(); print('student params (incl. emb_mean/std buffers):', n_params(m))
202
+ B = 3; text = torch.randint(8, 200, (B, 40)); tlen = torch.tensor([40, 30, 12]); ref = torch.randn(B, 62, 32); rlen = torch.tensor([62, 0, 20])
203
+ fr = torch.randn(B, 50, 32); flen = torch.tensor([50, 33, 7])
204
+ fl, el = m.forward_train(text, tlen, ref, rlen, fr, flen); print('losses', float(fl), float(el))
205
+ print(m.generate(torch.tensor(encode_text('नमस्ते', 'hi')), max_frames=5).shape)
aksharavp_tts/normalize.py ADDED
The diff for this file is too large to render. See raw diff
 
aksharavp_tts/tts.py ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """AksharaVP-17M: Telugu, Hindi and Indian-English text to speech in 17,643,026 parameters.
2
+
3
+ from aksharavp_tts import AksharaVP
4
+ tts = AksharaVP(".") # folder with model.safetensors, config.json, voices.safetensors
5
+ audio = tts.say("నమస్కారం, మీరు ఎలా ఉన్నారు?", lang="te", voice="Lakshmi")
6
+ audio = tts.say("नमस्ते, आप कैसे हैं?", lang="hi", clone="my_voice.wav") # needs clone_encoder.safetensors
7
+ tts.save(audio, "out.wav")
8
+ """
9
+ import json, os, re
10
+ import numpy as np, torch
11
+ from safetensors.torch import load_file
12
+ from .model import Student, encode_text
13
+ from .normalize import normalize
14
+
15
+ SAMPLE_RATE = 24000
16
+ LANG_NAMES = {'te': 'Telugu', 'hi': 'Hindi', 'en': 'Indian English'}
17
+
18
+
19
+ def _sentences(text, limit=220):
20
+ parts = [p.strip() for p in re.split(r"(?<=[.!?।॥])\s+", text.strip()) if p.strip()]
21
+ out = []
22
+ for p in parts:
23
+ if out and len(out[-1]) + len(p) + 1 <= limit: out[-1] += " " + p
24
+ else: out.append(p)
25
+ return out
26
+
27
+
28
+ def _frame_limit(norm_text):
29
+ letters = sum(ch.isalnum() or 0x0900 <= ord(ch) <= 0x0D7F for ch in norm_text)
30
+ return int(np.ceil((2.0 * 0.092 * letters + 1.0) * 12.5))
31
+
32
+
33
+ def _longest_silence(audio, sr=SAMPLE_RATE):
34
+ audio = np.asarray(audio, np.float32).reshape(-1); w = sr // 10; n = len(audio) // w
35
+ if n == 0: return 0.0
36
+ db = 20 * np.log10(np.sqrt((audio[: n * w].reshape(n, w) ** 2).mean(1)) + 1e-9); loud = np.where(db > -55)[0]
37
+ if len(loud) == 0: return n / 10
38
+ run = best = 0
39
+ for v in db[loud[0]:]:
40
+ run = run + 1 if v <= -55 else 0; best = max(best, run)
41
+ return best / 10
42
+
43
+
44
+ def _build_mimi(cfg_dict):
45
+ from pocket_tts.models.mimi import build_mimi
46
+ from pocket_tts.utils.config import MimiConfig
47
+ from pocket_tts.modules.stateful_module import StatefulModule
48
+ m = build_mimi(MimiConfig(**cfg_dict))
49
+ for name, mod in m.named_modules():
50
+ if isinstance(mod, StatefulModule): mod._module_absolute_name = name
51
+ return m
52
+
53
+
54
+ HIMA_CODEC = {"dtype": "float32", "sample_rate": 24000, "inner_dim": 32, "outer_dim": 512, "channels": 1, "frame_rate": 12.5,
55
+ "seanet": {"dimension": 512, "channels": 1, "n_filters": 64, "n_residual_layers": 1, "ratios": [6, 5, 4], "kernel_size": 7,
56
+ "residual_kernel_size": 3, "last_kernel_size": 3, "dilation_base": 2, "pad_mode": "constant", "compress": 2},
57
+ "transformer": {"d_model": 512, "input_dimension": 512, "output_dimensions": [512], "num_heads": 8, "num_layers": 2,
58
+ "layer_scale": 0.01, "context": 250, "dim_feedforward": 2048},
59
+ "quantizer": {"dimension": 32, "output_dimension": 512}}
60
+
61
+
62
+ class AksharaVP:
63
+ def __init__(self, folder=".", device="cpu", state_dict=None, load_clone_encoder=True):
64
+ self.folder, self.device = folder, torch.device(device)
65
+ self.config = json.load(open(os.path.join(folder, "config.json")))
66
+ sc = {k: v for k, v in self.config["student"].items() if k in ("d", "L", "hq", "hkv", "hd", "ff", "fw", "fdepth", "lat", "zc", "rank", "vocab", "ref_frames", "max_len", "lsd")}
67
+ sd = state_dict if state_dict is not None else load_file(os.path.join(folder, "model.safetensors"))
68
+ self.student = Student(**sc)
69
+ self.student.load_state_dict({k[8:]: v for k, v in sd.items() if k.startswith("student.")}, strict=True)
70
+ self.student.to(self.device).eval()
71
+ self.mimi = _build_mimi(self.config["decoder_mimi"])
72
+ dec = {k[5:]: v for k, v in sd.items() if k.startswith("mimi.")}
73
+ missing, unexpected = self.mimi.load_state_dict(dec, strict=False)
74
+ assert not unexpected and all(k.startswith(("encoder.", "encoder_transformer.", "downsample.")) for k in missing), (missing, unexpected)
75
+
76
+
77
+ for a in ("encoder", "encoder_transformer", "downsample"): # decoder path only; cloning loads clone_encoder.safetensors
78
+ if hasattr(self.mimi, a): delattr(self.mimi, a)
79
+ self.mimi.to(self.device).eval()
80
+ v = load_file(os.path.join(folder, "voices.safetensors"))
81
+ self._voices = {k: t.float() for k, t in v.items()}
82
+ self.voices = {m["name"]: m for m in self.config["voices"]}
83
+ self._enc = None
84
+ self._enc_path = os.path.join(folder, "clone_encoder.safetensors")
85
+ self.can_clone = os.path.exists(self._enc_path)
86
+ if load_clone_encoder and self.can_clone: self._load_encoder()
87
+ s = self.config["sampler"]; self.defaults = dict(cfg=s["cfg"], temperature=s["temperature"], steps=s["steps"])
88
+
89
+ def _load_encoder(self):
90
+ if self._enc is None:
91
+ m = _build_mimi(HIMA_CODEC)
92
+ e = {k[8:]: v for k, v in load_file(self._enc_path).items()}
93
+ missing, unexpected = m.load_state_dict(e, strict=False)
94
+ assert not unexpected and all(k.startswith(("decoder.", "decoder_transformer.", "upsample.", "quantizer.")) for k in missing)
95
+ self._enc = m.to(self.device).eval()
96
+ return self._enc
97
+
98
+ @torch.no_grad()
99
+ def voice_from_clip(self, path_or_array, sr=None):
100
+ """Reference latents (<= 62 frames, about 5 s) from a short clip of clear speech."""
101
+ from scipy.signal import resample_poly
102
+ if isinstance(path_or_array, str):
103
+ import soundfile as sf
104
+ x, sr = sf.read(path_or_array, dtype="float32", always_2d=True); x = x.mean(1)
105
+ else:
106
+ x = np.asarray(path_or_array, np.float32)
107
+ if x.ndim > 1: x = x.mean(1)
108
+ if sr != SAMPLE_RATE:
109
+ from math import gcd
110
+ g = gcd(int(sr), SAMPLE_RATE); x = resample_poly(x, SAMPLE_RATE // g, int(sr) // g).astype(np.float32)
111
+ if len(x) < SAMPLE_RATE * 2: raise ValueError("the reference clip is shorter than 2 seconds")
112
+ x = x[: SAMPLE_RATE * 10]; x = x[: len(x) // 1920 * 1920]
113
+ enc = self._load_encoder()
114
+ return enc.encode_to_latent(torch.from_numpy(x)[None, None].to(self.device)).float()[0][: self.student.ref_frames].cpu()
115
+
116
+ def _ref(self, voice, clone):
117
+ if clone is not None:
118
+ return clone if isinstance(clone, torch.Tensor) else self.voice_from_clip(clone)
119
+ if voice is None: return None
120
+ if voice not in self._voices: raise ValueError(f"unknown voice {voice!r}; built-in voices: {list(self.voices)}")
121
+ return self._voices[voice]
122
+
123
+ @torch.no_grad()
124
+ def decode(self, frames):
125
+ from pocket_tts.modules.stateful_module import init_states
126
+ if len(frames) == 0: return np.zeros(0, np.float32)
127
+ return self.mimi.decode_from_latent(frames.float()[None].to(self.device), init_states(self.mimi, batch_size=1, sequence_length=10000)).reshape(-1).cpu().numpy()
128
+
129
+ @torch.no_grad()
130
+ def say(self, text, lang="hi", voice=None, clone=None, temperature=None, cfg=None, steps=None, seed=0, pause=0.15, retries=2):
131
+ """Speech for `text` as float32 at 24 kHz. lang: te | hi | en. voice: a built-in name; clone: a .wav path (or latents) to copy.
132
+ Defaults (published): cfg 1.25, temperature 0.3, 4 flow steps. Long text is split at sentence ends."""
133
+ if lang not in LANG_NAMES: raise ValueError("lang must be one of te, hi, en")
134
+ if voice is None and clone is None: voice = self.config["default_voice"][lang]
135
+ ref = self._ref(voice, clone)
136
+ kw = dict(temperature=self.defaults["temperature"] if temperature is None else temperature,
137
+ cfg=self.defaults["cfg"] if cfg is None else cfg, steps=self.defaults["steps"] if steps is None else steps)
138
+ if seed is not None: torch.manual_seed(seed)
139
+ loc = "te" if lang == "te" else "hi" # the training-time normaliser locale (English rows used the Hindi locale)
140
+ gap = np.zeros(int(pause * SAMPLE_RATE), np.float32); out = []; self.last_retries = 0
141
+ for part in _sentences(text):
142
+ norm = normalize(part, language=loc)
143
+ ids = torch.tensor(encode_text(norm, lang))
144
+ limit = min(375, _frame_limit(norm)); best = None
145
+ for attempt in range(retries + 1):
146
+ fr = self.student.generate(ids, ref, max_frames=limit if retries else 375, **kw) # frames are drawn one by one, so a cap never changes a take that ends in time
147
+ wav = self.decode(fr); sil = _longest_silence(wav)
148
+ bad = bool(retries) and (len(fr) >= limit or sil >= 3.0)
149
+ if best is None or not bad or (best[3] and sil < best[2]): best = (fr, wav, sil, bad)
150
+ if not bad: break
151
+ self.last_retries += 1
152
+ if len(best[0]): out += [best[1], gap]
153
+ audio = np.concatenate(out[:-1]) if out else np.zeros(0, np.float32)
154
+ peak = float(np.abs(audio).max()) if len(audio) else 0.0
155
+ return audio * (0.97 / peak) if peak > 0.97 else audio
156
+
157
+ @staticmethod
158
+ def save(audio, path):
159
+ import soundfile as sf
160
+ sf.write(path, audio, SAMPLE_RATE)
161
+
162
+ def n_params(self):
163
+ return sum(p.numel() for p in self.student.parameters()) + self.student.emb_mean.numel() + self.student.emb_std.numel() + sum(p.numel() for p in self.mimi.parameters())
assets/architecture.png ADDED

Git LFS Details

  • SHA256: 037087228a0c9d14db88433e824423a71fd61dd61d4f7fba3a99011c26b99033
  • Pointer size: 131 Bytes
  • Size of remote file: 335 kB
assets/architecture.svg ADDED
assets/banner.gif ADDED

Git LFS Details

  • SHA256: 77d10a46bad7b70792e3026f43c3750c8f8841e06e0382dd060d10c71ed7feb3
  • Pointer size: 131 Bytes
  • Size of remote file: 459 kB
assets/banner.png ADDED

Git LFS Details

  • SHA256: f93835e619ab21a9bdcb2fd727ab4b584a88350299c89913127e5e4892113801
  • Pointer size: 131 Bytes
  • Size of remote file: 456 kB
assets/banner.svg ADDED
assets/landscape.png ADDED

Git LFS Details

  • SHA256: c01ca8155410d2949c2013a2ab4d71ba2c4d270466ca008011b06520ce8e4a52
  • Pointer size: 131 Bytes
  • Size of remote file: 217 kB
assets/landscape.svg ADDED
assets/params.png ADDED

Git LFS Details

  • SHA256: 9365a2118b6559baa4f3e932c5ce6ff2158eb0053e562129670a10605b08fdc5
  • Pointer size: 131 Bytes
  • Size of remote file: 126 kB
assets/params.svg ADDED
assets/results.png ADDED

Git LFS Details

  • SHA256: 7992265fc9a5d83c3c15803d8133e3d1bc46118f67f0fbbf77e3ce428c03cab6
  • Pointer size: 131 Bytes
  • Size of remote file: 206 kB
assets/results.svg ADDED
assets/speech.gif ADDED

Git LFS Details

  • SHA256: da86f0694983d40a8bac581a1200070df9a03db28a96013e9ae03899f4c3dbf5
  • Pointer size: 131 Bytes
  • Size of remote file: 275 kB
assets/speech.svg ADDED
clone_encoder.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc6635ddf519cee20838d2fa8f46928e98e2be2298f7eef2bb49845db7412eb
3
+ size 39001336
config.json ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "AksharaVP-17M",
3
+ "architecture": "aksharavp-calm-lsd",
4
+ "languages": [
5
+ "te",
6
+ "hi",
7
+ "en"
8
+ ],
9
+ "params": {
10
+ "total": 17643026,
11
+ "student": 15025793,
12
+ "decoder": 2617233,
13
+ "clone_encoder_optional": 9749024,
14
+ "total_with_clone_encoder": 27392050
15
+ },
16
+ "student": {
17
+ "d": 320,
18
+ "L": 8,
19
+ "hq": 5,
20
+ "hkv": 1,
21
+ "hd": 64,
22
+ "ff": 640,
23
+ "zc": 576,
24
+ "fw": 512,
25
+ "fdepth": 6,
26
+ "lsd": true,
27
+ "lat": 32,
28
+ "rank": 64,
29
+ "vocab": 256,
30
+ "ref_frames": 62,
31
+ "max_len": 1024
32
+ },
33
+ "sampler": {
34
+ "cfg": 1.25,
35
+ "temperature": 0.3,
36
+ "steps": 4,
37
+ "max_frames": 375,
38
+ "frame_rate_hz": 12.5,
39
+ "sample_rate": 24000
40
+ },
41
+ "decoder_mimi": {
42
+ "dtype": "float32",
43
+ "sample_rate": 24000,
44
+ "inner_dim": 32,
45
+ "outer_dim": 128,
46
+ "channels": 1,
47
+ "frame_rate": 12.5,
48
+ "seanet": {
49
+ "dimension": 512,
50
+ "channels": 1,
51
+ "n_filters": 64,
52
+ "n_residual_layers": 1,
53
+ "ratios": [
54
+ 6,
55
+ 5,
56
+ 4
57
+ ],
58
+ "kernel_size": 7,
59
+ "residual_kernel_size": 3,
60
+ "last_kernel_size": 3,
61
+ "dilation_base": 2,
62
+ "pad_mode": "constant",
63
+ "compress": 2
64
+ },
65
+ "transformer": {
66
+ "d_model": 512,
67
+ "num_heads": 8,
68
+ "num_layers": 2,
69
+ "layer_scale": 0.01,
70
+ "context": 250,
71
+ "dim_feedforward": 2048,
72
+ "input_dimension": 512,
73
+ "output_dimensions": [
74
+ 512
75
+ ]
76
+ },
77
+ "quantizer": {
78
+ "dimension": 32,
79
+ "output_dimension": 128
80
+ },
81
+ "decoder_seanet": {
82
+ "dimension": 128,
83
+ "channels": 1,
84
+ "n_filters": 32,
85
+ "n_residual_layers": 1,
86
+ "ratios": [
87
+ 6,
88
+ 5,
89
+ 4
90
+ ],
91
+ "kernel_size": 3,
92
+ "residual_kernel_size": 3,
93
+ "last_kernel_size": 3,
94
+ "dilation_base": 2,
95
+ "pad_mode": "constant",
96
+ "compress": 2
97
+ },
98
+ "decoder_transformer": {
99
+ "d_model": 128,
100
+ "num_heads": 4,
101
+ "num_layers": 12,
102
+ "layer_scale": 0.01,
103
+ "context": 50,
104
+ "dim_feedforward": 384,
105
+ "input_dimension": 128,
106
+ "output_dimensions": [
107
+ 128
108
+ ]
109
+ }
110
+ },
111
+ "voices": [
112
+ {
113
+ "name": "Meera",
114
+ "gender": "female",
115
+ "set": "hi",
116
+ "frames": 58
117
+ },
118
+ {
119
+ "name": "Sneha",
120
+ "gender": "female",
121
+ "set": "hi",
122
+ "frames": 62
123
+ },
124
+ {
125
+ "name": "Nandini",
126
+ "gender": "female",
127
+ "set": "hi",
128
+ "frames": 62
129
+ },
130
+ {
131
+ "name": "Siddharth",
132
+ "gender": "male",
133
+ "set": "hi",
134
+ "frames": 62
135
+ },
136
+ {
137
+ "name": "Ishaan",
138
+ "gender": "male",
139
+ "set": "hi",
140
+ "frames": 62
141
+ },
142
+ {
143
+ "name": "Nikhil",
144
+ "gender": "male",
145
+ "set": "hi",
146
+ "frames": 61
147
+ },
148
+ {
149
+ "name": "Lakshmi",
150
+ "gender": "female",
151
+ "set": "te",
152
+ "frames": 62
153
+ },
154
+ {
155
+ "name": "Sravani",
156
+ "gender": "female",
157
+ "set": "te",
158
+ "frames": 62
159
+ },
160
+ {
161
+ "name": "Bhavana",
162
+ "gender": "female",
163
+ "set": "te",
164
+ "frames": 56
165
+ },
166
+ {
167
+ "name": "Srinivas",
168
+ "gender": "male",
169
+ "set": "te",
170
+ "frames": 60
171
+ },
172
+ {
173
+ "name": "Karthik",
174
+ "gender": "male",
175
+ "set": "te",
176
+ "frames": 51
177
+ },
178
+ {
179
+ "name": "Pranay",
180
+ "gender": "male",
181
+ "set": "te",
182
+ "frames": 62
183
+ }
184
+ ],
185
+ "default_voice": {
186
+ "hi": "Meera",
187
+ "en": "Meera",
188
+ "te": "Lakshmi"
189
+ },
190
+ "checkpoint": {
191
+ "source": "round-4 DCp last_model.pt",
192
+ "step": 100026,
193
+ "sha256": "2cd4456730fa2ec0ac546315df102b5e95f0b44968621040262318db1cafeb78"
194
+ }
195
+ }
evaluation/comparison.json ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "models": [
3
+ {
4
+ "name": "AksharaVP-17M (this model)",
5
+ "ours": true,
6
+ "params": 17643026,
7
+ "langs": "te \u00b7 hi \u00b7 en, one checkpoint",
8
+ "results": {
9
+ "te": {
10
+ "CER": 6.0372,
11
+ "WER": 28.937,
12
+ "UTMOS": 2.6385,
13
+ "n": 100
14
+ },
15
+ "hi": {
16
+ "CER": 4.5652,
17
+ "WER": 13.9677,
18
+ "UTMOS": 2.733,
19
+ "n": 100
20
+ },
21
+ "en": {
22
+ "CER": 4.3683,
23
+ "WER": 9.4492,
24
+ "UTMOS": 3.1852,
25
+ "n": 100
26
+ }
27
+ },
28
+ "source": "baseline/r4_DCp_last_model_cfg1.25_n100_dev.json",
29
+ "fp32_MB": 70.572104
30
+ },
31
+ {
32
+ "name": "Hima TTS nano (hi + te checkpoints)",
33
+ "params": 72160162,
34
+ "langs": "te+en / hi+en, two checkpoints",
35
+ "results": {
36
+ "te": {
37
+ "CER": 6.5378,
38
+ "WER": 31.4304,
39
+ "UTMOS": 3.5107,
40
+ "n": 100
41
+ },
42
+ "hi": {
43
+ "CER": 4.8804,
44
+ "WER": 15.0589,
45
+ "UTMOS": 3.5989,
46
+ "n": 100
47
+ },
48
+ "en": {
49
+ "CER": 5.2879,
50
+ "WER": 11.4704,
51
+ "UTMOS": 4.0355,
52
+ "n": 100
53
+ }
54
+ },
55
+ "source": "baseline/hima_dev100_dev.json, enprobe_hima_dev_dev.json",
56
+ "fp32_MB": 288.640648
57
+ },
58
+ {
59
+ "name": "Kyutai Pocket TTS (english)",
60
+ "params": 99752802,
61
+ "langs": "en only",
62
+ "results": {
63
+ "en": {
64
+ "CER": 2.3513,
65
+ "WER": 6.0131,
66
+ "UTMOS": 3.9945,
67
+ "n": 100
68
+ }
69
+ },
70
+ "source": "baseline/enprobe_pocket_english_dev_dev.json",
71
+ "fp32_MB": 399.011208
72
+ },
73
+ {
74
+ "name": "Kyutai Pocket TTS english_7m_2026-10",
75
+ "params": 6862578,
76
+ "langs": "en only",
77
+ "results": {
78
+ "en": {
79
+ "CER": 1.9856,
80
+ "WER": 6.3669,
81
+ "UTMOS": 4.1018,
82
+ "n": 100
83
+ }
84
+ },
85
+ "source": "baseline/enprobe_pocket_english_7m_2026-10_dev_dev.json",
86
+ "fp32_MB": 27.450312
87
+ },
88
+ {
89
+ "name": "Kyutai Pocket TTS english_2m_2026-10",
90
+ "params": 1922846,
91
+ "langs": "en only",
92
+ "results": {
93
+ "en": {
94
+ "CER": 3.8876,
95
+ "WER": 9.7019,
96
+ "UTMOS": 3.4948,
97
+ "n": 100
98
+ }
99
+ },
100
+ "source": "baseline/enprobe_pocket_english_2m_2026-10_dev_dev.json",
101
+ "fp32_MB": 7.691384
102
+ }
103
+ ],
104
+ "bootstrap_vs_hima": {
105
+ "te": {
106
+ "dCER": [
107
+ -0.49580305181323964,
108
+ -1.1323514594333068,
109
+ 0.16311895580706173,
110
+ 0.1446
111
+ ],
112
+ "dWER": [
113
+ -2.49111498160341,
114
+ -4.90516677567037,
115
+ 0.0,
116
+ 0.0502
117
+ ],
118
+ "dUTMOS": [
119
+ -0.8718396995882988,
120
+ -0.9468453193902967,
121
+ -0.7948288431167604,
122
+ 0.0
123
+ ]
124
+ },
125
+ "hi": {
126
+ "dCER": [
127
+ -0.3148669116968514,
128
+ -0.9455831255690215,
129
+ 0.28077730267494283,
130
+ 0.329
131
+ ],
132
+ "dWER": [
133
+ -1.0746316412427643,
134
+ -2.6176208315815686,
135
+ 0.4444543297746145,
136
+ 0.1762
137
+ ],
138
+ "dUTMOS": [
139
+ -0.8663386421171426,
140
+ -0.9320238929688931,
141
+ -0.7976584428250787,
142
+ 0.0
143
+ ]
144
+ },
145
+ "en": {
146
+ "dCER": [
147
+ -0.9211334904211661,
148
+ -1.8535581172881552,
149
+ -0.09390450194621545,
150
+ 0.0272
151
+ ],
152
+ "dWER": [
153
+ -2.029627198937715,
154
+ -4.158710283657445,
155
+ -0.14944727561296156,
156
+ 0.0364
157
+ ],
158
+ "dUTMOS": [
159
+ -0.850278826076746,
160
+ -0.9350222995281222,
161
+ -0.7625989204049114,
162
+ 0.0
163
+ ]
164
+ }
165
+ },
166
+ "notes": "Notes: Hima TTS nano ships separate Telugu and Hindi checkpoints of 72,160,162 parameters each (English is spoken by the Hindi one; its English row uses that checkpoint). Pocket TTS rows are English-only models speaking with their own (non-Indian) built-in voices, so English accent differs from the Indian voices of the other rows. UTMOS is an English-centric predictor; compare systems within a language column, not across columns."
167
+ }
evaluation/gguf_parity.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "f32": {
3
+ "tensor_max_abs_diff": 0.0,
4
+ "audio": {
5
+ "hi": {
6
+ "samples_gguf": 72960,
7
+ "samples_ref": 72960,
8
+ "identical": true,
9
+ "max_abs_audio": 0.0
10
+ },
11
+ "te": {
12
+ "samples_gguf": 76800,
13
+ "samples_ref": 76800,
14
+ "identical": true,
15
+ "max_abs_audio": 0.0
16
+ },
17
+ "en": {
18
+ "samples_gguf": 74880,
19
+ "samples_ref": 74880,
20
+ "identical": true,
21
+ "max_abs_audio": 0.0
22
+ }
23
+ }
24
+ },
25
+ "f16": {
26
+ "tensor_max_abs_diff": 0.00717926025390625,
27
+ "audio": {
28
+ "hi": {
29
+ "samples_gguf": 72960,
30
+ "samples_ref": 72960,
31
+ "identical": false,
32
+ "max_abs_audio": 0.013351529836654663
33
+ },
34
+ "te": {
35
+ "samples_gguf": 76800,
36
+ "samples_ref": 76800,
37
+ "identical": false,
38
+ "max_abs_audio": 0.014216159470379353
39
+ },
40
+ "en": {
41
+ "samples_gguf": 74880,
42
+ "samples_ref": 74880,
43
+ "identical": false,
44
+ "max_abs_audio": 0.022888675332069397
45
+ }
46
+ }
47
+ }
48
+ }
evaluation/gguf_sizes.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "aksharavp-17m-f32.gguf": {
3
+ "bytes": 70600512,
4
+ "MB": 70.6,
5
+ "sha256": "95dc46c5f5b4b0d58c3d91b49ce683691e2bcb3bda3acdf446bb8df94f8881cf",
6
+ "tensors": 289,
7
+ "values": 17643026
8
+ },
9
+ "aksharavp-17m-f16.gguf": {
10
+ "bytes": 35313984,
11
+ "MB": 35.31,
12
+ "sha256": "a3d61b7059cbd0be400b3f18692996456794469e24f3dba3e1bb6e56ef5150af",
13
+ "tensors": 289,
14
+ "values": 17643026
15
+ }
16
+ }
evaluation/numbers.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "params": {
3
+ "total": 17643026,
4
+ "student": 15025793,
5
+ "decoder": 2617233,
6
+ "clone_encoder_optional": 9749024,
7
+ "total_with_clone_encoder": 27392050
8
+ },
9
+ "ours": {
10
+ "te": {
11
+ "CER": {
12
+ "value": 6.0372,
13
+ "ci95": [
14
+ 4.7796,
15
+ 7.4551
16
+ ],
17
+ "n": 100
18
+ },
19
+ "WER": {
20
+ "value": 28.937,
21
+ "ci95": [
22
+ 25.6568,
23
+ 32.4314
24
+ ],
25
+ "n": 100
26
+ },
27
+ "UTMOS": {
28
+ "value": 2.6385,
29
+ "ci95": [
30
+ 2.5804,
31
+ 2.6947
32
+ ],
33
+ "n": 100
34
+ }
35
+ },
36
+ "hi": {
37
+ "CER": {
38
+ "value": 4.5652,
39
+ "ci95": [
40
+ 3.7913,
41
+ 5.3939
42
+ ],
43
+ "n": 100
44
+ },
45
+ "WER": {
46
+ "value": 13.9677,
47
+ "ci95": [
48
+ 12.2499,
49
+ 15.9243
50
+ ],
51
+ "n": 100
52
+ },
53
+ "UTMOS": {
54
+ "value": 2.733,
55
+ "ci95": [
56
+ 2.6629,
57
+ 2.8027
58
+ ],
59
+ "n": 100
60
+ }
61
+ },
62
+ "en": {
63
+ "CER": {
64
+ "value": 4.3683,
65
+ "ci95": [
66
+ 3.0681,
67
+ 5.8725
68
+ ],
69
+ "n": 100
70
+ },
71
+ "WER": {
72
+ "value": 9.4492,
73
+ "ci95": [
74
+ 7.3144,
75
+ 11.8277
76
+ ],
77
+ "n": 100
78
+ },
79
+ "UTMOS": {
80
+ "value": 3.1852,
81
+ "ci95": [
82
+ 3.1198,
83
+ 3.2517
84
+ ],
85
+ "n": 100
86
+ }
87
+ }
88
+ },
89
+ "landscape": [
90
+ {
91
+ "name": "AksharaVP-17M + clone encoder",
92
+ "params": 27392050,
93
+ "source": "this release"
94
+ },
95
+ {
96
+ "name": "Pravega Pocket TTS",
97
+ "params": 121790146,
98
+ "source": "dheeyantra/pravega-pocket-tts"
99
+ },
100
+ {
101
+ "name": "DhVaani-0.5",
102
+ "params": 122798800,
103
+ "source": "ARTPARK-IISc/DhVaani-0.5"
104
+ },
105
+ {
106
+ "name": "IndicF5",
107
+ "params": 350681834,
108
+ "source": "ai4bharat/IndicF5"
109
+ }
110
+ ]
111
+ }
evaluation/parity_vs_dev_eval_pipeline.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "hi-dev-000": {
3
+ "len_pkg": 176640,
4
+ "len_eval": 176640,
5
+ "max_abs": 3.0517112463712692e-05
6
+ },
7
+ "hi-dev-001": {
8
+ "len_pkg": 109440,
9
+ "len_eval": 109440,
10
+ "max_abs": 3.0516181141138077e-05
11
+ },
12
+ "te-dev-000": {
13
+ "len_pkg": 264960,
14
+ "len_eval": 264960,
15
+ "max_abs": 3.051667590625584e-05
16
+ },
17
+ "te-dev-001": {
18
+ "len_pkg": 301440,
19
+ "len_eval": 301440,
20
+ "max_abs": 3.051722887903452e-05
21
+ },
22
+ "en-dev-000": {
23
+ "len_pkg": 241920,
24
+ "len_eval": 241920,
25
+ "max_abs": 3.0517112463712692e-05
26
+ },
27
+ "en-dev-001": {
28
+ "len_pkg": 136320,
29
+ "len_eval": 136320,
30
+ "max_abs": 3.0516646802425385e-05
31
+ }
32
+ }
gguf/aksharavp-17m-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3d61b7059cbd0be400b3f18692996456794469e24f3dba3e1bb6e56ef5150af
3
+ size 35313984
gguf/aksharavp-17m-f32.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95dc46c5f5b4b0d58c3d91b49ce683691e2bcb3bda3acdf446bb8df94f8881cf
3
+ size 70600512
gguf_load.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Load an AksharaVP-17M GGUF weight container back into PyTorch.
2
+
3
+ The GGUF file is a portable weight container (GGUF v3, written with the `gguf` package): every tensor of model.safetensors
4
+ plus the config and sampler settings as metadata. llama.cpp has no runtime for this TTS architecture; run it with
5
+ the PyTorch code in aksharavp_tts/.
6
+
7
+ from gguf_load import load_gguf
8
+ tts = load_gguf("gguf/aksharavp-17m-f32.gguf") # -> aksharavp_tts.AksharaVP
9
+ tts.save(tts.say("नमस्ते", lang="hi"), "hi.wav")
10
+ """
11
+ import json, os, sys, tempfile
12
+ import numpy as np, torch
13
+ from gguf import GGUFReader
14
+
15
+
16
+ def read_gguf(path):
17
+ r = GGUFReader(path)
18
+ meta = {}
19
+ for f in r.fields.values():
20
+ if f.name.startswith("aksharavp.") or f.name.startswith("general."):
21
+ try: meta[f.name] = f.contents()
22
+ except Exception: pass
23
+ sd = {}
24
+ for t in r.tensors:
25
+ a = np.array(t.data)
26
+ shape = [int(x) for x in reversed(t.shape.tolist())] # GGUF stores dims innermost-first
27
+ sd[t.name] = torch.from_numpy(a.reshape(shape).astype(np.float32).copy())
28
+ return sd, meta
29
+
30
+
31
+ def load_gguf(path, folder=None, device="cpu", load_clone_encoder=True):
32
+ """folder: the model folder holding voices.safetensors (and clone_encoder.safetensors); defaults to the GGUF's parent's parent."""
33
+ here = os.path.dirname(os.path.abspath(__file__)); sys.path.insert(0, here)
34
+ from aksharavp_tts import AksharaVP
35
+ sd, meta = read_gguf(path)
36
+ folder = folder or here
37
+ cfg = json.loads(meta["aksharavp.config_json"])
38
+ d = tempfile.mkdtemp(); json.dump(cfg, open(os.path.join(d, "config.json"), "w"))
39
+ for f in ("voices.safetensors", "clone_encoder.safetensors"):
40
+ if os.path.exists(os.path.join(folder, f)): os.symlink(os.path.join(folder, f), os.path.join(d, f))
41
+ return AksharaVP(d, device=device, state_dict=sd, load_clone_encoder=load_clone_encoder)
42
+
43
+
44
+ if __name__ == "__main__":
45
+ sd, meta = read_gguf(sys.argv[1])
46
+ print({k: v for k, v in meta.items() if k != "aksharavp.config_json"})
47
+ print(len(sd), "tensors,", sum(v.numel() for v in sd.values()), "values")
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e61b2723119755585beb571dda7351285f13ec6c4bc57792c652916a560f8015
3
+ size 70606632
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ torch>=2.5
2
+ numpy
3
+ safetensors
4
+ soundfile
5
+ scipy
6
+ pocket-tts==4.0.1
7
+ gguf>=0.10 # only for gguf_load.py
samples/en_clone.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0fb3439c46abbab99dd0e11b74a4d0ba957beb1f4b61550902be273e1c7d3cd
3
+ size 184364
samples/en_clone_reference.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da7464f62f1a1e2fd7ab0df5d6d120c4140cddbed482805346f1a85ae88cbbf8
3
+ size 276524
samples/en_ishaan.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed3ae8c122427ee706651c325112813cd23d61d3231e298ade3c63b05ceafaf8
3
+ size 188204
samples/en_meera.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d238b75d64cf72b07f7bb4918ebef7a12f6bc54761c53ad12e48ae4fd96a3a46
3
+ size 226604
samples/en_sneha.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa730adad822c87f1a36bb1f8db7812083c580b249d8a123bc32ef4052b88acc
3
+ size 195884
samples/hi_clone.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:743f07c7fa3eee64c3a57b13fd6f4168c94b6c2dda6525cd2c0b6985c645fbb2
3
+ size 176684
samples/hi_clone_reference.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4727dda551ea07dc7fccbf8ee384497b94e90bcddc33aecb8fa87bcbe5c6b941
3
+ size 282284
samples/hi_meera.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7e15d8146c3354dd5d684d0e3c3780d617299e05fd2b70e2f7277ab2679f355
3
+ size 234284
samples/hi_nandini.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcee823434a00e06d98bd50e995a8ef532ec48a533d8c13e58d569bd7a535237
3
+ size 215084
samples/hi_siddharth.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a24a6406fe06e37afb1c39cba1f558c15697772abb56c2cdb93d9aa6ad57333c
3
+ size 184364
samples/samples.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "file": "samples/hi_meera.wav",
4
+ "lang": "hi",
5
+ "voice": "Meera",
6
+ "text": "नमस्ते! मैं अक्षरा हूँ, और मैं हिंदी, तेलुगु और अंग्रेज़ी बोल सकती हूँ।",
7
+ "seconds": 4.88,
8
+ "gen_s": 1.89,
9
+ "retries": 0
10
+ },
11
+ {
12
+ "file": "samples/hi_siddharth.wav",
13
+ "lang": "hi",
14
+ "voice": "Siddharth",
15
+ "text": "कल सुबह दस बजे हमारी मीटिंग है, कृपया समय पर पहुँचिए।",
16
+ "seconds": 3.84,
17
+ "gen_s": 1.47,
18
+ "retries": 0
19
+ },
20
+ {
21
+ "file": "samples/hi_nandini.wav",
22
+ "lang": "hi",
23
+ "voice": "Nandini",
24
+ "text": "बारिश के बाद हवा में मिट्टी की खुशबू कितनी अच्छी लगती है।",
25
+ "seconds": 4.48,
26
+ "gen_s": 1.76,
27
+ "retries": 0
28
+ },
29
+ {
30
+ "file": "samples/te_lakshmi.wav",
31
+ "lang": "te",
32
+ "voice": "Lakshmi",
33
+ "text": "నమస్కారం! నేను అక్షర, తెలుగు, హిందీ మరియు ఇంగ్లీష్ మాట్లాడగలను.",
34
+ "seconds": 4.96,
35
+ "gen_s": 1.96,
36
+ "retries": 0
37
+ },
38
+ {
39
+ "file": "samples/te_srinivas.wav",
40
+ "lang": "te",
41
+ "voice": "Srinivas",
42
+ "text": "రేపు ఉదయం పది గంటలకు మన సమావేశం ఉంది, దయచేసి సమయానికి రండి.",
43
+ "seconds": 4.0,
44
+ "gen_s": 1.54,
45
+ "retries": 0
46
+ },
47
+ {
48
+ "file": "samples/te_sravani.wav",
49
+ "lang": "te",
50
+ "voice": "Sravani",
51
+ "text": "వర్షం తర్వాత మట్టి వాసన ఎంతో హాయిగా ఉంటుంది.",
52
+ "seconds": 3.76,
53
+ "gen_s": 1.49,
54
+ "retries": 0
55
+ },
56
+ {
57
+ "file": "samples/en_meera.wav",
58
+ "lang": "en",
59
+ "voice": "Meera",
60
+ "text": "Hello! I'm a tiny text to speech model that runs on an ordinary laptop processor.",
61
+ "seconds": 4.72,
62
+ "gen_s": 1.8,
63
+ "retries": 0
64
+ },
65
+ {
66
+ "file": "samples/en_ishaan.wav",
67
+ "lang": "en",
68
+ "voice": "Ishaan",
69
+ "text": "Your train to Hyderabad leaves from platform four at nine fifteen.",
70
+ "seconds": 3.92,
71
+ "gen_s": 1.49,
72
+ "retries": 0
73
+ },
74
+ {
75
+ "file": "samples/en_sneha.wav",
76
+ "lang": "en",
77
+ "voice": "Sneha",
78
+ "text": "Small models can still speak clearly, if they are trained with care.",
79
+ "seconds": 4.08,
80
+ "gen_s": 1.48,
81
+ "retries": 0
82
+ },
83
+ {
84
+ "file": "samples/hi_clone.wav",
85
+ "lang": "hi",
86
+ "clone_reference": "samples/hi_clone_reference.wav",
87
+ "text": "यह आवाज़ सिर्फ़ कुछ सेकंड की रिकॉर्डिंग से बनाई गई है।",
88
+ "seconds": 3.68,
89
+ "retries": 0
90
+ },
91
+ {
92
+ "file": "samples/te_clone.wav",
93
+ "lang": "te",
94
+ "clone_reference": "samples/te_clone_reference.wav",
95
+ "text": "ఈ గొంతు కేవలం కొన్ని సెకన్ల రికార్డింగ్ నుండి తయారైంది.",
96
+ "seconds": 3.52,
97
+ "retries": 0
98
+ },
99
+ {
100
+ "file": "samples/en_clone.wav",
101
+ "lang": "en",
102
+ "clone_reference": "samples/en_clone_reference.wav",
103
+ "text": "This voice was copied from a few seconds of recorded speech.",
104
+ "seconds": 3.84,
105
+ "retries": 0
106
+ }
107
+ ]
samples/te_clone.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:464b7b4273233283450bf970b639c3dca5f6ef4282daa75b8aa1fb7f1bc465f4
3
+ size 169004
samples/te_clone_reference.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d26664788f03a34e39c3512515fc218dd2783046fe022b0f1c350774b3665de0
3
+ size 297644