QbethQ commited on
Commit
8ab4c6c
·
verified ·
1 Parent(s): 302b885

Upload folder using huggingface_hub

Browse files
LICENSE ADDED
@@ -0,0 +1,451 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Tencent is pleased to support the open source community by making StableToken available.
2
+
3
+ Copyright (C) 2026 Tencent. All rights reserved.
4
+
5
+ The open-source software and/or models included in this distribution may have been modified by Tencent (“Tencent Modifications”). All Tencent Modifications are Copyright (C) Tencent.
6
+
7
+ StableToken is licensed under the License Terms of StableToken, except for the third-party components listed below, which remain licensed under their respective original terms. StableToken does not impose any additional restrictions beyond those specified in the original licenses of these third-party components. Users are required to comply with all applicable terms and conditions of the original licenses and to ensure that the use of these third-party components conforms to all relevant laws and regulations.
8
+
9
+ For the avoidance of doubt, StableToken refers solely to inference code, parameters, and weights made publicly available by Tencent in accordance with the License Terms of StableToken.
10
+
11
+ Terms of the License Terms of StableToken:
12
+ --------------------------------------------------------------------
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
14
+
15
+ 1. StableToken IS NOT INTENDED FOR USE WITHIN THE EUROPEAN UNION.
16
+
17
+ 2. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+
21
+
22
+
23
+ Dependencies and Licenses:
24
+
25
+ This open-source project, StableToken, builds upon the following open-source models and/or software components, each of which remains licensed under its original license. Certain models or software may include modifications made by Tencent (“Tencent Modifications”), which are Copyright (C) Tencent.
26
+
27
+ In case you believe there have been errors in the attribution below, you may submit the concerns to us for review and correction.
28
+
29
+
30
+ Open Source Model Licensed under the Apache-2.0:
31
+ --------------------------------------------------------------------
32
+ 1. whisper
33
+ Copyright (c) openai/whisper-large-v3 original author and authors
34
+ Please note this model has been modified by Tencent in this distribution.
35
+
36
+
37
+
38
+ Terms of the Apache-2.0:
39
+ --------------------------------------------------------------------
40
+ Apache License
41
+ Version 2.0, January 2004
42
+ http://www.apache.org/licenses/
43
+
44
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
45
+
46
+ 1. Definitions.
47
+
48
+ "License" shall mean the terms and conditions for use, reproduction,
49
+ and distribution as defined by Sections 1 through 9 of this document.
50
+
51
+ "Licensor" shall mean the copyright owner or entity authorized by
52
+ the copyright owner that is granting the License.
53
+
54
+ "Legal Entity" shall mean the union of the acting entity and all
55
+ other entities that control, are controlled by, or are under common
56
+ control with that entity. For the purposes of this definition,
57
+ "control" means (i) the power, direct or indirect, to cause the
58
+ direction or management of such entity, whether by contract or
59
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
60
+ outstanding shares, or (iii) beneficial ownership of such entity.
61
+
62
+ "You" (or "Your") shall mean an individual or Legal Entity
63
+ exercising permissions granted by this License.
64
+
65
+ "Source" form shall mean the preferred form for making modifications,
66
+ including but not limited to software source code, documentation
67
+ source, and configuration files.
68
+
69
+ "Object" form shall mean any form resulting from mechanical
70
+ transformation or translation of a Source form, including but
71
+ not limited to compiled object code, generated documentation,
72
+ and conversions to other media types.
73
+
74
+ "Work" shall mean the work of authorship, whether in Source or
75
+ Object form, made available under the License, as indicated by a
76
+ copyright notice that is included in or attached to the work
77
+ (an example is provided in the Appendix below).
78
+
79
+ "Derivative Works" shall mean any work, whether in Source or Object
80
+ form, that is based on (or derived from) the Work and for which the
81
+ editorial revisions, annotations, elaborations, or other modifications
82
+ represent, as a whole, an original work of authorship. For the purposes
83
+ of this License, Derivative Works shall not include works that remain
84
+ separable from, or merely link (or bind by name) to the interfaces of,
85
+ the Work and Derivative Works thereof.
86
+
87
+ "Contribution" shall mean any work of authorship, including
88
+ the original version of the Work and any modifications or additions
89
+ to that Work or Derivative Works thereof, that is intentionally
90
+ submitted to Licensor for inclusion in the Work by the copyright owner
91
+ or by an individual or Legal Entity authorized to submit on behalf of
92
+ the copyright owner. For the purposes of this definition, "submitted"
93
+ means any form of electronic, verbal, or written communication sent
94
+ to the Licensor or its representatives, including but not limited to
95
+ communication on electronic mailing lists, source code control systems,
96
+ and issue tracking systems that are managed by, or on behalf of, the
97
+ Licensor for the purpose of discussing and improving the Work, but
98
+ excluding communication that is conspicuously marked or otherwise
99
+ designated in writing by the copyright owner as "Not a Contribution."
100
+
101
+ "Contributor" shall mean Licensor and any individual or Legal Entity
102
+ on behalf of whom a Contribution has been received by Licensor and
103
+ subsequently incorporated within the Work.
104
+
105
+ 2. Grant of Copyright License. Subject to the terms and conditions of
106
+ this License, each Contributor hereby grants to You a perpetual,
107
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
108
+ copyright license to reproduce, prepare Derivative Works of,
109
+ publicly display, publicly perform, sublicense, and distribute the
110
+ Work and such Derivative Works in Source or Object form.
111
+
112
+ 3. Grant of Patent License. Subject to the terms and conditions of
113
+ this License, each Contributor hereby grants to You a perpetual,
114
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
115
+ (except as stated in this section) patent license to make, have made,
116
+ use, offer to sell, sell, import, and otherwise transfer the Work,
117
+ where such license applies only to those patent claims licensable
118
+ by such Contributor that are necessarily infringed by their
119
+ Contribution(s) alone or by combination of their Contribution(s)
120
+ with the Work to which such Contribution(s) was submitted. If You
121
+ institute patent litigation against any entity (including a
122
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
123
+ or a Contribution incorporated within the Work constitutes direct
124
+ or contributory patent infringement, then any patent licenses
125
+ granted to You under this License for that Work shall terminate
126
+ as of the date such litigation is filed.
127
+
128
+ 4. Redistribution. You may reproduce and distribute copies of the
129
+ Work or Derivative Works thereof in any medium, with or without
130
+ modifications, and in Source or Object form, provided that You
131
+ meet the following conditions:
132
+
133
+ (a) You must give any other recipients of the Work or
134
+ Derivative Works a copy of this License; and
135
+
136
+ (b) You must cause any modified files to carry prominent notices
137
+ stating that You changed the files; and
138
+
139
+ (c) You must retain, in the Source form of any Derivative Works
140
+ that You distribute, all copyright, patent, trademark, and
141
+ attribution notices from the Source form of the Work,
142
+ excluding those notices that do not pertain to any part of
143
+ the Derivative Works; and
144
+
145
+ (d) If the Work includes a "NOTICE" text file as part of its
146
+ distribution, then any Derivative Works that You distribute must
147
+ include a readable copy of the attribution notices contained
148
+ within such NOTICE file, excluding those notices that do not
149
+ pertain to any part of the Derivative Works, in at least one
150
+ of the following places: within a NOTICE text file distributed
151
+ as part of the Derivative Works; within the Source form or
152
+ documentation, if provided along with the Derivative Works; or,
153
+ within a display generated by the Derivative Works, if and
154
+ wherever such third-party notices normally appear. The contents
155
+ of the NOTICE file are for informational purposes only and
156
+ do not modify the License. You may add Your own attribution
157
+ notices within Derivative Works that You distribute, alongside
158
+ or as an addendum to the NOTICE text from the Work, provided
159
+ that such additional attribution notices cannot be construed
160
+ as modifying the License.
161
+
162
+ You may add Your own copyright statement to Your modifications and
163
+ may provide additional or different license terms and conditions
164
+ for use, reproduction, or distribution of Your modifications, or
165
+ for any such Derivative Works as a whole, provided Your use,
166
+ reproduction, and distribution of the Work otherwise complies with
167
+ the conditions stated in this License.
168
+
169
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
170
+ any Contribution intentionally submitted for inclusion in the Work
171
+ by You to the Licensor shall be under the terms and conditions of
172
+ this License, without any additional terms or conditions.
173
+ Notwithstanding the above, nothing herein shall supersede or modify
174
+ the terms of any separate license agreement you may have executed
175
+ with Licensor regarding such Contributions.
176
+
177
+ 6. Trademarks. This License does not grant permission to use the trade
178
+ names, trademarks, service marks, or product names of the Licensor,
179
+ except as required for reasonable and customary use in describing the
180
+ origin of the Work and reproducing the content of the NOTICE file.
181
+
182
+ 7. Disclaimer of Warranty. Unless required by applicable law or
183
+ agreed to in writing, Licensor provides the Work (and each
184
+ Contributor provides its Contributions) on an "AS IS" BASIS,
185
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
186
+ implied, including, without limitation, any warranties or conditions
187
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
188
+ PARTICULAR PURPOSE. You are solely responsible for determining the
189
+ appropriateness of using or redistributing the Work and assume any
190
+ risks associated with Your exercise of permissions under this License.
191
+
192
+ 8. Limitation of Liability. In no event and under no legal theory,
193
+ whether in tort (including negligence), contract, or otherwise,
194
+ unless required by applicable law (such as deliberate and grossly
195
+ negligent acts) or agreed to in writing, shall any Contributor be
196
+ liable to You for damages, including any direct, indirect, special,
197
+ incidental, or consequential damages of any character arising as a
198
+ result of this License or out of the use or inability to use the
199
+ Work (including but not limited to damages for loss of goodwill,
200
+ work stoppage, computer failure or malfunction, or any and all
201
+ other commercial damages or losses), even if such Contributor
202
+ has been advised of the possibility of such damages.
203
+
204
+ 9. Accepting Warranty or Additional Liability. While redistributing
205
+ the Work or Derivative Works thereof, You may choose to offer,
206
+ and charge a fee for, acceptance of support, warranty, indemnity,
207
+ or other liability obligations and/or rights consistent with this
208
+ License. However, in accepting such obligations, You may act only
209
+ on Your own behalf and on Your sole responsibility, not on behalf
210
+ of any other Contributor, and only if You agree to indemnify,
211
+ defend, and hold each Contributor harmless for any liability
212
+ incurred by, or claims asserted against, such Contributor by reason
213
+ of your accepting any such warranty or additional liability.
214
+
215
+ END OF TERMS AND CONDITIONS
216
+
217
+ APPENDIX: How to apply the Apache License to your work.
218
+
219
+ To apply the Apache License to your work, attach the following
220
+ boilerplate notice, with the fields enclosed by brackets "[]"
221
+ replaced with your own identifying information. (Don't include
222
+ the brackets!) The text should be enclosed in the appropriate
223
+ comment syntax for the file format. We also recommend that a
224
+ file or class name and description of purpose be included on the
225
+ same "printed page" as the copyright notice for easier
226
+ identification within third-party archives.
227
+
228
+ Copyright [yyyy] [name of copyright owner]
229
+
230
+ Licensed under the Apache License, Version 2.0 (the "License");
231
+ you may not use this file except in compliance with the License.
232
+ You may obtain a copy of the License at
233
+
234
+ http://www.apache.org/licenses/LICENSE-2.0
235
+
236
+ Unless required by applicable law or agreed to in writing, software
237
+ distributed under the License is distributed on an "AS IS" BASIS,
238
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239
+ See the License for the specific language governing permissions and
240
+ limitations under the License.
241
+
242
+ Open Source Software Licensed under the Apache-2.0:
243
+ --------------------------------------------------------------------
244
+ 1. Code of GLM-4-Voice
245
+ Copyright 2024 GLM-4-Voice Model Team @ Zhipu AI
246
+ Please note this software has been modified by Tencent in this distribution.
247
+
248
+ Terms of the Apache-2.0:
249
+ --------------------------------------------------------------------
250
+
251
+ Apache License
252
+ Version 2.0, January 2004
253
+ http://www.apache.org/licenses/
254
+
255
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
256
+
257
+ 1. Definitions.
258
+
259
+ "License" shall mean the terms and conditions for use, reproduction,
260
+ and distribution as defined by Sections 1 through 9 of this document.
261
+
262
+ "Licensor" shall mean the copyright owner or entity authorized by
263
+ the copyright owner that is granting the License.
264
+
265
+ "Legal Entity" shall mean the union of the acting entity and all
266
+ other entities that control, are controlled by, or are under common
267
+ control with that entity. For the purposes of this definition,
268
+ "control" means (i) the power, direct or indirect, to cause the
269
+ direction or management of such entity, whether by contract or
270
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
271
+ outstanding shares, or (iii) beneficial ownership of such entity.
272
+
273
+ "You" (or "Your") shall mean an individual or Legal Entity
274
+ exercising permissions granted by this License.
275
+
276
+ "Source" form shall mean the preferred form for making modifications,
277
+ including but not limited to software source code, documentation
278
+ source, and configuration files.
279
+
280
+ "Object" form shall mean any form resulting from mechanical
281
+ transformation or translation of a Source form, including but
282
+ not limited to compiled object code, generated documentation,
283
+ and conversions to other media types.
284
+
285
+ "Work" shall mean the work of authorship, whether in Source or
286
+ Object form, made available under the License, as indicated by a
287
+ copyright notice that is included in or attached to the work
288
+ (an example is provided in the Appendix below).
289
+
290
+ "Derivative Works" shall mean any work, whether in Source or Object
291
+ form, that is based on (or derived from) the Work and for which the
292
+ editorial revisions, annotations, elaborations, or other modifications
293
+ represent, as a whole, an original work of authorship. For the purposes
294
+ of this License, Derivative Works shall not include works that remain
295
+ separable from, or merely link (or bind by name) to the interfaces of,
296
+ the Work and Derivative Works thereof.
297
+
298
+ "Contribution" shall mean any work of authorship, including
299
+ the original version of the Work and any modifications or additions
300
+ to that Work or Derivative Works thereof, that is intentionally
301
+ submitted to Licensor for inclusion in the Work by the copyright owner
302
+ or by an individual or Legal Entity authorized to submit on behalf of
303
+ the copyright owner. For the purposes of this definition, "submitted"
304
+ means any form of electronic, verbal, or written communication sent
305
+ to the Licensor or its representatives, including but not limited to
306
+ communication on electronic mailing lists, source code control systems,
307
+ and issue tracking systems that are managed by, or on behalf of, the
308
+ Licensor for the purpose of discussing and improving the Work, but
309
+ excluding communication that is conspicuously marked or otherwise
310
+ designated in writing by the copyright owner as "Not a Contribution."
311
+
312
+ "Contributor" shall mean Licensor and any individual or Legal Entity
313
+ on behalf of whom a Contribution has been received by Licensor and
314
+ subsequently incorporated within the Work.
315
+
316
+ 2. Grant of Copyright License. Subject to the terms and conditions of
317
+ this License, each Contributor hereby grants to You a perpetual,
318
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
319
+ copyright license to reproduce, prepare Derivative Works of,
320
+ publicly display, publicly perform, sublicense, and distribute the
321
+ Work and such Derivative Works in Source or Object form.
322
+
323
+ 3. Grant of Patent License. Subject to the terms and conditions of
324
+ this License, each Contributor hereby grants to You a perpetual,
325
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
326
+ (except as stated in this section) patent license to make, have made,
327
+ use, offer to sell, sell, import, and otherwise transfer the Work,
328
+ where such license applies only to those patent claims licensable
329
+ by such Contributor that are necessarily infringed by their
330
+ Contribution(s) alone or by combination of their Contribution(s)
331
+ with the Work to which such Contribution(s) was submitted. If You
332
+ institute patent litigation against any entity (including a
333
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
334
+ or a Contribution incorporated within the Work constitutes direct
335
+ or contributory patent infringement, then any patent licenses
336
+ granted to You under this License for that Work shall terminate
337
+ as of the date such litigation is filed.
338
+
339
+ 4. Redistribution. You may reproduce and distribute copies of the
340
+ Work or Derivative Works thereof in any medium, with or without
341
+ modifications, and in Source or Object form, provided that You
342
+ meet the following conditions:
343
+
344
+ (a) You must give any other recipients of the Work or
345
+ Derivative Works a copy of this License; and
346
+
347
+ (b) You must cause any modified files to carry prominent notices
348
+ stating that You changed the files; and
349
+
350
+ (c) You must retain, in the Source form of any Derivative Works
351
+ that You distribute, all copyright, patent, trademark, and
352
+ attribution notices from the Source form of the Work,
353
+ excluding those notices that do not pertain to any part of
354
+ the Derivative Works; and
355
+
356
+ (d) If the Work includes a "NOTICE" text file as part of its
357
+ distribution, then any Derivative Works that You distribute must
358
+ include a readable copy of the attribution notices contained
359
+ within such NOTICE file, excluding those notices that do not
360
+ pertain to any part of the Derivative Works, in at least one
361
+ of the following places: within a NOTICE text file distributed
362
+ as part of the Derivative Works; within the Source form or
363
+ documentation, if provided along with the Derivative Works; or,
364
+ within a display generated by the Derivative Works, if and
365
+ wherever such third-party notices normally appear. The contents
366
+ of the NOTICE file are for informational purposes only and
367
+ do not modify the License. You may add Your own attribution
368
+ notices within Derivative Works that You distribute, alongside
369
+ or as an addendum to the NOTICE text from the Work, provided
370
+ that such additional attribution notices cannot be construed
371
+ as modifying the License.
372
+
373
+ You may add Your own copyright statement to Your modifications and
374
+ may provide additional or different license terms and conditions
375
+ for use, reproduction, or distribution of Your modifications, or
376
+ for any such Derivative Works as a whole, provided Your use,
377
+ reproduction, and distribution of the Work otherwise complies with
378
+ the conditions stated in this License.
379
+
380
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
381
+ any Contribution intentionally submitted for inclusion in the Work
382
+ by You to the Licensor shall be under the terms and conditions of
383
+ this License, without any additional terms or conditions.
384
+ Notwithstanding the above, nothing herein shall supersede or modify
385
+ the terms of any separate license agreement you may have executed
386
+ with Licensor regarding such Contributions.
387
+
388
+ 6. Trademarks. This License does not grant permission to use the trade
389
+ names, trademarks, service marks, or product names of the Licensor,
390
+ except as required for reasonable and customary use in describing the
391
+ origin of the Work and reproducing the content of the NOTICE file.
392
+
393
+ 7. Disclaimer of Warranty. Unless required by applicable law or
394
+ agreed to in writing, Licensor provides the Work (and each
395
+ Contributor provides its Contributions) on an "AS IS" BASIS,
396
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
397
+ implied, including, without limitation, any warranties or conditions
398
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
399
+ PARTICULAR PURPOSE. You are solely responsible for determining the
400
+ appropriateness of using or redistributing the Work and assume any
401
+ risks associated with Your exercise of permissions under this License.
402
+
403
+ 8. Limitation of Liability. In no event and under no legal theory,
404
+ whether in tort (including negligence), contract, or otherwise,
405
+ unless required by applicable law (such as deliberate and grossly
406
+ negligent acts) or agreed to in writing, shall any Contributor be
407
+ liable to You for damages, including any direct, indirect, special,
408
+ incidental, or consequential damages of any character arising as a
409
+ result of this License or out of the use or inability to use the
410
+ Work (including but not limited to damages for loss of goodwill,
411
+ work stoppage, computer failure or malfunction, or any and all
412
+ other commercial damages or losses), even if such Contributor
413
+ has been advised of the possibility of such damages.
414
+
415
+ 9. Accepting Warranty or Additional Liability. While redistributing
416
+ the Work or Derivative Works thereof, You may choose to offer,
417
+ and charge a fee for, acceptance of support, warranty, indemnity,
418
+ or other liability obligations and/or rights consistent with this
419
+ License. However, in accepting such obligations, You may act only
420
+ on Your own behalf and on Your sole responsibility, not on behalf
421
+ of any other Contributor, and only if You agree to indemnify,
422
+ defend, and hold each Contributor harmless for any liability
423
+ incurred by, or claims asserted against, such Contributor by reason
424
+ of your accepting any such warranty or additional liability.
425
+
426
+ END OF TERMS AND CONDITIONS
427
+
428
+ APPENDIX: How to apply the Apache License to your work.
429
+
430
+ To apply the Apache License to your work, attach the following
431
+ boilerplate notice, with the fields enclosed by brackets "[]"
432
+ replaced with your own identifying information. (Don't include
433
+ the brackets!) The text should be enclosed in the appropriate
434
+ comment syntax for the file format. We also recommend that a
435
+ file or class name and description of purpose be included on the
436
+ same "printed page" as the copyright notice for easier
437
+ identification within third-party archives.
438
+
439
+ Copyright 2024 GLM-4-Voice Model Team @ Zhipu AI
440
+
441
+ Licensed under the Apache License, Version 2.0 (the "License");
442
+ you may not use this file except in compliance with the License.
443
+ You may obtain a copy of the License at
444
+
445
+ http://www.apache.org/licenses/LICENSE-2.0
446
+
447
+ Unless required by applicable law or agreed to in writing, software
448
+ distributed under the License is distributed on an "AS IS" BASIS,
449
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
450
+ See the License for the specific language governing permissions and
451
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: license-term-of-stabletoken
4
+ language:
5
+ - en
6
+ - zh
7
+ tags:
8
+ - speech tokenizer
9
+ ---
10
+ # StableToken (ICLR 2026)
11
+
12
+ **StableToken** is a noise-robust semantic speech tokenizer that performs discrete speech representation learning, achieving state-of-the-art stability in noisy environments.
13
+
14
+ 📄 [Paper](https://arxiv.org/abs/2509.22220) | 💻 [GitHub](https://github.com/Tencent/StableToken)
15
+
16
+ For code and more detailed information, please refer to the corresponding [GitHub repository](https://github.com/Tencent/StableToken).
17
+
18
+ ## Model Details
19
+
20
+ | Attribute | Value |
21
+ |:----------|:------|
22
+ | Frame Rate | 25 Hz |
23
+ | Codebook Size | 8,192 |
24
+ | BPS (Bits Per Second) | 325 |
25
+
26
+ ## Quick Start
27
+
28
+ To use StableToken, please clone the official repository and install dependencies.
29
+
30
+ ### Installation
31
+
32
+ ```bash
33
+ git clone --recursive https://github.com/Tencent/StableToken.git
34
+ cd StableToken && pip install -r requirements.txt
35
+ ```
36
+
37
+ ### Inference
38
+
39
+ ```python
40
+ import os
41
+ from huggingface_hub import snapshot_download
42
+ from transformers import WhisperFeatureExtractor
43
+ from src.model.modeling_whisper import WhisperLFQEncoder
44
+ from src.utils.flow_inference import AudioDecoder
45
+ from src.utils.utils import extract_speech_token, speech_token_to_wav
46
+
47
+ # 1. Download & Load Models
48
+ model_dir = snapshot_download("tencent/StableToken")
49
+
50
+ # Load Tokenizer
51
+ tokenizer = WhisperLFQEncoder.from_pretrained(os.path.join(model_dir, "tokenizer")).eval().cuda()
52
+ feature_extractor = WhisperFeatureExtractor.from_pretrained(os.path.join(model_dir, "tokenizer"))
53
+
54
+ # Load Decoder
55
+ decoder = AudioDecoder(
56
+ config_path=os.path.join(model_dir, "decoder", "config.yaml"),
57
+ flow_ckpt_path=os.path.join(model_dir, "decoder", "flow.pt"),
58
+ hift_ckpt_path=os.path.join(model_dir, "decoder", "hift.pt"),
59
+ device="cuda"
60
+ )
61
+
62
+ # 2. Tokenize
63
+ tokens = extract_speech_token(tokenizer, feature_extractor, ["/path/to/audio.wav"], device="cuda")[0]
64
+
65
+ # 3. Reconstruct
66
+ tts_speech, sampling_rate = speech_token_to_wav(decoder, tokens)
67
+ ```
68
+
69
+ ## Performance
70
+
71
+ StableToken achieves **60% lower UED** (Unit Edit Distance) than best existing supervised semantic tokenizers.
72
+
73
+ ### Noise Robustness (UED ↓)
74
+
75
+ | Model | Frame Rate | Codebook Size | UED (%, ↓) |
76
+ |:---|:---:|:---:|:---:|
77
+ | [GLM-4-Voice](https://github.com/zai-org/GLM-4-Voice) | 12.5Hz | 16,384 | 31.10 |
78
+ | [$\mathcal{S}^3$ Tokenizer](https://github.com/FunAudioLLM/CosyVoice) | 25Hz | 4,096 | 26.17 |
79
+ | [CosyVoice2](https://github.com/FunAudioLLM/CosyVoice) | 25Hz | 6,561 | 38.66 |
80
+ | **StableToken** | 25Hz | 8,192 | **10.17** 🏆 |
81
+
82
+ ### Reconstruction Quality
83
+
84
+ Measurements on LibriSpeech (LS) and SEED benchmarks.
85
+
86
+ | Benchmark | WER (↓) | MOS (↑) |
87
+ |:----------|:-------:|:-------:|
88
+ | LibriSpeech Clean | **3.84** | **4.09** |
89
+ | LibriSpeech Other | **7.99** | 3.83 |
90
+ | SEED-En | **3.44** | 4.01 |
91
+ | SEED-Zh | **2.62** | **4.18** |
92
+
93
+ ## Citation
94
+
95
+ ```bibtex
96
+ @article{song2025stabletoken,
97
+ title={StableToken: A Noise-Robust Semantic Speech Tokenizer for Resilient SpeechLLMs},
98
+ author={Song, Yuhan and Zhang, Linhao and Wu, Chuhan and Liu, Aiwei and Jia, Wei and Wang, Houfeng and Zhou, Xiao},
99
+ journal={arXiv preprint arXiv:2509.22220},
100
+ year={2025}
101
+ }
102
+ ```
103
+
104
+ ## License
105
+
106
+ This project is licensed under the [License Term of StableToken](LICENSE).
decoder/config.yaml ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # set random seed, so that you may reproduce your result.
2
+ __set_seed1: !apply:random.seed [1986]
3
+ __set_seed2: !apply:numpy.random.seed [1986]
4
+ __set_seed3: !apply:torch.manual_seed [1986]
5
+ __set_seed4: !apply:torch.cuda.manual_seed_all [1986]
6
+
7
+ # fixed params
8
+ sample_rate: 22050
9
+ text_encoder_input_size: 512
10
+ llm_input_size: 1024
11
+ llm_output_size: 1024
12
+ spk_embed_dim: 192
13
+
14
+ # model params
15
+ # for all class/function included in this repo, we use !<name> or !<new> for intialization, so that user may find all corresponding class/function according to one single yaml.
16
+ # for system/third_party class/function, we do not require this.
17
+ llm: !new:cosyvoice.llm.llm.TransformerLM
18
+ text_encoder_input_size: !ref <text_encoder_input_size>
19
+ llm_input_size: !ref <llm_input_size>
20
+ llm_output_size: !ref <llm_output_size>
21
+ text_token_size: 51866
22
+ speech_token_size: 4096
23
+ length_normalized_loss: True
24
+ lsm_weight: 0
25
+ spk_embed_dim: !ref <spk_embed_dim>
26
+ text_encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder
27
+ input_size: !ref <text_encoder_input_size>
28
+ output_size: 1024
29
+ attention_heads: 8
30
+ linear_units: 2048
31
+ num_blocks: 3
32
+ dropout_rate: 0.1
33
+ positional_dropout_rate: 0.1
34
+ attention_dropout_rate: 0
35
+ normalize_before: True
36
+ input_layer: 'linear'
37
+ pos_enc_layer_type: 'rel_pos_espnet'
38
+ selfattention_layer_type: 'rel_selfattn'
39
+ use_cnn_module: False
40
+ macaron_style: False
41
+ use_dynamic_chunk: False
42
+ use_dynamic_left_chunk: False
43
+ static_chunk_size: 1
44
+ llm: !new:cosyvoice.transformer.encoder.TransformerEncoder
45
+ input_size: !ref <llm_input_size>
46
+ output_size: !ref <llm_output_size>
47
+ attention_heads: 8
48
+ linear_units: 2048
49
+ num_blocks: 7
50
+ dropout_rate: 0.1
51
+ positional_dropout_rate: 0.1
52
+ attention_dropout_rate: 0
53
+ input_layer: 'linear_legacy'
54
+ pos_enc_layer_type: 'rel_pos_espnet'
55
+ selfattention_layer_type: 'rel_selfattn'
56
+ static_chunk_size: 1
57
+
58
+ flow: !new:cosyvoice.flow.flow.MaskedDiffWithXvec
59
+ input_size: 512
60
+ output_size: 80
61
+ spk_embed_dim: !ref <spk_embed_dim>
62
+ output_type: 'mel'
63
+ vocab_size: 8192
64
+ input_frame_rate: 25
65
+ only_mask_loss: True
66
+ encoder: !new:cosyvoice.transformer.encoder.BlockConformerEncoder
67
+ output_size: 512
68
+ attention_heads: 8
69
+ linear_units: 2048
70
+ num_blocks: 6
71
+ dropout_rate: 0.1
72
+ positional_dropout_rate: 0.1
73
+ attention_dropout_rate: 0.1
74
+ normalize_before: True
75
+ input_layer: 'linear'
76
+ pos_enc_layer_type: 'rel_pos_espnet'
77
+ selfattention_layer_type: 'block_rel_selfattn'
78
+ block_size: 10
79
+ input_size: 512
80
+ use_cnn_module: False
81
+ macaron_style: False
82
+ length_regulator: !new:cosyvoice.flow.length_regulator.InterpolateRegulator
83
+ channels: 80
84
+ sampling_ratios: [1, 1, 1, 1]
85
+ decoder: !new:cosyvoice.flow.flow_matching.ConditionalCFM
86
+ in_channels: 240
87
+ n_spks: 1
88
+ spk_emb_dim: 80
89
+ cfm_params: !new:omegaconf.DictConfig
90
+ content:
91
+ sigma_min: 1e-06
92
+ solver: 'euler'
93
+ t_scheduler: 'cosine'
94
+ training_cfg_rate: 0.2
95
+ inference_cfg_rate: 0.7
96
+ reg_loss_type: 'l1'
97
+ estimator: !new:cosyvoice.flow.decoder.ConditionalDecoder
98
+ in_channels: 320
99
+ out_channels: 80
100
+ channels: [256, 256]
101
+ dropout: 0
102
+ attention_head_dim: 64
103
+ n_blocks: 4
104
+ num_mid_blocks: 12
105
+ num_heads: 8
106
+ act_fn: 'gelu'
107
+
108
+ hift: !new:cosyvoice.hifigan.generator.HiFTGenerator
109
+ in_channels: 80
110
+ base_channels: 512
111
+ nb_harmonics: 8
112
+ sampling_rate: !ref <sample_rate>
113
+ nsf_alpha: 0.1
114
+ nsf_sigma: 0.003
115
+ nsf_voiced_threshold: 10
116
+ upsample_rates: [8, 8]
117
+ upsample_kernel_sizes: [16, 16]
118
+ istft_params:
119
+ n_fft: 16
120
+ hop_len: 4
121
+ resblock_kernel_sizes: [3, 7, 11]
122
+ resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5], [1, 3, 5]]
123
+ source_resblock_kernel_sizes: [7, 11]
124
+ source_resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5]]
125
+ lrelu_slope: 0.1
126
+ audio_limit: 0.99
127
+ f0_predictor: !new:cosyvoice.hifigan.f0_predictor.ConvRNNF0Predictor
128
+ num_class: 1
129
+ in_channels: 80
130
+ cond_channels: 512
decoder/flow.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28655ded7fce95b338ad22b7967ebc28fdb6a13ff4c42a4032dbfff6c9c12187
3
+ size 428400959
decoder/hift.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65244bb40ea281173069672868e8f8ce60dfa2e1804661770b3de4b971ea1a63
3
+ size 81897015
tokenizer/config.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "openai/whisper-large-v3",
3
+ "activation_dropout": 0.0,
4
+ "activation_function": "gelu",
5
+ "apply_spec_augment": false,
6
+ "architectures": [
7
+ "WhisperLFQEncoder"
8
+ ],
9
+ "attention_dropout": 0.0,
10
+ "batch_maximization_weight": 0.3,
11
+ "classifier_proj_size": 256,
12
+ "d_model": 1280,
13
+ "delta_cross_logdet_reg_loss": 1.0,
14
+ "dropout": 0.0,
15
+ "enable_noise_contrastive": false,
16
+ "encoder_attention_heads": 20,
17
+ "encoder_causal_attention": false,
18
+ "encoder_causal_convolution": false,
19
+ "encoder_ffn_dim": 5120,
20
+ "encoder_layerdrop": 0.0,
21
+ "encoder_layers": 32,
22
+ "fix_noise_commit_loss_ratio": false,
23
+ "init_std": 0.06,
24
+ "is_encoder_decoder": true,
25
+ "lambda_consensus_loss_ratio": 0.25,
26
+ "layernorm_after_quantize": true,
27
+ "mask_feature_length": 10,
28
+ "mask_feature_min_masks": 0,
29
+ "mask_feature_prob": 0.0,
30
+ "mask_time_length": 10,
31
+ "mask_time_min_masks": 2,
32
+ "mask_time_prob": 0.05,
33
+ "max_length": 448,
34
+ "max_source_positions": 1500,
35
+ "max_target_positions": 448,
36
+ "median_filter_width": 7,
37
+ "model_type": "whisper",
38
+ "noise_commit_loss_ratio": 0.3333333333333333,
39
+ "num_clean_input": 3,
40
+ "num_hidden_layers": 32,
41
+ "num_mel_bins": 128,
42
+ "num_voters": 5,
43
+ "pooling_kernel_size": 2,
44
+ "pooling_position": 16,
45
+ "pooling_type": "avg",
46
+ "quantize_commit_coefficient": 0.25,
47
+ "quantize_encoder_only": true,
48
+ "quantize_position": 16,
49
+ "quantize_vocab_size": 8192,
50
+ "sample_minimization_weight": 0.1,
51
+ "torch_dtype": "float32",
52
+ "transformers_version": "4.48.0",
53
+ "use_aggregated_entropy": true,
54
+ "use_cache": true,
55
+ "use_codebook_ce_loss": true,
56
+ "use_commit_loss": true,
57
+ "use_projection_bias": false,
58
+ "use_svlfq": true,
59
+ "use_weighted_layer_sum": false
60
+ }
tokenizer/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcca441a2c8d8b3432eafc9727655550e8e1710570d836e465fe2d81be318d58
3
+ size 1296837992
tokenizer/preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "chunk_length": 30,
3
+ "feature_extractor_type": "WhisperFeatureExtractor",
4
+ "feature_size": 128,
5
+ "hop_length": 160,
6
+ "n_fft": 400,
7
+ "n_samples": 480000,
8
+ "nb_max_frames": 3000,
9
+ "padding_side": "right",
10
+ "padding_value": 0.0,
11
+ "processor_class": "WhisperProcessor",
12
+ "return_attention_mask": false,
13
+ "sampling_rate": 16000
14
+ }