SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.07556 · 2024

SSR-Speech: Towards Stable, Safe and Robust Zero-shot Text-based Speech Editing and Synthesis

arXiv · PDF · Open in the Atlas

Code that ran

11 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 10 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2409.07556.json · badge: /api/ran/2409.07556.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
WangHelin1997/SSR-Speech canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
extract_spans Ran
ran, honoured the contract we drafted
WangHelin1997/SSR-Speech/edit_utils_en.py
code served (permissive licence) · get_code("c2cfb91b6736887d")
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 int; 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 torch
import numpy as np

torch.manual_seed(0)

# Test case 1: Multiple consecutive positions with same operation
positions = [
    (0, 5, 'add'),
    (5, 10, 'add'),
    (10, 15, 'add'),
    (20, 25, 'remove'),
    (26, 30, 'remove')
]
orig_len = 50

ARGS = {
    'positions': positions,
    'orig_len': orig_len
}
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 list, ndim 2, dtype family int — 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
extract_words Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/edit_utils_en.py
code served (permissive licence) · get_code("296ac616f9d8a69f")
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 1, 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

def extract_words(sentence):
    words = re.findall("\\b[\\w']+\\b", sentence)
    return words

ARGS = {
    "sentence": "Hello, world! This is a test sentence with some words like don't and it's."
}
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 1, 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
get_mask_interval Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/inference_scale.py
code served (permissive licence) · get_code("c7eaebbec27fbbed")
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, ndim 1, 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 tempfile
import os

# Create a temporary CSV file with alignment data
temp_dir = tempfile.mkdtemp()
ali_fn = os.path.join(temp_dir, "alignment.csv")

# Write sample alignment data
with open(ali_fn, 'w') as wf:
    wf.write("start,end,duration,type\n")
    wf.write("0.0,0.5,0.5,words\n")
    wf.write("0.5,1.0,0.5,words\n")
    wf.write("1.0,1.5,0.5,words\n")
    wf.write("1.5,2.0,0.5,words\n")
    wf.write("2.0,2.5,0.5,words\n")

# Define word_span as a tuple (start_index, end_index)
word_span = (1, 3)

ARGS = {
    "ali_fn": ali_fn,
    "word_span": word_span
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_transcribe_state Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/inference_v2.py
code served (permissive licence) · get_code("0dd879188b61fe90")
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 dict. 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
import numpy as np

torch.manual_seed(0)

# Construct segments as expected by get_transcribe_state
# Each segment needs a 'text' key and a 'words' key
segments = [
    {
        'text': 'hello world',
        'words': [
            {'word': 'hello', 'start': 0.0, 'end': 0.5},
            {'word': 'world', 'start': 0.5, 'end': 1.0}
        ]
    },
    {
        'text': 'foo bar',
        'words': [
            {'word': 'foo', 'start': 1.0, 'end': 1.5},
            {'word': 'bar', 'start': 1.5, 'end': 2.0}
        ]
    }
]

ARGS = {
    'segments': segments
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
levenshtein_distance Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/edit_utils_en.py
code served (permissive licence) · get_code("922c92e8fa2727c6")
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.

# Setup code for levenshtein_distance function

# The function takes two string arguments (word1 and word2)
# and computes the Levenshtein distance between them along with
# the operations needed to transform word1 into word2

word1 = "kitten"
word2 = "sitting"

ARGS = {
    "word1": word1,
    "word2": word2,
}
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 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
random_cast_to_half Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/models/modules/scaling.py
code served (permissive licence) · get_code("982b9083b5a41368")
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 (2, 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
from torch import Tensor

torch.manual_seed(0)

# Create a small floating point tensor with mixed magnitudes
# Some values above min_abs threshold, some below
x = torch.tensor([
    [1e-5, 1e-4, 0.5, -0.3],
    [1e-7, 2e-6, -0.1, 0.2]
], dtype=torch.float32)

ARGS = {
    "x": x,
    "min_abs": 5e-06
}
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 (2, 4) — shape (2, 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
random_clamp Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/models/modules/scaling.py
code served (permissive licence) · get_code("1d72f492e19080e6")
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 (2, 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.nn as nn

torch.manual_seed(0)

# Create a small tensor for the function to operate on
# Shape: (2, 4) - batch size 2, feature dimension 4
x = torch.randn(2, 4, requires_grad=True)

# Define arguments for random_clamp function
ARGS = {
    'x': x,
    'min': -1.0,
    'max': 1.0,
    'prob': 0.5,
    'reflect': 0.1
}
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 (2, 4) — shape (2, 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
softmax Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/models/modules/scaling.py
code served (permissive licence) · get_code("c124aa8bd6b9ebe9")
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 (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import Tensor

torch.manual_seed(0)

# Create a small tensor for softmax computation
# Using shape (2, 4) - batch size 2, dimension 4
x = torch.randn(2, 4, dtype=torch.float32)

# The dim parameter specifies which dimension to apply softmax over
dim = 1

# Map all parameters of the softmax function to their values
ARGS = {
    "x": x,
    "dim": dim,
}
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 (2, 4) — shape (2, 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
top_k_top_p_filtering Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
WangHelin1997/SSR-Speech/models/ssr.py
code served (permissive licence) · get_code("99a311d99448f881")
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 (2, 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.nn.functional as F

torch.manual_seed(0)

# Create small logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "top_k": 2,
    "top_p": 0.9,
    "filter_value": -float('Inf'),
    "min_tokens_to_keep": 1,
}
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 (2, 4) — shape (2, 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
topk_sampling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
WangHelin1997/SSR-Speech/models/ssr.py
code served (permissive licence) · get_code("fb8e21d446dcf26f")
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 int, shape (2, 1) 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.nn.functional as F

torch.manual_seed(0)

# Create tiny logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

ARGS = {
    'logits': logits,
    'top_k': 2,
    'top_p': 0.9,
    'temperature': 1.0
}
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 int, shape (2, 1) — shape (2, 1) 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
transcribe Ran
ran; our contract draft was wrong, not the code
WangHelin1997/SSR-Speech/inference_v2.py
code served (permissive licence) · get_code("dc3571b4c872f039")
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
import torch.nn as nn


class MockTranscribeModel(nn.Module):
    """Stand-in transcribe model that implements the transcribe method."""
    
    def __init__(self):
        super().__init__()
    
    def transcribe(self, audio_path):
        """Return segments with the expected structure."""
        segments = [
            {
                'text': ' hello',
                'words': [
                    {'word': 'hello', 'start': 0.0, 'end': 0.5}
                ]
            },
            {
                'text': ' world',
                'words': [
                    {'word': 'world', 'start': 0.5, 'end': 1.0}
                ]
            }
        ]
        return segments


torch.manual_seed(0)

transcribe_model = MockTranscribeModel()
audio_path = "dummy_audio.wav"

ARGS = {
    'audio_path': audio_path,
    'transcribe_model': transcribe_model
}
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

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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 1 later) and 6 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
top_k_top_p_filtering 21 other papers
16 dated earlier, 2 the same month, 3 later
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
2009.06367 (2020-09)
GeDi: Generative Discriminator Guided Sequence Generation
and 18 more not named here
topk_sampling 4 other papers
3 dated earlier, 1 the same month
2301.02111 (2023-01)
Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
2403.16973 (2024-03)
VoiceCraft: Zero-Shot Speech Editing and Text-to-Speech in the Wild
and 1 more not named here
random_cast_to_half 3 other papers
3 dated earlier
2301.02111 (2023-01)
Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers
2303.03926 (2023-03)
Speak Foreign Languages with Your Own Voice: Cross-Lingual Neural Codec Language Modeling
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
random_clamp 3 other papers
3 dated earlier
2301.02111 (2023-01)
Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers
2303.03926 (2023-03)
Speak Foreign Languages with Your Own Voice: Cross-Lingual Neural Codec Language Modeling
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
softmax 3 other papers
3 dated earlier
2301.02111 (2023-01)
Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers
2303.03926 (2023-03)
Speak Foreign Languages with Your Own Voice: Cross-Lingual Neural Codec Language Modeling
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS

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-22.

Repositories linked to this paper

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

Abstract

In this paper, we introduce SSR-Speech, a neural codec autoregressive model designed for stable, safe, and robust zero-shot textbased speech editing and text-to-speech synthesis. SSR-Speech is built on a Transformer decoder and incorporates classifier-free guidance to enhance the stability of the generation process. A watermark Encodec is proposed to embed frame-level watermarks into the edited regions of the speech so that which parts were edited can be detected. In addition, the waveform reconstruction leverages the original unedited speech segments, providing superior recovery compared to the Encodec model. Our approach achieves state-of-the-art performance in the RealEdit speech editing task and the LibriTTS text-to-speech task, surpassing previous methods. Furthermore, SSR-Speech excels in multi-span speech editing and also demonstrates remarkable robustness to background sounds. The source code and demos are released.

For agents

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

get_harvested_code_for_paper("2409.07556")
get_code_for_paper("2409.07556")
have("2409.07556")

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

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

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

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

Connect an agent — have() is free.