SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.03538 · 2021

MetricGAN+: An Improved Version of MetricGAN for Speech Enhancement

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; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 1 failure 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/2104.03538.json · badge: /api/ran/2104.03538.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
wooseok-shin/MetricGAN-plus-pytorch community (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
CMOS_normalize Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/metric_functions/compute_metric.py
code served (permissive licence) · get_code("fb683a717c75e052")
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 numpy as np

torch.manual_seed(0)

# CMOS_normalize takes a single parameter x
# The function performs: y = (x - 1.0) / 4
# x should be a numeric value or tensor that supports subtraction and division

# Create a small tensor to use as input
x = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                   [5.0, 6.0, 7.0, 8.0]])

ARGS = {
    'x': x
}
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 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
PESQ_normalize Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/metric_functions/compute_metric.py
code served (permissive licence) · get_code("87b6c8bd6b25280e")
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 ndarray, ndim 1, dtype family float, shape (6,) 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 numpy as np

def PESQ_normalize(x):
    a = -1.5
    b = 2.5
    y = 1 / (1 + np.exp(a * (x - b)))
    return y

# The function takes a single parameter x, which is used in a mathematical operation
# that expects a numeric array-like input. The function computes a sigmoid-like
# normalization using numpy operations.

# Create a small numpy array as input
x_value = np.array([0.5, 1.0, 1.5, 2.0, 2.5, 3.0])

ARGS = {
    "x": x_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (6,) — shape (6,) 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
SSNR Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/metric_functions/metric_helper.py
code served (permissive licence) · get_code("1077627ee114c941")
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 numpy as np

np.random.seed(0)

# Create small audio signals (reference and degraded)
# SSNR expects 1D numpy arrays of audio samples
# Using 16000 Hz sample rate, create ~1 second of audio (16000 samples)
ref_wav = np.random.randn(16000).astype(np.float32)
deg_wav = ref_wav + 0.1 * np.random.randn(16000).astype(np.float32)  # degraded version with noise

ARGS = {
    "ref_wav": ref_wav,
    "deg_wav": deg_wav,
    "srate": 16000,
    "eps": 1e-10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
collate_fn_G Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/dataloader.py
code served (permissive licence) · get_code("3e07e541b703b78b")
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

torch.manual_seed(0)

# Create a batch of tuples matching the expected format:
# (clean_mag, _, noise_mag, _, target_score)
# where clean_mag and noise_mag are tensors with shape (1, T, F) 
# and target_score is a scalar tensor

batch = [
    # First item in batch
    (
        torch.randn(1, 5, 4),      # clean_mag: (1, time_steps=5, freq_bins=4)
        None,                        # placeholder (unused)
        torch.randn(1, 5, 4),       # noise_mag: (1, time_steps=5, freq_bins=4)
        None,                        # placeholder (unused)
        torch.tensor(0.85)           # target_score: scalar
    ),
    # Second item in batch
    (
        torch.randn(1, 3, 4),       # clean_mag: (1, time_steps=3, freq_bins=4)
        None,                        # placeholder (unused)
        torch.randn(1, 3, 4),       # noise_mag: (1, time_steps=3, freq_bins=4)
        None,                        # placeholder (unused)
        torch.tensor(0.92)           # target_score: scalar
    ),
]

ARGS = {
    "batch": batch
}
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
get_spec_and_phase Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/signal_processing.py
code served (permissive licence) · get_code("01ffe2e07304ae79")
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 4, 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 torch

torch.manual_seed(0)

# Create a small audio signal tensor
# The function expects a signal that will be passed to torch.stft
# torch.stft expects input shape (batch, time) or (time,)
# Let's create batch of 2 signals with 2048 samples each (enough for STFT with n_fft=512)
signal = torch.randn(2, 2048)

ARGS = {
    "signal": signal
}
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, ndim 4, 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
lpcoeff Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/metric_functions/metric_helper.py
code served (permissive licence) · get_code("67f3a00cfe3b0711")
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 numpy as np

# The function lpcoeff takes a speech_frame (1D numpy array) and model_order (int)
# speech_frame is used with shape[0] to get window length, then sliced and multiplied
# model_order is used as an integer for range() and array indexing

# Create a small speech frame as a 1D numpy array
speech_frame = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8], dtype=np.float32)

# Set model_order to a small positive integer
model_order = 3

ARGS = {
    "speech_frame": speech_frame,
    "model_order": model_order,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
pad_sequence Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/dataloader.py
code served (permissive licence) · get_code("a8dc14dce213a37b")
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 (5, 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.nn.utils.rnn

torch.manual_seed(0)

# Create a batch of variable-length sequences
# pad_sequence expects a list of tensors with shape (sequence_length, feature_dim)
seq1 = torch.randn(3, 4)  # sequence length 3, feature dim 4
seq2 = torch.randn(5, 4)  # sequence length 5, feature dim 4
seq3 = torch.randn(2, 4)  # sequence length 2, feature dim 4

batch = [seq1, seq2, seq3]

ARGS = {
    "batch": batch
}
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 (5, 3, 4) — shape (5, 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
spectral_magnitude Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/signal_processing.py
code served (permissive licence) · get_code("d08f0cbc110051dd")
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, 3) 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)

# The function expects:
# - stft: a tensor that supports .pow() and .sum() operations
# - power: a numeric value (int or float)
# - log: a boolean
# - eps: a numeric value (float)

# Create a small STFT tensor with shape (batch, freq, time, complex_dim)
# where complex_dim = 2 for real and imaginary parts
stft = torch.randn(2, 4, 3, 2)

ARGS = {
    "stft": stft,
    "power": 1,
    "log": False,
    "eps": 1e-14
}
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, 3) — shape (2, 4, 3) 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
trim_mos Ran
ran on a synthesized input
wooseok-shin/MetricGAN-plus-pytorch/metric_functions/metric_helper.py
code served (permissive licence) · get_code("1f6cd6dc5f0af4e4")
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 float, ndim 0, dtype family float, shape () 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)

ARGS = {
    "val": 3.5
}
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 float, ndim 0, dtype family float, shape () — shape () 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
xavier_init_layer Ran
ran; our contract draft was wrong, not the code
wooseok-shin/MetricGAN-plus-pytorch/model.py
code served (permissive licence) · get_code("77bf89e77ca97f11")
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 Linear. 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
import torch.nn.utils.spectral_norm as spectral_norm

torch.manual_seed(0)

ARGS = {
    "in_size": 4,
    "out_size": 3,
    "spec_norm": True,
    "layer_type": nn.Linear,
    "bias": True,
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
transform_spec_to_wav Not yet run
unverified (harvested, no recorded run)
wooseok-shin/MetricGAN-plus-pytorch/signal_processing.py
code served (permissive licence) · get_code("c0f0679c079fa005")
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, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 10 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
xavier_init_layer 1 other paper
1 later
2312.08979 (2023-12)
Multi-CMGAN+/+: Leveraging Multi-Objective Speech Quality Metric Prediction for Speech Enhancement

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

The discrepancy between the cost function used for training a speech enhancement model and human auditory perception usually makes the quality of enhanced speech unsatisfactory. Objective evaluation metrics which consider human perception can hence serve as a bridge to reduce the gap. Our previously proposed MetricGAN was designed to optimize objective metrics by connecting the metric with a discriminator. Because only the scores of the target evaluation functions are needed during training, the metrics can even be non-differentiable. In this study, we propose a MetricGAN+ in which three training techniques incorporating domain-knowledge of speech processing are proposed. With these techniques, experimental results on the VoiceBank-DEMAND dataset show that MetricGAN+ can increase PESQ score by 0.3 compared to the previous MetricGAN and achieve state-of-the-art results (PESQ score = 3.15).

For agents

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

get_harvested_code_for_paper("2104.03538")
get_code_for_paper("2104.03538")
have("2104.03538")

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

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

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

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

Connect an agent — have() is free.