SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.15439 · 2022

StyleTTS: A Style-Based Generative Model for Natural and Diverse Text-to-Speech Synthesis

arXiv · PDF · Open in the Atlas

Code that ran

10 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; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 1 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/2205.15439.json · badge: /api/ran/2205.15439.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
yl4579/StyleTTS canonical (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
build_optimizer Ran
ran; our contract draft was wrong, not the code
yl4579/StyleTTS/optimizers.py
code served (permissive licence) · get_code("f5f1bd6b9f51a9f0")
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 MultiOptimizer. 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
from torch.optim import AdamW

torch.manual_seed(0)

# Create small neural network modules for parameter groups
class SmallModel1(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class SmallModel2(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate models
model1 = SmallModel1()
model2 = SmallModel2()

# Create parameter dictionaries for each optimizer
parameters_dict = {
    'optimizer1': model1.parameters(),
    'optimizer2': model2.parameters(),
}

# Create scheduler parameters dictionary
scheduler_params_dict = {
    'optimizer1': {
        'max_lr': 0.0002,
        'epochs': 10,
        'steps_per_epoch': 100,
        'pct_start': 0.1,
    },
    'optimizer2': {
        'max_lr': 0.0001,
        'epochs': 10,
        'steps_per_epoch': 100,
        'pct_start': 0.05,
    },
}

ARGS = {
    'parameters_dict': parameters_dict,
    'scheduler_params_dict': scheduler_params_dict,
}
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 MultiOptimizer — a MultiOptimizer output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiOptimizer 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
define_scheduler Ran
ran; our contract draft was wrong, not the code
yl4579/StyleTTS/optimizers.py
code served (permissive licence) · get_code("6e710fd26220eb49")
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 OneCycleLR. 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

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Create params dictionary with all the parameters that OneCycleLR expects
params = {
    'max_lr': 0.1,
    'epochs': 200,
    'steps_per_epoch': 1000,
    'pct_start': 0.3
}

ARGS = {
    'optimizer': optimizer,
    'params': params
}
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 OneCycleLR — a OneCycleLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OneCycleLR 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
discriminator_loss Ran
ran; our contract draft was wrong, not the code
yl4579/StyleTTS/Demo/hifi-gan/vocoder.py
pointer only (licence: MIT); the stored copy get_code serves, from zjzser/wmcodec, is pointer only (licence: NONE) · get_code("7137577cbef51217")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zjzser/wmcodec, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

feature_loss Ran
ran, honoured the contract we drafted
yl4579/StyleTTS/Demo/hifi-gan/vocoder.py
pointer only (licence: MIT); the stored copy get_code serves, from zjzser/wmcodec, is pointer only (licence: NONE) · get_code("e453b51f0ed5fb28")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zjzser/wmcodec, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generator_loss Ran
ran; our contract draft was wrong, not the code
yl4579/StyleTTS/Demo/hifi-gan/vocoder.py
pointer only (licence: MIT); the stored copy get_code serves, from zjzser/wmcodec, is pointer only (licence: NONE) · get_code("1a9d74439d969cfd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zjzser/wmcodec, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_data_path_list Ran
ran on a synthesized input
yl4579/StyleTTS/utils.py
code served (permissive licence) · get_code("ce873dd11c39f49d")
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 tempfile
import os

# Create temporary directory and files for testing
temp_dir = tempfile.mkdtemp()
train_path = os.path.join(temp_dir, 'train_list.txt')
val_path = os.path.join(temp_dir, 'val_list.txt')

# Write some sample data to the temporary files
with open(train_path, 'w', encoding='utf-8') as f:
    f.write('train_sample_1.jpg\n')
    f.write('train_sample_2.jpg\n')
    f.write('train_sample_3.jpg\n')

with open(val_path, 'w', encoding='utf-8') as f:
    f.write('val_sample_1.jpg\n')
    f.write('val_sample_2.jpg\n')

ARGS = {
    'train_path': train_path,
    'val_path': val_path,
}
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
get_padding Ran
ran, honoured the contract we drafted
yl4579/StyleTTS/Demo/hifi-gan/vocoder_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from isletennos/mmvc_trainer, is pointer only (licence: NONE) · get_code("a26f85d7c72ef39a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from isletennos/mmvc_trainer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

length_to_mask Ran
ran on a synthesized input
yl4579/StyleTTS/utils.py
code served (permissive licence) · get_code("c992f7522596af60")
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, 5) 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 a small tensor of lengths
# The function expects a 1D tensor of integer lengths
lengths = torch.tensor([3, 5], dtype=torch.long)

ARGS = {
    "lengths": lengths
}
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, 5) — shape (2, 5) 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
load_checkpoint Ran
ran; our contract draft was wrong, not the code
yl4579/StyleTTS/Demo/hifi-gan/vocoder_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from zjzser/traceablespeech, is pointer only (licence: NONE) · get_code("19c9fe23dc000c61")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zjzser/traceablespeech, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

plot_spectrogram Ran
ran; our contract draft was wrong, not the code
yl4579/StyleTTS/Demo/hifi-gan/vocoder_utils.py
code served (permissive licence) · get_code("8520e6e61b8bf789")
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 Figure. 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
import matplotlib.pyplot as plt

torch.manual_seed(0)

# Create a small spectrogram-like 2D array
# Spectrograms are typically (frequency_bins, time_steps)
spectrogram = np.random.randn(4, 3)

ARGS = {
    "spectrogram": spectrogram
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
build_model Not yet run
unverified (harvested, no recorded run)
yl4579/StyleTTS/models.py
code served (permissive licence) · get_code("c7a858f0649cb08a")
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, 9 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 9 later) and 2 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
get_padding 53 other papers
15 dated earlier, 37 later, 1 undated · 4 only as an assembly brick
1910.10838 (2019-10)
Zero-Shot Multi-Speaker Text-To-Speech with State-of-the-art Neural Speaker Embeddings
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2006.06873 (2020-06)
FastPitch: Parallel Text-to-speech with Pitch Prediction
and 50 more not named here
feature_loss 15 other papers
7 dated earlier, 8 later
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2106.07889 (2021-06)
UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation
and 12 more not named here
discriminator_loss 13 other papers
5 dated earlier, 8 later
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2106.07889 (2021-06)
UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation
2109.13821 (2021-09)
Diffusion-Based Voice Conversion with Fast Maximum Likelihood Sampling Scheme
and 10 more not named here
generator_loss 13 other papers
6 dated earlier, 7 later
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2106.06103 (2021-06)
Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech
2106.07889 (2021-06)
UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation
and 10 more not named here
load_checkpoint 13 other papers
4 dated earlier, 9 later
2010.05646 (2020-10)
HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis
2106.07889 (2021-06)
UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation
2203.02395 (2022-03)
iSTFTNet: Fast and Lightweight Mel-Spectrogram Vocoder Incorporating Inverse Short-Time Fourier Transform
and 10 more not named here
plot_spectrogram 7 other papers
4 dated earlier, 3 later
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2106.07889 (2021-06)
UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation
2203.02395 (2022-03)
iSTFTNet: Fast and Lightweight Mel-Spectrogram Vocoder Incorporating Inverse Short-Time Fourier Transform
and 4 more not named here
build_optimizer 4 other papers
1 dated earlier, 3 later
2107.10394 (2021-07)
StarGANv2-VC: A Diverse, Unsupervised, Non-parallel Framework for Natural-Sounding Voice Conversion
2212.14227 (2022-12)
StyleTTS-VC: One-Shot Voice Conversion by Knowledge Transfer from Style-Based TTS Models
2309.07586 (2023-09)
Emo-StarGAN: A Semi-Supervised Any-to-Many Non-Parallel Emotion-Preserving Voice Conversion
and 1 more not named here
define_scheduler 4 other papers
1 dated earlier, 3 later
2107.10394 (2021-07)
StarGANv2-VC: A Diverse, Unsupervised, Non-parallel Framework for Natural-Sounding Voice Conversion
2212.14227 (2022-12)
StyleTTS-VC: One-Shot Voice Conversion by Knowledge Transfer from Style-Based TTS Models
2309.07586 (2023-09)
Emo-StarGAN: A Semi-Supervised Any-to-Many Non-Parallel Emotion-Preserving Voice Conversion
and 1 more not named here
length_to_mask 2 other papers
2 later
2212.14227 (2022-12)
StyleTTS-VC: One-Shot Voice Conversion by Knowledge Transfer from Style-Based TTS Models
2301.08810 (2023-01)
Phoneme-Level BERT for Enhanced Prosody of Text-to-Speech with Grapheme Predictions

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

Text-to-Speech (TTS) has recently seen great progress in synthesizing high-quality speech owing to the rapid development of parallel TTS systems, but producing speech with naturalistic prosodic variations, speaking styles and emotional tones remains challenging. Moreover, since duration and speech are generated separately, parallel TTS models still have problems finding the best monotonic alignments that are crucial for naturalistic speech synthesis. Here, we propose StyleTTS, a style-based generative model for parallel TTS that can synthesize diverse speech with natural prosody from a reference speech utterance. With novel Transferable Monotonic Aligner (TMA) and duration-invariant data augmentation schemes, our method significantly outperforms state-of-the-art models on both single and multi-speaker datasets in subjective tests of speech naturalness and speaker similarity. Through self-supervised learning of the speaking styles, our model can synthesize speech with the same prosodic and emotional tone as any given reference speech without the need for explicitly labeling these categories.

For agents

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

get_harvested_code_for_paper("2205.15439")
get_code_for_paper("2205.15439")
have("2205.15439")

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

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

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

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

Connect an agent — have() is free.