{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/speechtokenizer-unified-speech-tokenizer-for","title":"SpeechTokenizer: Unified Speech Tokenizer for Speech Large Language Models","arxiv_id":"2308.16692","date":"2023-08-31","proceeding":null,"authors":["Xin Zhang","Dong Zhang","ShiMin Li","Yaqian Zhou","Xipeng Qiu"],"abstract":"Current speech large language models build upon discrete speech representations, which can be categorized into semantic tokens and acoustic tokens. However, existing speech tokens are not specifically designed for speech language modeling. To assess the suitability of speech tokens for building speech language models, we established the first benchmark, SLMTokBench. Our results indicate that neither semantic nor acoustic tokens are ideal for this purpose. Therefore, we propose SpeechTokenizer, a unified speech tokenizer for speech large language models. SpeechTokenizer adopts the Encoder-Decoder architecture with residual vector quantization (RVQ). Unifying semantic and acoustic tokens, SpeechTokenizer disentangles different aspects of speech information hierarchically across different RVQ layers. Furthermore, We construct a Unified Speech Language Model (USLM) leveraging SpeechTokenizer. Experiments show that SpeechTokenizer performs comparably to EnCodec in speech reconstruction and demonstrates strong performance on the SLMTokBench benchmark. Also, USLM outperforms VALL-E in zero-shot Text-to-Speech tasks. Code and models are available at https://github.com/ZhangXInFD/SpeechTokenizer/.","url_abs":"https://arxiv.org/abs/2308.16692v2","url_pdf":"https://arxiv.org/pdf/2308.16692v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"speechtokenizer-unified-speech-tokenizer-for","repo_url":"https://github.com/0nutation/uslm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"speechtokenizer-unified-speech-tokenizer-for","repo_url":"https://github.com/zhangxinfd/speechtokenizer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"speechtokenizer-unified-speech-tokenizer-for","repo_url":"https://github.com/0nutation/slmtokbench","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"text-to-speech","task_name":"Text to Speech"},{"task_slug":"text-to-speech-1","task_name":"text-to-speech"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.16692","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.16692"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/ZhangXInFD/SpeechTokenizer","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhangxinfd/speechtokenizer","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/0nutation/uslm","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/0nutation/slmtokbench","reach":{"status":"ok"}}],"summary":{"ran_violates":4,"ran":13,"ran_draft_wrong":1,"ran_honours":1,"ran_fixture":2,"unverified":5},"by_repo_kind":{"official":{"samples":23,"ran":18,"repositories":2},"community":{"samples":1,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":9,"samples":[{"code_sha256_prefix":"856d86b39c6005b4","entry":"divisible_by","repo":"ZhangXInFD/soundstorm-speechtokenizer","repo_kind":"community","path":"soundstorm_speechtokenizer/soundstorm.py","file_url":"https://github.com/ZhangXInFD/soundstorm-speechtokenizer/blob/HEAD/soundstorm_speechtokenizer/soundstorm.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"856d86b39c6005b4"}},{"code_sha256_prefix":"18804e5e23d7209a","entry":"average_metrics","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/quantization/distrib.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/quantization/distrib.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"18804e5e23d7209a"}},{"code_sha256_prefix":"b9d6342963694f46","entry":"build_stable_quantized_cdf","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/quantization/ac.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/quantization/ac.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b9d6342963694f46"}},{"code_sha256_prefix":"ffec7b2aa35d0253","entry":"calc_lr","repo":"0nutation/uslm","repo_kind":"official","path":"modules/scheduler.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/modules/scheduler.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ffec7b2aa35d0253"}},{"code_sha256_prefix":"6c54df5029e831e1","entry":"circular_padding","repo":"0nutation/uslm","repo_kind":"official","path":"bin/infer.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/bin/infer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6c54df5029e831e1"}},{"code_sha256_prefix":"2f77684a19a01429","entry":"collate_fn","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/trainer/dataset.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/trainer/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2f77684a19a01429"}},{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"1e8f03292b45230b","entry":"default","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/quantization/core_vq.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/quantization/core_vq.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1e8f03292b45230b"}},{"code_sha256_prefix":"6f6051e1e48db824","entry":"dynamic_range_compression_torch","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/trainer/loss.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/trainer/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6f6051e1e48db824"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"9f134f4ea526149a","entry":"get_dataloader","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/trainer/dataset.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/trainer/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9f134f4ea526149a"}},{"code_sha256_prefix":"a26f85d7c72ef39a","entry":"get_padding","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/discriminators.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/discriminators.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a26f85d7c72ef39a"}},{"code_sha256_prefix":"c360b5ccff704a88","entry":"laplace_smoothing","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/quantization/core_vq.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/quantization/core_vq.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c360b5ccff704a88"}},{"code_sha256_prefix":"982b9083b5a41368","entry":"random_cast_to_half","repo":"0nutation/uslm","repo_kind":"official","path":"modules/scaling.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/modules/scaling.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"982b9083b5a41368"}},{"code_sha256_prefix":"1d72f492e19080e6","entry":"random_clamp","repo":"0nutation/uslm","repo_kind":"official","path":"modules/scaling.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/modules/scaling.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1d72f492e19080e6"}},{"code_sha256_prefix":"09f10cd96592b37d","entry":"sample_vectors","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/quantization/core_vq.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/quantization/core_vq.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"09f10cd96592b37d"}},{"code_sha256_prefix":"f247e4748f379a76","entry":"snake","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/modules/seanet.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/modules/seanet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f247e4748f379a76"}},{"code_sha256_prefix":"c124aa8bd6b9ebe9","entry":"softmax","repo":"0nutation/uslm","repo_kind":"official","path":"modules/scaling.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/modules/scaling.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c124aa8bd6b9ebe9"}},{"code_sha256_prefix":"bcadb9daef59d785","entry":"spectral_normalize_torch","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/trainer/loss.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/trainer/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bcadb9daef59d785"}},{"code_sha256_prefix":"99a311d99448f881","entry":"top_k_top_p_filtering","repo":"0nutation/uslm","repo_kind":"official","path":"models/valle.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/models/valle.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"99a311d99448f881"}},{"code_sha256_prefix":"fb8e21d446dcf26f","entry":"topk_sampling","repo":"0nutation/uslm","repo_kind":"official","path":"models/valle.py","file_url":"https://github.com/0nutation/uslm/blob/HEAD/models/valle.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fb8e21d446dcf26f"}},{"code_sha256_prefix":"193e4cb06c7034a4","entry":"all_reduce","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/quantization/distrib.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/quantization/distrib.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"193e4cb06c7034a4"}},{"code_sha256_prefix":"6c82cd3d9b6dba51","entry":"apply_parametrization_norm","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/modules/conv.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/modules/conv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6c82cd3d9b6dba51"}},{"code_sha256_prefix":"35ac4a3a2d0faeac","entry":"get_2d_padding","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/discriminators.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/discriminators.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35ac4a3a2d0faeac"}},{"code_sha256_prefix":"8d9aa381c6147164","entry":"get_extra_padding_for_conv1d","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/modules/conv.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/modules/conv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8d9aa381c6147164"}},{"code_sha256_prefix":"9b33ed59d8d8736e","entry":"get_norm_module","repo":"ZhangXInFD/SpeechTokenizer","repo_kind":"official","path":"speechtokenizer/modules/conv.py","file_url":"https://github.com/ZhangXInFD/SpeechTokenizer/blob/HEAD/speechtokenizer/modules/conv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9b33ed59d8d8736e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}