SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.22225 · 2026

TTS-PRISM: A Perceptual Reasoning and Interpretable Speech Model for Fine-Grained Diagnosis

Jie Wang, Di Wu, Zhiyong Wu, Xi Wang, Jian Luan, Zijian Lin, Meng Meng, Jingran Xie, Xingchen Song, Baijun Song, Jiahe Shao

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 4 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2604.22225.json · badge: /api/ran/2604.22225.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
xiaomi-research/tts-prism canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
default Ran
ran; our contract draft was wrong, not the code
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/quantization.py
code served (permissive licence) · get_code("1e8f03292b45230b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import typing as tp

def default(val: tp.Any, d: tp.Any) -> tp.Any:
    return val if val is not None else d

ARGS = {
    "val": None,
    "d": "default_value"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
detect_language Ran
ran; our contract draft was wrong, not the code
xiaomi-research/tts-prism/models/mimo_audio/mimo_audio.py
code served (permissive licence) · get_code("0158e6f80adb59c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def detect_language(text):
    if re.search('[\\u4e00-\\u9fff]', text):
        return 'zh'
    else:
        return 'en'

# Setup code
ARGS = {
    'text': 'Hello world'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_sequence_mask Ran
ran; our contract draft was wrong, not the code
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/modeling_audio_tokenizer.py
code served (permissive licence) · get_code("837edcbf0ed7899c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Case 1: inputs is 3D tensor
# The function checks if inputs.dim() == 3, so we need a 3D tensor
# Shape: (batch_size, target_length, feature_dim)
inputs = torch.randn(2, 5, 4)

# inputs_length should be a 1D tensor with batch_size elements
# Each element represents the actual length of sequences in that batch
inputs_length = torch.tensor([3, 5])

ARGS = {
    "inputs": inputs,
    "inputs_length": inputs_length,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
laplace_smoothing Ran
ran, violated the contract we drafted
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/quantization.py
code served (permissive licence) · get_code("c360b5ccff704a88")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - x: needs to support .sum() method, so a tensor or array
# - n_categories: int
# - epsilon: float

# Create a small tensor for x
x = torch.tensor([1.0, 2.0, 3.0, 4.0])

# Define parameters
ARGS = {
    "x": x,
    "n_categories": 4,
    "epsilon": 1e-05
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_scp_file Ran
ran; our contract draft was wrong, not the code
xiaomi-research/tts-prism/inference_diagnostic.py
code served (permissive licence) · get_code("7e96e3bd10244d89")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
import tempfile
from pathlib import Path
from typing import Tuple, List

# Create a temporary directory and scp file for testing
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)

# Create some dummy audio files
audio_file_1 = temp_path / "audio_001.wav"
audio_file_1.touch()

audio_file_2 = temp_path / "audio_002.wav"
audio_file_2.touch()

# Create a valid scp file with entries
scp_file = temp_path / "test.scp"
with open(scp_file, 'w', encoding='utf-8') as f:
    f.write(f"{audio_file_1} this is the first reference text\n")
    f.write(f"{audio_file_2} this is the second reference text\n")
    f.write("\n")  # blank line to test skipping
    f.write(f"{audio_file_1} another reference\n")

ARGS = {
    'scp_path': str(scp_file)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_vectors Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/quantization.py
code served (permissive licence) · get_code("1f512cf5b731fcaa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributed as dist

torch.manual_seed(0)

# Create a small tensor to serve as samples
# Shape: (num_samples, feature_dim) = (5, 4)
samples = torch.randn(5, 4)

# Number of samples to select
num = 3

ARGS = {
    "samples": samples,
    "num": num,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (3, 4) — shape (3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unpack_hidden_states Ran
ran; our contract draft was wrong, not the code
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/modeling_audio_tokenizer.py
code served (permissive licence) · get_code("6ea539f35c9a929f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small test tensors
bsz = 2
tgt_len = 5
hidden_dim = 4

# hidden_states: shape (bsz * tgt_len, hidden_dim) - flattened batch
hidden_states = torch.randn(bsz * tgt_len, hidden_dim)

# lengths: shape (bsz,) - actual length of each sequence in batch
lengths = torch.tensor([3, 4], dtype=torch.long)

# sequence_mask and unpacking_index are optional, set to None to test the path
# where they are computed inside the function
sequence_mask = None
unpacking_index = None

ARGS = {
    "hidden_states": hidden_states,
    "lengths": lengths,
    "sequence_mask": sequence_mask,
    "unpacking_index": unpacking_index,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_rotary_pos_emb Not yet run
unverified (harvested, no recorded run)
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/modeling_rope_utils.py
code served (permissive licence) · get_code("80d3a54eab8134eb")
How it ran

no invocation recorded.

dynamic_rope_update Not yet run
unverified (harvested, no recorded run)
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/modeling_rope_utils.py
code served (permissive licence) · get_code("d2fa04354d9e90db")
How it ran

no invocation recorded.

get_position_ids Not yet run
unverified (harvested, no recorded run)
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/modeling_audio_tokenizer.py
code served (permissive licence) · get_code("1eac8c2f5179d506")
How it ran

no invocation recorded.

rotate_half Not yet run
unverified (harvested, no recorded run)
xiaomi-research/tts-prism/models/mimo_audio_tokenizer/modeling_rope_utils.py
code served (permissive licence) · get_code("bc697b02f78768ac")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 1 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
rotate_half 360 other papers
337 dated earlier, 2 the same month, 18 later, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
laplace_smoothing 4 other papers
4 dated earlier · 1 only as an assembly brick
2306.06546 (2023-06)
High-Fidelity Audio Compression with Improved RVQGAN
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2401.01885 (2024-01)
From Audio to Photoreal Embodiment: Synthesizing Humans in Conversations
and 1 more not named here
default 3 other papers
3 dated earlier · 1 only as an assembly brick
2306.06546 (2023-06)
High-Fidelity Audio Compression with Improved RVQGAN
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2410.15017 (2024-10)
DM-Codec: Distilling Multimodal Representations for Speech Tokenization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

While generative text-to-speech (TTS) models approach humanlevel quality, monolithic metrics fail to diagnose fine-grained acoustic artifacts or explain perceptual collapse. To address this, we propose TTS-PRISM, a multi-dimensional diagnostic framework for Mandarin. First, we establish a 12-dimensional schema spanning stability to advanced expressiveness. Second, we design a targeted synthesis pipeline with adversarial perturbations and expert anchors to build a high-quality diagnostic dataset. Third, schema-driven instruction tuning embeds explicit scoring criteria and reasoning into an efficient end-to-end model. Experiments on a 1,600-sample Gold Test Set show TTS-PRISM outperforms generalist models in human alignment. Profiling six TTS paradigms establishes intuitive diagnostic flags that reveal fine-grained capability differences. TTS-PRISM is open-source, with code and checkpoints at https: //github.com/xiaomi-research/tts-prism.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2604.22225")
get_code_for_paper("2604.22225")
have("2604.22225")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2604.22225.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2604.22225.svg)](https://syntology.ai/paper/2604.22225)

Connect an agent — have() is free.