betaFeedback

WorksComputer Science

TokenMapper: A Step Toward Interoperable Speech Token Translation

Abstract

Neural audio codecs discretize speech into token sequences, but the resulting token spaces differ in vocabulary and codebook structure, preventing direct communication across models. This limitation affects applications such as conversational voice agents and speech to speech translation systems where multiple speech models must interact. As a result, transferring information between speech systems typically requires decoding to waveform audio and re-encoding with a second tokenizer, increasing latency and introducing potential information loss. To address these limitations, we present TokenMapper, a direction aware framework for direct token to token translation between heterogeneous speech tokenizers in the discrete domain. TokenMapper supports structurally mismatched token spaces, including mappings between single codebook and multi codebook representations, under a shared effective token rate. Experiments on GLM-4-Voice, MiMi and DualCodec show consistent cross model performance. Specifically, translation WER approaches native reconstructions within 2.5-6.8% absolute WER, human MOS for TokenMapper outputs ranges from 2.29 to 4.39, following the same direction level trends as UTMOS and end to end latency is reduced by 4.8-94.5% relative to waveform bridging, reaching up to 972 ms per utterance. These results provide a practical step toward cross model speech token interoperability without intermediate waveform reconstruction.

Introduction

Discrete audio tokenization has become a central component of modern neural audio frameworks, enabling efficient compression and compatibility with language modeling. Early works such as VQ-VAE (van den Oord et al., 2018), vq-wav2vec (Baevski et al., 2020), and HuBERT (Hsu et al., 2021) demonstrated the effectiveness of discrete representations for speech and audio modeling. A major advance followed with SoundStream (Zeghidour et al., 2021), which introduced Residual Vector Quantization (RVQ) to hierarchically encode audio using multiple residual codebooks, a paradigm later refined by EnCodec (Défossez et al., 2022). RVQ based codecs typically expose multiple token streams operating at different information scales, enabling flexible conditioning and efficient generation. This design has been adopted or extended by a wide range of models and tasks, including GSLM (Lakhotia et al., 2021), AudioLM (Borsos et al., 2023), VioLA (Wang et al., 2023), SpeechTokenizer (Zhang et al., 2024), NanoCodec (Casanova et al., 2025), as well as recent Speech LLM codecs such as Moshi’s Mimi (Défossez et al., 2024), DualCodec (Li et al., 2025a), and XY Tokenizer (Gong et al., 2025). Neural audio codecs have consequently diverged substantially in their tokenization strategies. Variants modify the quantization mechanism itself e.g., Group RVQ or complex spectral modeling in HiFi-Codec (Yang et al., 2023a), AudioDec (Wu et al., 2023), and ComplexDec (Wu et al., 2025b), explicitly disentangle semantic and acoustic representations, SpeechTokenizer (Zhang et al., 2024), RepCodec (Huang et al., 2024b), SAC (Chen et al., 2025), or introduce adaptive temporal resolutions ,SNAC (Siuzdak et al., 2024), FlexiCodec (Li et al., 2025b). Beyond RVQ based designs, alternative tokenization schemes have also emerged, such as the unified tokenizer used in CosyVoice (Du et al., 2024a,b) and GLM-4-Voice (Zeng et al., 2024). While these advances enable applications ranging from real time conversational agents (Wang et al., 2024) to speech to speech translation pipelines (Tran et al., 2022), the resulting fragmentation of discrete token spaces prevents direct interaction across models. Today, information transfer between models typically requires decoding tokens to waveforms and re-encoding them, introducing additional latency and potential information loss. In other words, tokens produced by one model cannot be directly interpreted by another, even when both operate over the same underlying speech signal. As illustrated in Figure 1, this mismatch resembles an ”apples to oranges” problem: tokens produced by one tokenizer must first be converted back to waveform audio before they can be re-encoded by another model. To address this interoperability problem, we propose TokenMapper, a framework for direct token to token translation between heterogeneous audio tokenizers. TokenMapper operates entirely in the discrete domain and is designed to bridge structurally mismatched token spaces, including mappings between single codebook and multi codebook RVQ representations. In this work, we focus on same-rate tokenizers as a first feasibility study: the source and target token sequences have a shared effective temporal rate, while their vocabulary sizes and codebook structures may differ. We evaluate TokenMapper on three same rate but structurally distinct speech tokenizers: Moshi (Mimi), GLM-4-Voice, and DualCodec. Our results demonstrate that direct token level translation is feasible and preserves intelligibility to a meaningful degree, providing evidence that some transferable structure can be aligned across independently trained speech tokenizers. In

Comparison between conventional waveform bridging and TokenMapper direct token-to-token translation

Figure 1. Comparison between conventional waveform bridging and the proposed TokenMapper framework for cross model speech communication. (a) Conventional waveform bridging: tokens produced by model A (illustrated as apples) must first be decoded to waveform audio and then re-encoded by model B (whose tokens are illustrated as oranges). (b) TokenMapper: direct translation from apples to oranges, i.e., from the token space of model A to the token space of model B, eliminating intermediate waveform reconstruction.

summary, our main contributions are:

  • TokenMapper Framework: Direct token to token translation that eliminates waveform decoding and re-encoding, reducing latency and computational overhead, achieving 4.8-94.5% end to end latency reduction, up to 972 ms per utterance.

  • Structural Mismatch Handling: A direction aware mapping strategy that bridges incompatible token spaces, including single codebook and multi codebook (RVQ) representations with differing vocabulary sizes and depths.

  • Cross tokenizer transfer: Empirical evidence that direct token space translation preserves intelligibility across three same-rate but structurally different tokenizers, achieving 5.85-9.98% WER while remaining within 2.5-6.8% absolute WER of native reconstructions.

Discrete audio representations have become central to speech enabled and multimodal language models, supporting universal audio understanding ([11]), end to end spoken interaction ([?]; [?]; [?]), interleaved speech text modeling ([?]), and real time spoken agents ([?],[?]). In parallel, extensive work on neural audio codecs explores diverse discretization strategies, including diffusion and transformer based models ([?], [?], [?], [?]), low bitrate and high fidelity designs ([?], [?], [?], [?], [?], [1], [?], [2], [?], [?], [?]), semantic and disentangled representations ([?], [?], [?], [?], [?]), variable rate and structured token streams ([8], [?], [?], [?], [?], [?], [?]), and practical toolkits ([?], [?]). Discrete tokens are further used for downstream speech and language modeling, including self supervised learning (SSL) based tokenization and automatic speech recognition (ASR) ([12], [4]), large scale multilingual modeling ([?], [10]), codec based audio language models ([?], [6], [?], [?], [?]), and high quality reconstruction ([?]). While discrete tokenization has proven effective within individual models, from early music generation ([13]) to modern speech codecs, these representations remain incompatible across models, TokenMapper addresses this gap by translating directly between heterogeneous discrete token spaces without waveform reconstruction.

Method

TokenMapper performs direction aware translation between heterogeneous discrete token spaces, as illustrated in Figure 2, enabling mappings between single codebook and multi codebook tokenizers without leaving the token domain.

Overview of the TokenMapper pipeline

Figure 2. Overview of the TokenMapper pipeline. Input audio is tokenized by source tokenizer AA, encoded by a Transformer encoder with routing to codebook specific output heads, and projected into the token space of tokenizer BB. Tokens are denoted tijt_i^j, where jj indexes the codebook and ii indexes the timestep.

Problem Formulation

We consider supervised token to token translation between heterogeneous speech tokenizers. Let AA and BB denote a source and target tokenizer, respectively. Let X={xc[t]}c=1,t=1CA,TX = \{x_c[t]\}_{c=1,t=1}^{C_A,T} denote the discrete token sequence produced by tokenizer AA, and let Y={yc′[t]}c′=1,t=1CB,TY = \{y_{c'}[t]\}_{c'=1,t=1}^{C_B,T} denote the corresponding token sequence produced by tokenizer BB for the same utterance. Here, CAC_A and CBC_B denote the number of codebooks of tokenizers AA and BB, respectively, and TT is the sequence length. The current formulation assumes a shared effective token rate, so each source timestep is supervised against the corresponding target timestep. Extending the formulation to CA×TA→CB×TBC_A \times T_A \to C_B \times T_B for different or variable rate tokenizers requires an additional temporal alignment module, we discuss this limitation and possible extensions in Appendix F. Our objective is to learn a conditional mapping

fθ:(NCA×T,ωA→B)→NCB×T.(1)f_\theta: \left(\mathbb{N}^{C_A \times T}, \omega_{A \to B}\right) \to\mathbb{N}^{C_B \times T}. \tag*{(1)}

where ωA→B\omega_{A \to B} is a learned direction embedding that specifies the source to target tokenizer pair. TokenMapper is trained such that the predicted sequence Y^=fθ(X,ωA→B)\hat{Y} = f_\theta(X,\omega_{A \to B}) matches the distribution of token sequences produced by the original tokenizer of the target model. Figure 3 illustrates TokenMapper’s direction aware routing mechanism. By defining the translation directly between discrete spaces with potentially different number of codebooks (CA≠CBC_A \ne C_B) and vocabulary structures, this formulation naturally supports mappings between single codebook and multi codebook tokenizers.

Direction conditioned encoder to codebook routing schemes

Figure 3. Direction conditioned encoder to codebook routing schemes. (a) Single→Multi: a single encoder stream is broadcast to all target codebooks. (b) Multi→Single: multiple encoder streams are aggregated via attention pooling. (c) Multi→Multi: each target codebook receives a concatenation of a shared base stream and its corresponding encoder stream.

Model Architecture

Input Representation

Each discrete token xc[t]x_c[t] is first mapped to a learned token embedding etok(xc[t])∈RD\mathbf{e}_{\mathrm{tok}}(x_c[t]) \in\mathbb{R}^{D}, where

DD denotes the embedding dimensionality of the encoder backbone and is shared across all token, positional, codebook, and direction embeddings. This embedding is then summed with three additional embeddings: a positional embedding epos(t)\mathbf{e}_{\mathrm{pos}}(t), a codebook embedding ecb(c)\mathbf{e}_{\mathrm{cb}}(c), and a direction embedding edir(ωA→B)\mathbf{e}_{\mathrm{dir}}(\omega_{A\to B}):

hc,t=etok(xc[t])+epos(t)+ecb(c)+edir(ωA→B)(2)\mathbf{h}_{c,t}=\mathbf{e}_{\mathrm{tok}}(x_c[t])+\mathbf{e}_{\mathrm{pos}}(t)+\mathbf{e}_{\mathrm{cb}}(c)+\mathbf{e}_{\mathrm{dir}}(\omega_{A\to B}) \tag*{(2)}

Stacking all token embeddings yields H∈RCA×T×D\mathbf{H}\in\mathbb{R}^{C_A\times T\times D}

Encoder Backbone

Encoding is performed independently for each codebook channel, with self attention restricted to the temporal axis.

H~=ENC⁡(H),H~∈RCA×T×D(3)\widetilde{\mathbf{H}}=\operatorname{ENC}(\mathbf{H}),\qquad\widetilde{\mathbf{H}}\in\mathbb{R}^{C_A\times T\times D} \tag*{(3)}

Direction Specific Output Heads

We define the post encoder processing as a routing function ϕA→B(ωA→B,H~)\phi_{A\to B}(\omega_{A\to B},\widetilde{\mathbf{H}}), which maps the encoder output H~\widetilde{\mathbf{H}} to the inputs of the direction specific output heads Z\mathbf{Z}:

Z=ϕA→B(ωA→B,H~),Z∈RCB×T×DZ(4)\mathbf{Z}=\phi_{A\to B}(\omega_{A\to B},\widetilde{\mathbf{H}}),\qquad\mathbf{Z}\in\mathbb{R}^{C_B\times T\times D_Z} \tag*{(4)}

where DZD_Z depends on the routing case below. The resulting stream is passed to a one layer Transformer output head followed by a linear projection to the target vocabulary. The following subsections describe the different possible routing configurations for realizing this mapping.

Single to Single Output Head

When both the source and target tokenizers consist of a single codebook (CA=CB=1C_A=C_B=1), the routing function is the identity:

Z=H~,Z∈RT×D(5)\mathbf{Z}=\widetilde{\mathbf{H}},\qquad\mathbf{Z}\in\mathbb{R}^{T\times D} \tag*{(5)}

Multi to Single Output Head

When the source tokenizer has multiple codebooks and the target tokenizer has a single codebook, the routing function ϕA→B\phi_{A\to B} performs learned attention pooling across the codebook axis Figure 3(b), as described in [?]:

Z[t]=∑c=1CAαc,t(θ)H~c,t,∑c=1CAαc,t(θ)=1(6)\mathbf{Z}[t]=\sum_{c=1}^{C_A}\alpha_{c,t}(\theta)\widetilde{\mathbf{H}}_{c,t},\qquad\sum_{c=1}^{C_A}\alpha_{c,t}(\theta)=1 \tag*{(6)}

where αc,t(θ)\alpha_{c,t}(\theta) are learned attention weights.

Multi to Multi Output Head

When both the source and target tokenizers have multiple codebooks, the routing function ϕA→B\phi_{A\to B} constructs a separate input stream for each target codebook Figure 3(c) by concatenating a shared base stream, meaning the first source codebook channel with the corresponding encoded channel:

Zc′=concat⁡(H~1,H~c′),Zc′∈RT×2D(7)\mathbf{Z}_{c}'=\operatorname{concat}\left(\widetilde{\mathbf{H}}_{1},\widetilde{\mathbf{H}}_{c}'\right),\qquad\mathbf{Z}_{c}'\in\mathbb{R}^{T\times2D} \tag*{(7)}

This design choice is motivated by hierarchical neural audio codecs, where the first codebook is typically associated with higher level semantic structure.

Single to Multi Output Head

For single codebook sources, ϕA→B\phi_{A\to B} serves as a broadcast by duplication to all CBC_B target codebooks Fig. 3(a):

Z=(H~,H~,…,H~),Z∈RCB×T×D(8)\mathbf{Z} = (\widetilde{\mathbf{H}}, \widetilde{\mathbf{H}}, \ldots, \widetilde{\mathbf{H}}), \quad\mathbf{Z} \in\mathbb{R}^{C_B \times T \times D} \tag*{(8)}

Training Objective

Training uses token level cross-entropy over all target codebooks and timesteps. Given a target tokenizer with CBC_B codebooks, the loss is defined:

LCE=∑c′=1CB∑t=1TCE(fθ,c′(X,ωA→B)[t],yc′[t])(9)\mathcal{L}_{\mathrm{CE}} = \sum_{c'=1}^{C_B} \sum_{t=1}^{T} \mathrm{CE}\left(f_{\theta,c'}(X,\omega_{A\to B})[t], y_{c'}[t]\right) \tag*{(9)}

where yc′[t]y_{c'}[t] is the ground truth token, and fθ,c′(X,ωA→B)[t]f_{\theta,c'}(X,\omega_{A\to B})[t] denotes the predicted logits for that codebook. All directions share a conditioned encoder, with direction specific output heads.

Experiments

Experimental Setup

We evaluate cross-model token translation across heterogeneous audio tokenizers. Given an utterance, audio is encoded using a source tokenizer, translated into the target token space by the proposed model, and decoded using the target tokenizer’s native decoder. We evaluate all ordered source→\totarget pairs among GLM-4-Voice, which uses a single codebook (C=1C = 1), and Moshi (MiMi) and DualCodec, both of which use eight codebooks (C=8C = 8). For brevity, we refer to GLM-4-Voice as GLM and to Moshi (MiMi) as Moshi throughout. These experiments use tokenizers with a shared effective token rate, allowing one-to-one temporal supervision while still testing substantial codebook and vocabulary mismatch. Audio examples of native reconstructions and cross-model translations are available in the online supplementary material at https://talkov.github.io/TokenMapper.github.io/.

Datasets

LibriSpeech

The first dataset is LibriSpeech, a large-scale English speech corpus derived from audiobook recordings (Panayotov et al., 2015). Training is performed on the train subset, while evaluation is conducted on the test-clean subset. LibriSpeech provides high-quality, well-segmented speech with relatively consistent recording conditions, making it a standard benchmark for evaluating speech representation learning and reconstruction quality.

VCTK

To assess generalization beyond audiobook speech, we additionally evaluate on VCTK, a multi-speaker English corpus containing speech from 110 speakers with diverse accents (Yamagishi et al., 2019). Each speaker reads approximately 400 utterances recorded under controlled conditions. Compared to LibriSpeech, VCTK introduces greater speaker diversity and accent variability, making it a useful complementary benchmark for evaluating the robustness of cross-tokenizer translation across different speaking styles and speaker characteristics.

Evaluation Metrics

We use complementary metrics to assess intelligibility and perceptual speech quality. In addition to these quantitative metrics, we include qualitative mel-spectrogram residual analysis in Appendix G to examine acoustic reconstruction behavior across translation directions.

Word Error Rate (WER)

WER is computed from ASR transcripts and compared against the corresponding ground truth transcripts. ASR decoding is performed using Whisper large-v3 (Radford et al., 2022), allowing WER to serve as a proxy for semantic and linguistic preservation under token translation. Before computing WER, both hypotheses and references are normalized by removing punctuation and standardizing whitespace to match the LibriSpeech transcription format.

Perceptual quality: MOS and UTMOS

Perceptual speech quality is evaluated using both human mean opinion score (MOS) and automatic MOS prediction. MOS is a subjective listening evaluation in which human listeners rate audio quality on a 1-5 scale, where higher scores indicate better perceived speech quality. Since full human evaluation is costly, we use UTMOS as the main automatic perceptual metric. UTMOS is a neural MOS predictor trained to estimate perceived speech naturalness and correlate with human MOS judgments (Saeki et al., 2022). We report UTMOS-v2 scores as estimated speech quality, and additionally conduct a human MOS listening study with 32 participants, who were instructed to listen in a quiet environment using headphones or earphones. The human evaluation protocol and results are provided in Appendix B.

Results

We now present the empirical performance of TokenMapper on cross model token translation. Results are reported on LibriSpeech test-clean and VCTK to evaluate robustness across datasets with different speaker distributions and recording conditions.

Semantic preservation (WER)

Semantic metric results shown in Table 1 suggest that cross model WER remains close to native reconstruction performance on LibriSpeech. While native WER ranges between 3.29-4.75%, cross model translation remains within 5.85-9.98%, corresponding to a modest degradation of only 2.56-5.96%. The strongest direction is GLM→DualCodec with 5.85%, representing only a 2.56% increase over native DualCodec reconstruction. The most challenging direction is DualCodec→Moshi with WER of 9.98%, indicating increased difficulty when translating between multi codebook, RVQ based, tokenizers. Table 2 shows a similar trend on VCTK, where cross model WER remains within 2.96-6.83% of native performance despite increased speaker and accent variability. This consistency across datasets suggests that TokenMapper captures tokenizer level linguistic structure rather than dataset specific acoustic properties. Together, these results indicate that TokenMapper preserves semantic content with only limited degradation relative to native reconstruction.

WER (%) (↓)GLMMoshiDualCodec
GLM4.759.315.85
Moshi8.554.027.91
DualCodec8.349.983.29

Table 1. Cross model WER (%) on LibriSpeech (lower is better). Diagonal entries correspond to native reconstructions, off diagonal entries denote source (rows)→target (columns) token translation.

WER (%) (↓)GLMMoshiDualCodec
GLM5.329.497.95
Moshi8.794.399.18
DualCodec8.289.922.35

Table 2. Cross model WER (%) on VCTK (lower is better). Diagonal entries correspond to native reconstructions, off diagonal entries denote source (rows)→target (columns) token translation.

Performance remains stable across both single stream and multi codebook tokenizers, suggesting that the linguistic information encoded in these representations is largely transferable.

Acoustic quality (UTMOS)

Table 3 shows that perceptual quality remains reasonably close to native reconstruction on LibriSpeech. Native scores range from 2.93-3.32, while cross model translation achieves 1.98-3.24, corresponding to a degradation of 0.03-0.95. Translations into GLM remain particularly strong, reaching 3.24 and 3.16 compared to a native score of 3.27. For RVQ based targets, perceptual quality is more variable, with the lowest score observed for DualCodec→Moshi of 1.98. This again highlights the increased difficulty of reconstructing hierarchical acoustic detail across heterogeneous multi codebook token spaces. Table 4 shows a similar pattern on VCTK. Translations into GLM achieve the highest perceptual quality with UTMOS of 3.38 and 3.33, closely approaching the native GLM score of 3.39, while DualCodec→Moshi remains the most challenging direction with a score of 1.95. These results suggest that while semantic content transfers reliably, reconstructing fine acoustic structure remains more sensitive to tokenizer mismatch.

UTMOS (↑)GLMMoshiDualCodec
GLM3.272.102.70
Moshi3.242.932.85
DualCodec3.161.983.32

Table 3. Cross model UTMOS on LibriSpeech (higher is better). Diagonal entries correspond to native reconstructions, off diagonal entries denote source→target token translation.

UTMOS (↑)GLMMoshiDualCodec
GLM3.392.012.80
Moshi3.383.012.85
DualCodec3.331.953.38

Table 4. Cross model UTMOS on VCTK (higher is better). Diagonal entries correspond to native reconstructions, off diagonal entries denote source→target token translation.

Human perceptual evaluation (MOS)

To complement the automatic UTMOS evaluation, we conduct a human mean opinion score (MOS) listening study with 32 participants. Each participant rates audio quality on a 1-5 scale, where higher scores indicate better perceived quality. For each target tokenizer, TokenMapper outputs are compared against the corresponding native target tokenizer reconstruction.

Table 5 shows that the human ratings follow the same trend as the automatic perceptual metrics. Translations into GLM remain close to native GLM reconstruction, with MOS scores of 4.39 and 4.36 compared to the native score of 4.50. Translations into Moshi are more challenging, especially DualCodec→\toMoshi, which decreases from 3.08 to 2.29. Translations into DualCodec are intermediate, reaching 3.03 and 3.01 compared to the native score of 3.76. These results suggest that TokenMapper preserves a substantial fraction of target tokenizer perceptual quality in some directions, especially into GLM, while quality degradation remains more pronounced for structurally mismatched RVQ based targets.

MOS (↑\uparrow)GLMMoshiDualCodec
GLM4.502.933.03
Moshi4.393.083.01
DualCodec4.362.293.76

Table 5. Human MOS evaluation with 32 participants (higher is better). Diagonal entries correspond to native reconstructions, off diagonal entries denote source→\totarget token translation.

Latency reduction

We evaluate offline utterance level latency for cross tokenizer transfer. Table 6 reports the mean end to end transfer path latency of waveform bridging and TokenMapper for each translation direction. For the waveform bridging baseline, latency is computed over the full path encode⁡src→decode⁡src→encode⁡tgt→decode⁡tgt\operatorname{encode}_{src} \to\operatorname{decode}_{src} \to\operatorname{encode}_{tgt} \to\operatorname{decode}_{tgt}. For TokenMapper, latency is computed over encode⁡src→TokenMapper⁡→decode⁡tgt\operatorname{encode}_{src} \to\operatorname{TokenMapper} \to\operatorname{decode}_{tgt}. All measurements were performed on an NVIDIA RTX 6000 GPU. Additional protocol details and module level TokenMapper statistics are provided in Appendix D. As shown in Table 6, latency reduction is strongly direction dependent. When the waveform bridging baseline is dominated by neural decoding, such as GLM→\toDualCodec, TokenMapper reduces latency by up to 94.5%. In directions where the source and target tokenizer runtimes are more balanced, the gains are more modest, ranging from 4.8% to 10.4%. These improvements arise because TokenMapper bypasses intermediate source side waveform synthesis and target side re-tokenization, highlighting the practical benefit of performing cross model transfer directly in the token domain.

DirectionBaseTMΔ\Delta msΔ%\Delta\%
Moshi→\toGLM800.9755.345.65.7
GLM→\toMoshi802.452.0750.493.5
Moshi→\toDualCodec280.635.3245.387.4
GLM→\toDualCodec1029.256.9972.394.5
DualCodec→\toMoshi283.4253.929.510.4
DualCodec→\toGLM1027.6978.848.84.8

Table 6. Mean offline end to end transfer path latency comparison between waveform bridging (Base) and TokenMapper (TM). Time saved is reported in milliseconds and relative percentage.

Ablations

To better understand the contribution of individual architectural components and assess the effect of different design choices, we perform a set of targeted ablation studies on the proposed model. Specifically, we evaluate the following modifications:

  • No direction conditioning. We remove the direction embedding that informs the model about the source→\totarget mapping and instead use a shared representation across all translation directions.

  • Single shared output head. We replace direction specific output heads with a single shared projection head used for all translation directions.

  • MLP projection head. We replace the Transformer based output heads in the proposed model with a simple fully connected MLP projection heads (4 layers).

  • Cross codebook attention in the encoder. We ablate the original design by enabling self attention across both time and codebook dimensions, allowing interactions between codebook channels within the encoder.

  • Full context concatenation. For multi→\tomulti mappings, the proposed model concatenates a shared base stream (codebook 1) with the corresponding target codebook channel. We ablate this design by

concatenating all source codebook representations and feeding the full context to each target projection head.

These ablations are evaluated across representative translation directions covering the main structural cases: single→\tomulti (GLM→\toMoshi), multi→\tosingle (Moshi→\toGLM), and multi→\tomulti (Moshi→\toDualCodec). The ablation results in tbl:7 confirm that direction conditioning and direction specific projection heads are critical for accurate token translation. Removing direction conditioning increases WER from 9.31% to 57.62% for GLM→\toMoshi and from 7.91% to 77.21% for Moshi→\toDualCodec. Using a single shared output head leads to even larger degradation from WER 8.55% to 83.01% for Moshi→\toGLM. Replacing the Transformer based output head with a simple MLP also degrades performance e.g., WER 9.31% to 74.23%, showing the importance of sequence modeling in the output stage. Preserving codebook structure is similarly important: cross codebook attention increases WER from 8.55% to 18.86% and from 7.91% to 22.83% while also adding significant computational overhead. Full context concatenation further degrades multi→\tomulti translation, WER from 7.91% to 26.79%. Overall, these results validate the proposed architectural choices and highlight the importance of direction awareness, structural alignment, and sequence aware output modeling. We also include a simple supervised token domain baseline in Appendix E, which removes TokenMapper’s direction aware shared encoder, structured routing, and Transformer output heads, its near failure performance further indicates that local token correspondences alone are insufficient.

Conclusion

We introduced TokenMapper, a direction aware framework for direct token to token translation between heterogeneous speech tokenizers, avoiding intermediate waveform reconstruction. Across LibriSpeech and VCTK, TokenMapper preserves semantic content with only modest degradation relative to native target tokenizer reconstruction. On LibriSpeech, cross model WER increases by 2.56-5.96% absolute compared to native reconstruction, and on VCTK the gap remains similarly limited at 2.96-6.83%, suggesting that the learned mappings capture transferable tokenizer level structure rather than only dataset specific acoustics.

Perceptual quality follows the same overall pattern. UTMOS and human MOS results show that translations into GLM remain close to native GLM reconstruction, while translations into RVQ based targets, especially Moshi, are more challenging. This indicates that semantic information transfers more readily across token spaces than fine acoustic detail encoded across multiple residual codebooks.

TokenMapper also provides substantial efficiency benefits. By bypassing source side waveform synthesis and target side re-tokenization, it reduces offline transfer path latency by up to 94.5%, with the largest gains in directions where waveform bridging is dominated by neural decoding.

Overall, these results show that direct token domain interoperability is feasible in the studied same rate setting. TokenMapper provides a concrete step toward modular speech systems that communicate through discrete tokens rather than waveform bridging. Future work should extend the approach to additional tokenizer families, different or variable token rates, weaker pairing assumptions, stronger acoustic detail recovery, and streaming deployment.

Limitations

The current experiments cover three same rate speech tokenizers and six ordered directions, including one single codebook tokenizer and two codebook RVQ tokenizers. The formulation assumes paired same utterance token sequences with a shared effective token rate, mapping CA×TC_A \times T to CB×TC_B \times T. It therefore does not directly handle tokenizer pairs with different frame rates. Extending the method to CA×TA→CB×TBC_A \times T_A \to C_B \times T_B would require an additional temporal alignment module, Appendix F discusses possible extensions. The method also depends on supervised paired token data obtained by encoding the same utterances with each tokenizer. This does not require retraining the original tokenizers or speech models, but it does assume access to the relevant tokenizer checkpoints and may require adaptation when tokenizer versions change or when adding new target tokenizers. The current evaluation also does not cover strong domain shifts such as music to speech tokenizer mismatch. Finally, perceptual quality remains more challenging for structurally mismatched multi codebook targets. For example, DualCodec→\toMoshi remains below native Moshi reconstruction in both UTMOS and human MOS, suggesting that recov-

DirectionModel variantWER (%) (↓\downarrow)UTMOS (↑\uparrow)
GLM→\toMoshiFull model9.312.10
No direction conditioning57.621.68
Single shared output head88.821.71
MLP output head (4 layers)74.231.66
Moshi→\toGLMFull model8.553.24
No direction conditioning33.523.11
Single shared output head83.012.47
MLP output head (4 layers)67.522.52
Cross codebook attention18.863.26
Moshi→\toDualCodecFull model7.912.85
No direction conditioning77.211.61
Single shared output head96.751.96
MLP output head (4 layers)99.461.53
Cross codebook attention22.832.36
Full context concatenation26.792.12

caption: Ablation results for representative translation directions. Lower WER is better, higher UTMOS is better.

:::

ering fine grained residual acoustic detail across heterogeneous RVQ hierarchies is harder than preserving semantic content. The VCTK results suggest robustness beyond LibriSpeech speakers and audiobook conditions, but they do not establish full out of distribution robustness.

Generative AI Use Disclosure

Generative AI tools were utilized to edit and polish the phrasing of this manuscript.

Additional Reproducibility Details

Paired token construction. For each utterance, we independently encode the same waveform with each tokenizer and match the resulting token tensors by utterance or file ID. This produces supervised pairs (X,Y)(X,Y) for each source target direction. GLM produces a single codebook sequence X∈N1×TX \in\mathbb{N}^{1 \times T}, while Moshi and DualCodec produce 8 codebook RVQ sequences X∈N8×TX \in\mathbb{N}^{8 \times T}. Padding masks are constructed over the temporal axis and are applied consistently to the token level cross entropy loss so that padded positions do not contribute to training or evaluation.

Training and checkpoint selection. Unless otherwise stated, all directions use the same configuration: a 4-layer shared Transformer encoder with hidden size D=256D = 256, 8 attention heads, one-layer Transformer output heads, Adam optimization, batch size 32, learning rate 5×10−45 \times10^{-4}, and 600 training epochs. We reserve 10% of the LibriSpeech training utterances as a fixed validation set and use the remaining 90% for training. Checkpoints are selected according to the lowest validation cross-entropy, computed with the same padding mask as the training loss so that padded positions do not contribute to model selection. The selected checkpoint is then evaluated on LibriSpeech test-clean and VCTK.

Evaluation. For WER, decoded waveforms are transcribed using Whisper large-v3 and compared to normalized references after punctuation removal and whitespace normalization. UTMOS is computed with UTMOS-v2. Human MOS and latency protocols are described in Appendices B and D, respectively.

Tokenizer and preprocessing details. We use the public tokenizer/decoder configurations corresponding to GLM-4-Voice, Moshi/MiMi, and DualCodec. All tokenizers are applied to the same utterance set for paired-token construction. Any tokenizer-specific sample-rate conversion and waveform normalization follow the corresponding tokenizer inference pipeline.

Human MOS Evaluation

We conducted a human mean opinion score (MOS) listening study with 32 participants. Each participant was asked to listen to audio samples using headphones or earphones, preferably in a quiet environment, and rate the perceived speech quality on a 1-5 scale, where higher scores indicate better perceived quality. The form instructions stated that all samples within each question correspond to the same spoken utterance but may have been generated by different anonymized speech processing systems, and that participants should judge only the audio quality they hear. There were no right or wrong answers.

The evaluation used 15 audio samples in total: 12 TokenMapper outputs and 3 native target tokenizer reconstructions. The 12 TokenMapper samples cover all six translation directions, with two utterances per direction. The native samples correspond to the reconstruction quality of the three target tokenizers (GLM, Moshi, and DualCodec) and serve as target tokenizer reference points. The purpose of this evaluation is not to compare TokenMapper outputs against the original clean waveform, but rather to compare each translated output against the reconstruction quality achievable by the corresponding target tokenizer. Therefore, in the MOS matrix reported in Table 5, diagonal entries denote native target tokenizer reconstructions, while off diagonal entries denote TokenMapper source→\totarget translations. This presentation matches the WER and UTMOS matrices used in the main results. The MOS results follow the same trend as the automatic perceptual metrics. Translations into GLM are rated close to native GLM reconstruction, Moshi-targeted translations remain the most challenging, especially DualCodec→\toMoshi, and DualCodec-targeted translations are intermediate. These results support the interpretation that TokenMapper preserves much of the perceptual quality achievable by the target tokenizer, while quality degradation is more pronounced when the target representation requires recovering multi codebook residual acoustic detail.

Adaptation to an Additional Target Tokenizer

To examine whether adding a target tokenizer requires retraining the full model, we conducted a preliminary experiment with the XY tokenizer. We froze the encoder trained in the original TokenMapper setup and trained only new XY output heads for 30 epochs using the same training parameters. The native XY reconstruction serves as the target baseline.

DirectionMetricNative XYTokenMapper
GLM→\toXYWER (%)3.036.23
Moshi→\toXYWER (%)3.038.21
DualCodec→\toXYWER (%)3.038.95
GLM→\toXYUTMOS3.312.82
Moshi→\toXYUTMOS3.312.97
DualCodec→\toXYUTMOS3.313.01

Table 8. Preliminary adaptation experiment into XY. The TokenMapper encoder is frozen and only new XY output heads are trained for 30 epochs. Lower WER is better and higher UTMOS is better.

Although preliminary, these results suggest that adding a new target tokenizer may be approached through lightweight output head adaptation rather than retraining the full model. This does not prove universal scalability, but it supports the architectural distinction between the shared direction conditioned encoder and the comparatively smaller target specific output heads.

Latency Protocol and Module Level Timing

The main latency comparison in Table 6 is an offline utterance level transfer path comparison between waveform bridging and TokenMapper. The waveform bridging baseline includes the full transfer path

encode⁡src→decode⁡src→encode⁡tgt→decode⁡tgt.\operatorname{encode}_{src} \to\operatorname{decode}_{src} \to\operatorname{encode}_{tgt} \to\operatorname{decode}_{tgt}.

The TokenMapper transfer path includes

encode⁡src→TokenMapper⁡→decode⁡tgt.\operatorname{encode}_{src} \to\operatorname{TokenMapper} \to\operatorname{decode}_{tgt}.

Thus, TokenMapper excludes intermediate source side waveform synthesis and target side re-tokenization. The reported main paper latency values are computed from the measured latency of the corresponding stages in each path. All latency measurements were performed on an NVIDIA RTX 6000 GPU. This protocol is intended to quantify offline transfer path latency, not streaming or real time deployment latency. In addition to the end to end transfer path comparison, we report isolated module level TokenMapper latency in Table 9. This benchmark measures only the learned TokenMapper module, excluding tokenizer encoding, tokenizer decoding, and disk I/O. Source token tensors are pre-extracted and preloaded on CPU. The timed path includes moving source tokens to GPU, constructing the padding mask and direction tensor, running the TokenMapper forward pass, and converting output logits to token IDs using argmax. Timing uses warm up iterations and CUDA synchronization before and after each measured run. For each translation direction, module level latency is measured over 128 utterances, with three repeated measurements per utterance. The repeated measurements are averaged at the utterance level before computing summary statistics. We report mean, standard deviation, median (P50), P90, P95, and tokens per second. Tokens per second is computed over discrete codebook token elements, so multi codebook tokenizers naturally contain more token elements per timestep than single codebook tokenizers.

DirectionMeanStdP50P90P95Tok/s
Moshi→\toGLM2.660.422.493.173.54328188
GLM→\toMoshi3.960.103.943.994.0527641
Moshi→\toDualCodec4.500.434.325.015.37194288
GLM→\toDualCodec4.020.084.004.074.1027220
DualCodec→\toMoshi4.450.414.274.945.31194751
DualCodec→\toGLM2.650.412.473.083.52327339

Table 9. Module level TokenMapper inference latency per direction. Values are in milliseconds except Tok/s.

Token domain Baseline

We evaluate a simple supervised token domain baseline using the same paired source target token data. This baseline removes TokenMapper’s direction aware shared encoder, structured routing, and Transformer output heads, and instead uses a lightweight local token mapping setup to test whether direct token correspondences are sufficient. The resulting audio is extremely noisy, with WER close to 100% and severely degraded UTMOS. This supports the need for sequence aware, direction conditioned, and codebook aware modeling rather than simple local token replacement.

DirectionWER (%)UTMOS
GLM→\toMoshi1000.71
GLM→\toDualCodec99.91.23
Moshi→\toGLM97.61.64
Moshi→\toDualCodec99.90.98
DualCodec→\toGLM98.41.68
DualCodec→\toMoshi1000.85

Table 10. Supervised token domain baseline.

Scope, Data Dependence, and Rate Mismatch

The current formulation assumes paired same utterance token sequences and a shared effective token rate, CA×T→CB×TC_A \times T \to C_B \times T. This enables direct supervision at corresponding timesteps, but it does not address tokenizers with different frame rates or variable rate token streams. A natural extension would add an explicit temporal alignment module, enabling mappings CA×TA→CB×TBC_A \times T_A \to C_B \times T_B. Possible approaches include temporal resampling or interpolation, monotonic attention, CTC-based ASR alignment, source target cross attention over unequal token timelines, or duration and variance adaptor modules similar to FastSpeech2 style TTS systems. The supervised setup also requires paired tokenized data. In the present experiments, this pairing is obtained by encoding the same utterances with each tokenizer and matching the resulting token tensors by utterance or file identity. This requirement may require adaptation when tokenizer versions change or when a new target tokenizer is introduced. The VCTK results suggest robustness beyond LibriSpeech speakers and audiobook conditions, but they do not establish robustness to full domain shift. Stronger mismatch may arise when tokenizers are trained on different data domains, such as music versus speech, because their token spaces may encode substantially different acoustic and semantic factors. Semi supervised, weakly paired, or alignment based training objectives are promising directions for reducing this dependence.

Direction Embedding Analysis

To further inspect the learned direction conditioning mechanism, we analyze the learned direction embeddings ωA→B\omega_{A\to B} after training. For each of the six main translation directions among GLM, Moshi, and DualCodec, we extract the corresponding direction embedding from the trained TokenMapper model and project the embeddings to two dimensions using PCA. The resulting visualization is shown in Figure 4. The PCA projection shows that the learned direction embeddings occupy a relatively compact region, indicating that the direction conditioning vectors remain close in the learned embedding space. However, they are not collapsed to a single point. The observed separation suggests that even small differences between direction embeddings encode information that is useful for distinguishing source target transformations. Directions with the same source or target tokenizer also exhibit visible structure. For example, the GLM source directions are located on the positive side of the first principal component, while the directions into GLM are separated along the second principal component. Multi codebook directions involving Moshi and DualCodec are also separated from the single codebook GLM source mappings. This suggests that the direction embeddings capture part of the structural asymmetry between single codebook and multi codebook token spaces. This analysis should be interpreted as a diagnostic rather than as proof of a universal shared token space. The direction embedding is only one component of the conditioning mechanism, together with the shared encoder, routing function, and direction specific output heads. Nevertheless, the observed separation supports the claim that TokenMapper learns direction dependent transformations rather than treating the direction ID as an unused or uninformative label.

Figure 4. PCA projection of the learned direction embeddings for the six main TokenMapper directions. Each point corresponds to a learned source target direction embedding ωA→B\omega_{A\to B}. Although the embeddings occupy a compact region, their non-collapsed structure indicates that the model learns distinct conditioning vectors for different tokenizer pair transformations, with visible organization related to source and target tokenizer type.

Qualitative Spectrogram Analysis

To complement the WER, UTMOS, and MOS results, we include a qualitative mel-spectrogram analysis for all six cross tokenizer translation directions. For each direction, three utterances are visualized over the 0-8000 Hz frequency range. Each row presents the TokenMapper reconstruction, the native target tokenizer reconstruction, and the original ground truth audio. The WER and UTMOS values of each signal are also displayed above the corresponding spectrogram.

The final column shows the frequency wise mean absolute difference between the log mel-spectrograms, averaged over time. The three curves compare the native target reconstruction with the ground truth, the TokenMapper reconstruction with the ground truth, and the TokenMapper reconstruction with the native target reconstruction. The last comparison helps isolate the additional acoustic difference introduced by the token to token mapping from the reconstruction characteristics of the target tokenizer itself.

Across the evaluated directions, TokenMapper generally preserves the main temporal organization of the utterances. Speech active regions, silence intervals, and the dominant harmonic patterns remain aligned with the native target reconstruction and the ground truth. The mappings into GLM show particularly close visual agreement between the TokenMapper and native target spectrograms. This is also reflected in the relatively small TokenMapper to target spectral difference across much of the frequency range.

For mappings into the multi codebook Moshi and DualCodec targets, the broad speech structure is still retained, but the differences in fine spectral texture are more visible. These differences are most apparent in the high frequency regions and in the sharpness and intensity of individual harmonic components. Nevertheless, TokenMapper’s reconstruction usually remains closer in structure to the native target reconstruction than to an unrelated acoustic representation, indicating that the mapped tokens are decoded according to the expected target tokenizer characteristics.

Overall, the spectrograms support the quantitative results. The remaining differences are concentrated mainly in finer acoustic detail, which is more sensitive to the structure and reconstruction behavior of the target tokenizer.

Figure 5. Qualitative mel-spectrogram analysis for DualCodec→GLM over the 0-8000 Hz frequency range. Each row shows one example utterance. The first three columns show the TokenMapper reconstruction, native GLM reconstruction, and ground truth audio. The final column shows the frequency wise mean absolute log mel-spectrogram differences between the three signals.

Figure 6. Qualitative mel-spectrogram analysis for DualCodec→Moshi over the 0-8000 Hz frequency range. Each row shows one example utterance. The first three columns show the TokenMapper reconstruction, native Moshi reconstruction, and ground truth audio. The final column shows the frequency wise mean absolute log mel-spectrogram differences between the three signals.

Figure 7. Qualitative mel-spectrogram analysis for GLM→DualCodec over the 0-8000 Hz frequency range. Each row shows one example utterance. The first three columns show the TokenMapper reconstruction, native DualCodec reconstruction, and ground truth audio. The final column shows the frequency wise mean absolute log mel-spectrogram differences between the three signals.

Figure 8. Qualitative mel-spectrogram analysis for GLM→Moshi over the 0-8000 Hz frequency range. Each row shows one example utterance. The first three columns show the TokenMapper reconstruction, native Moshi reconstruction, and ground truth audio. The final column shows the frequency wise mean absolute log mel-spectrogram differences between the three signals.

Figure 9. Qualitative mel-spectrogram analysis for Moshi→GLM over the 0-8000 Hz frequency range. Each row shows one example utterance. The first three columns show the TokenMapper reconstruction, native GLM reconstruction, and ground truth audio. The final column shows the frequency wise mean absolute log mel-spectrogram differences between the three signals.

Figure 10. Qualitative mel-spectrogram analysis for Moshi→DualCodec over the 0-8000 Hz frequency range. Each row shows one example utterance. The first three columns show the TokenMapper reconstruction, native DualCodec reconstruction, and ground truth audio. The final column shows the frequency wise mean absolute log mel-spectrogram differences between the three signals.

References

  1. [1]Sunghwan Ahn, Beom Jun Woo, Min Hyun Han, Chanyeong Moon, and Nam Soo Kim. 2024. Hilcodec: High-fidelity and lightweight neural audio codec. Preprint, arXiv:2405.04752.
  2. [2]Yang Ai, Xiao-Hang Jiang, Ye-Xin Lu, Hui-Peng Du, and Zhen-Hua Ling. 2024. Apcodec: A neural audio codec with parallel amplitude and phase spectrum encoding and decoding. Preprint, arXiv:2402.10533.arxiv.org/abs/2402.10533
  3. [4]He Bai, Tatiana Likhomanenko, Ruixiang Zhang, Zijin Gu, Zakaria Aldeneh, and Navdeep Jaitly. 2024. dmel: Speech tokenization made simple. arXiv:2407.15835v2.arxiv.org/abs/2407.15835
  4. [6]Edresson Casanova, Ryan Langman, Paarth Neekhara, Shehzeen Hussain, Jason Li, Subhankar Ghosh, Ante Jukić, and Sang gil Lee. 2024. Low frame-rate speech codec: a codec designed for fast high-quality speech llm training and inference. Preprint, arXiv:2409.12117.arxiv.org/abs/2409.12117
  5. [8]Yunkee Chae, Woosung Choi, Yuhta Takida, Junghyun Koo, Yukara Ikemiya, Zhi Zhong, Kin Wai Cheuk, Marco A. Martínez-Ramírez, Kyogu Lee, Wei-Hsiang Liao, and Yuki Mitsufuji. 2025. Variable bitrate residual vector quantization for audio coding. Preprint, arXiv:2410.06016.arxiv.org/abs/2410.06016
  6. [10]William Chen, Wangyou Zhang, Yifan Peng, Xinjiang Li, Jinchuan Tian, Jiatong Shi, Xuankai Chang, Soumi Maiti, Karen Livescu, and Shinji Watanabe. 2024. Towards robust speech representation learning for thousands of languages. Preprint, arXiv:2407.00837.arxiv.org/abs/2407.00837
  7. [11]Yunfei Chu, Jin Xu, Xiaohuan Zhou, Qian Yang, Shiliang Zhang, Zhijie Yan, Chang Zhou, and Jingren Zhou. 2023. Qwen-audio: Advancing universal audio understanding via unified large-scale audio-language models. Preprint, arXiv:2311.07919.arxiv.org/abs/2311.07919
  8. [12]Mingyu Cui, Daxin Tan, Yifan Yang, Dingdong Wang, Huimeng Wang, Xiao Chen, Xie Chen, and Xunying Liu. 2024. Exploring ssl discrete tokens for multilingual asr. Preprint, arXiv:2409.08805.arxiv.org/abs/2409.08805
  9. [13]Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, and Ilya Sutskever. 2020. Jukebox: A generative model for music. Preprint, arXiv:2005.00341.arxiv.org/abs/2005.00341

Paper details

vlnc:W_6bsa5z7b
Version
v1 · latest
Published
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents