Upload folder using huggingface_hub
Browse filesFiles changed (8)
- LICENSEAdded+451
- README.mdAdded+106
- decoder/config.yamlAdded+130
- decoder/flow.ptAdded+3
- decoder/hift.ptAdded+3
- tokenizer/config.jsonAdded+60
- tokenizer/model.safetensorsAdded+3
- tokenizer/preprocessor_config.jsonAdded+14
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451Tencent is pleased to support the open source community by making StableToken available.
Copyright (C) 2026 Tencent. All rights reserved.
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.
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.
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.
Terms of the License Terms of StableToken:--------------------------------------------------------------------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:
1. StableToken IS NOT INTENDED FOR USE WITHIN THE EUROPEAN UNION.
2. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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.
Dependencies and Licenses:
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.
In case you believe there have been errors in the attribution below, you may submit the concerns to us for review and correction.
Open Source Model Licensed under the Apache-2.0:--------------------------------------------------------------------1. whisperCopyright (c) openai/whisper-large-v3 original author and authorsPlease note this model has been modified by Tencent in this distribution.
Terms of the Apache-2.0:--------------------------------------------------------------------Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Open Source Software Licensed under the Apache-2.0:--------------------------------------------------------------------1. Code of GLM-4-VoiceCopyright 2024 GLM-4-Voice Model Team @ Zhipu AIPlease note this software has been modified by Tencent in this distribution.
Terms of the Apache-2.0:--------------------------------------------------------------------
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright 2024 GLM-4-Voice Model Team @ Zhipu AI
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106---license: otherlicense_name: license-term-of-stabletokenlanguage:- en- zhtags:- speech tokenizer---# StableToken (ICLR 2026)
**StableToken** is a noise-robust semantic speech tokenizer that performs discrete speech representation learning, achieving state-of-the-art stability in noisy environments.
📄 [Paper](https://arxiv.org/abs/2509.22220) | 💻 [GitHub](https://github.com/Tencent/StableToken)
For code and more detailed information, please refer to the corresponding [GitHub repository](https://github.com/Tencent/StableToken).
## Model Details
| Attribute | Value ||:----------|:------|| Frame Rate | 25 Hz || Codebook Size | 8,192 || BPS (Bits Per Second) | 325 |
## Quick Start
To use StableToken, please clone the official repository and install dependencies.
### Installation
```bashgit clone --recursive https://github.com/Tencent/StableToken.gitcd StableToken && pip install -r requirements.txt```
### Inference
```pythonimport osfrom huggingface_hub import snapshot_downloadfrom transformers import WhisperFeatureExtractorfrom src.model.modeling_whisper import WhisperLFQEncoderfrom src.utils.flow_inference import AudioDecoderfrom src.utils.utils import extract_speech_token, speech_token_to_wav
# 1. Download & Load Modelsmodel_dir = snapshot_download("tencent/StableToken")
# Load Tokenizertokenizer = WhisperLFQEncoder.from_pretrained(os.path.join(model_dir, "tokenizer")).eval().cuda()feature_extractor = WhisperFeatureExtractor.from_pretrained(os.path.join(model_dir, "tokenizer"))
# Load Decoderdecoder = AudioDecoder( config_path=os.path.join(model_dir, "decoder", "config.yaml"), flow_ckpt_path=os.path.join(model_dir, "decoder", "flow.pt"), hift_ckpt_path=os.path.join(model_dir, "decoder", "hift.pt"), device="cuda")
# 2. Tokenizetokens = extract_speech_token(tokenizer, feature_extractor, ["/path/to/audio.wav"], device="cuda")[0]
# 3. Reconstructtts_speech, sampling_rate = speech_token_to_wav(decoder, tokens)```
## Performance
StableToken achieves **60% lower UED** (Unit Edit Distance) than best existing supervised semantic tokenizers.
### Noise Robustness (UED ↓)
| Model | Frame Rate | Codebook Size | UED (%, ↓) ||:---|:---:|:---:|:---:|| [GLM-4-Voice](https://github.com/zai-org/GLM-4-Voice) | 12.5Hz | 16,384 | 31.10 || [$\mathcal{S}^3$ Tokenizer](https://github.com/FunAudioLLM/CosyVoice) | 25Hz | 4,096 | 26.17 || [CosyVoice2](https://github.com/FunAudioLLM/CosyVoice) | 25Hz | 6,561 | 38.66 || **StableToken** | 25Hz | 8,192 | **10.17** 🏆 |
### Reconstruction Quality
Measurements on LibriSpeech (LS) and SEED benchmarks.
| Benchmark | WER (↓) | MOS (↑) ||:----------|:-------:|:-------:|| LibriSpeech Clean | **3.84** | **4.09** || LibriSpeech Other | **7.99** | 3.83 || SEED-En | **3.44** | 4.01 || SEED-Zh | **2.62** | **4.18** |
## Citation
```bibtex@article{song2025stabletoken, title={StableToken: A Noise-Robust Semantic Speech Tokenizer for Resilient SpeechLLMs}, author={Song, Yuhan and Zhang, Linhao and Wu, Chuhan and Liu, Aiwei and Jia, Wei and Wang, Houfeng and Zhou, Xiao}, journal={arXiv preprint arXiv:2509.22220}, year={2025}}```
## License
This project is licensed under the [License Term of StableToken](LICENSE).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130# set random seed, so that you may reproduce your result.__set_seed1: !apply:random.seed [1986]__set_seed2: !apply:numpy.random.seed [1986]__set_seed3: !apply:torch.manual_seed [1986]__set_seed4: !apply:torch.cuda.manual_seed_all [1986]
# fixed paramssample_rate: 22050text_encoder_input_size: 512llm_input_size: 1024llm_output_size: 1024spk_embed_dim: 192
# model params# 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.# for system/third_party class/function, we do not require this.llm: !new:cosyvoice.llm.llm.TransformerLM text_encoder_input_size: !ref <text_encoder_input_size> llm_input_size: !ref <llm_input_size> llm_output_size: !ref <llm_output_size> text_token_size: 51866 speech_token_size: 4096 length_normalized_loss: True lsm_weight: 0 spk_embed_dim: !ref <spk_embed_dim> text_encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder input_size: !ref <text_encoder_input_size> output_size: 1024 attention_heads: 8 linear_units: 2048 num_blocks: 3 dropout_rate: 0.1 positional_dropout_rate: 0.1 attention_dropout_rate: 0 normalize_before: True input_layer: 'linear' pos_enc_layer_type: 'rel_pos_espnet' selfattention_layer_type: 'rel_selfattn' use_cnn_module: False macaron_style: False use_dynamic_chunk: False use_dynamic_left_chunk: False static_chunk_size: 1 llm: !new:cosyvoice.transformer.encoder.TransformerEncoder input_size: !ref <llm_input_size> output_size: !ref <llm_output_size> attention_heads: 8 linear_units: 2048 num_blocks: 7 dropout_rate: 0.1 positional_dropout_rate: 0.1 attention_dropout_rate: 0 input_layer: 'linear_legacy' pos_enc_layer_type: 'rel_pos_espnet' selfattention_layer_type: 'rel_selfattn' static_chunk_size: 1
flow: !new:cosyvoice.flow.flow.MaskedDiffWithXvec input_size: 512 output_size: 80 spk_embed_dim: !ref <spk_embed_dim> output_type: 'mel' vocab_size: 8192 input_frame_rate: 25 only_mask_loss: True encoder: !new:cosyvoice.transformer.encoder.BlockConformerEncoder output_size: 512 attention_heads: 8 linear_units: 2048 num_blocks: 6 dropout_rate: 0.1 positional_dropout_rate: 0.1 attention_dropout_rate: 0.1 normalize_before: True input_layer: 'linear' pos_enc_layer_type: 'rel_pos_espnet' selfattention_layer_type: 'block_rel_selfattn' block_size: 10 input_size: 512 use_cnn_module: False macaron_style: False length_regulator: !new:cosyvoice.flow.length_regulator.InterpolateRegulator channels: 80 sampling_ratios: [1, 1, 1, 1] decoder: !new:cosyvoice.flow.flow_matching.ConditionalCFM in_channels: 240 n_spks: 1 spk_emb_dim: 80 cfm_params: !new:omegaconf.DictConfig content: sigma_min: 1e-06 solver: 'euler' t_scheduler: 'cosine' training_cfg_rate: 0.2 inference_cfg_rate: 0.7 reg_loss_type: 'l1' estimator: !new:cosyvoice.flow.decoder.ConditionalDecoder in_channels: 320 out_channels: 80 channels: [256, 256] dropout: 0 attention_head_dim: 64 n_blocks: 4 num_mid_blocks: 12 num_heads: 8 act_fn: 'gelu'
hift: !new:cosyvoice.hifigan.generator.HiFTGenerator in_channels: 80 base_channels: 512 nb_harmonics: 8 sampling_rate: !ref <sample_rate> nsf_alpha: 0.1 nsf_sigma: 0.003 nsf_voiced_threshold: 10 upsample_rates: [8, 8] upsample_kernel_sizes: [16, 16] istft_params: n_fft: 16 hop_len: 4 resblock_kernel_sizes: [3, 7, 11] resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5], [1, 3, 5]] source_resblock_kernel_sizes: [7, 11] source_resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5]] lrelu_slope: 0.1 audio_limit: 0.99 f0_predictor: !new:cosyvoice.hifigan.f0_predictor.ConvRNNF0Predictor num_class: 1 in_channels: 80 cond_channels: 512123version https://git-lfs.github.com/spec/v1oid sha256:28655ded7fce95b338ad22b7967ebc28fdb6a13ff4c42a4032dbfff6c9c12187size 428400959123version https://git-lfs.github.com/spec/v1oid sha256:65244bb40ea281173069672868e8f8ce60dfa2e1804661770b3de4b971ea1a63size 81897015123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960{ "_name_or_path": "openai/whisper-large-v3", "activation_dropout": 0.0, "activation_function": "gelu", "apply_spec_augment": false, "architectures": [ "WhisperLFQEncoder" ], "attention_dropout": 0.0, "batch_maximization_weight": 0.3, "classifier_proj_size": 256, "d_model": 1280, "delta_cross_logdet_reg_loss": 1.0, "dropout": 0.0, "enable_noise_contrastive": false, "encoder_attention_heads": 20, "encoder_causal_attention": false, "encoder_causal_convolution": false, "encoder_ffn_dim": 5120, "encoder_layerdrop": 0.0, "encoder_layers": 32, "fix_noise_commit_loss_ratio": false, "init_std": 0.06, "is_encoder_decoder": true, "lambda_consensus_loss_ratio": 0.25, "layernorm_after_quantize": true, "mask_feature_length": 10, "mask_feature_min_masks": 0, "mask_feature_prob": 0.0, "mask_time_length": 10, "mask_time_min_masks": 2, "mask_time_prob": 0.05, "max_length": 448, "max_source_positions": 1500, "max_target_positions": 448, "median_filter_width": 7, "model_type": "whisper", "noise_commit_loss_ratio": 0.3333333333333333, "num_clean_input": 3, "num_hidden_layers": 32, "num_mel_bins": 128, "num_voters": 5, "pooling_kernel_size": 2, "pooling_position": 16, "pooling_type": "avg", "quantize_commit_coefficient": 0.25, "quantize_encoder_only": true, "quantize_position": 16, "quantize_vocab_size": 8192, "sample_minimization_weight": 0.1, "torch_dtype": "float32", "transformers_version": "4.48.0", "use_aggregated_entropy": true, "use_cache": true, "use_codebook_ce_loss": true, "use_commit_loss": true, "use_projection_bias": false, "use_svlfq": true, "use_weighted_layer_sum": false}123version https://git-lfs.github.com/spec/v1oid sha256:fcca441a2c8d8b3432eafc9727655550e8e1710570d836e465fe2d81be318d58size 12968379921234567891011121314{ "chunk_length": 30, "feature_extractor_type": "WhisperFeatureExtractor", "feature_size": 128, "hop_length": 160, "n_fft": 400, "n_samples": 480000, "nb_max_frames": 3000, "padding_side": "right", "padding_value": 0.0, "processor_class": "WhisperProcessor", "return_attention_mask": false, "sampling_rate": 16000}LICENSEAdded+451
README.mdAdded+106
decoder/config.yamlAdded+130
decoder/flow.ptAdded+3
decoder/hift.ptAdded+3
tokenizer/config.jsonAdded+60
tokenizer/model.safetensorsAdded+3
tokenizer/preprocessor_config.jsonAdded+14