SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.08135 · 2017

An embedded segmental K-means model for unsupervised segmentation and clustering of speech

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 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 0 have no contract verdict; 13 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/1703.08135.json · badge: /api/ran/1703.08135.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
kamperh/eskmeans canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
kamperh/bucktsong_eskmeans community (classifier label)
classifier basis not recorded on the link
10 ran · 2 no recorded run
FunctionStatusWhere it lives
average_precision Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kamperh/bucktsong_eskmeans/downsample/samediff.py
code served (permissive licence) · get_code("9acae200c1954ee9")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create sample positive distances (distances between matching pairs)
# These should be small values indicating similarity
pos_distances = np.array([0.1, 0.2, 0.3, 0.15])

# Create sample negative distances (distances between non-matching pairs)
# These should be larger values indicating dissimilarity
neg_distances = np.array([0.8, 0.9, 0.7, 0.85, 0.6])

ARGS = {
    "pos_distances": pos_distances,
    "neg_distances": neg_distances,
    "show_plot": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — 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
downsample_utterance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kamperh/bucktsong_eskmeans/downsample/downsample_dense.py
code served (permissive licence) · get_code("744a7b79ce29df7b")
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 2, dtype family float, shape (3, 20) 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
import scipy.signal as signal

# Set seed for reproducibility
np.random.seed(0)

# Create sample features matrix: 10 time steps x 4 feature dimensions
features = np.random.randn(10, 4).astype(np.float32)

# Create seglist with (start_idx, end_idx) tuples
# Each tuple defines a segment of the features to downsample
seglist = [(0, 3), (4, 7), (5, 9)]

# Target number of samples for resampling
n = 5

ARGS = {
    "features": features,
    "seglist": seglist,
    "n": n,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 20) — shape (3, 20) 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
extract_vad Ran
ran; our contract draft was wrong, not the code
kamperh/bucktsong_eskmeans/features/features.py
code served (permissive licence) · get_code("f42377be880d15f6")
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 feat_dict: maps utterance keys to feature tensors (frames x features)
# Each tensor has shape (num_frames, feature_dim)
feat_dict = {
    'utt_001': torch.randn(10, 4),  # 10 frames, 4 features
    'utt_002': torch.randn(8, 4),   # 8 frames, 4 features
    'utt_003': torch.randn(6, 4),   # 6 frames, 4 features
}

# Construct vad_dict: maps utterance keys to lists of (start, end) tuples
# representing active speech regions (end is excluded)
vad_dict = {
    'utt_001': [(1, 5), (6, 9)],  # Two active regions in utt_001
    'utt_002': [(0, 3), (4, 7)],  # Two active regions in utt_002
    'utt_003': [(2, 5)],          # One active region in utt_003
}

ARGS = {
    'feat_dict': feat_dict,
    'vad_dict': vad_dict,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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
forward_backward_kmeans_viterbi Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kamperh/eskmeans/eskmeans/eskmeans_wordseg.py
pointer only (licence: GPL-3.0) · get_code("49bb6e6331d17d66")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, kamperh/eskmeans, is not in the permissive set Syntology serves inline. 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.

generate_matches_array Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kamperh/bucktsong_eskmeans/downsample/samediff.py
code served (permissive licence) · get_code("76167a80296f74b2")
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 (15,) 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

# The function takes labels as input
# labels should be an array-like of values that can be compared with ==
# Let's create a simple labels array with some matching and non-matching elements
labels = np.array([0, 1, 0, 2, 1, 0])

ARGS = {
    "labels": labels
}
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 (15,) — shape (15,) 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
get_durations_dict Ran
ran; our contract draft was wrong, not the code
kamperh/bucktsong_eskmeans/segmentation/get_data_downsample.py
code served (permissive licence) · get_code("bd4d693115d65d6a")
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 numpy as np

# Analyze the function:
# - landmarks_dict: dict where keys are utterance IDs (strings) and values are lists of integers
# - n_landmarks_max: an integer (appears to be unused in the function body)
# - The function iterates over landmarks_dict, prepends 0 to each landmarks list,
#   computes pairwise differences, and stores them in a durations array

# Create a simple landmarks_dict with a couple utterances
landmarks_dict = {
    'utt_001': [100, 250, 400, 550],
    'utt_002': [150, 300, 450]
}

# n_landmarks_max is not used in the function body, but we need to provide it
n_landmarks_max = 10

ARGS = {
    'landmarks_dict': landmarks_dict,
    'n_landmarks_max': n_landmarks_max
}
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 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
get_seglist_from_landmarks Ran
ran; our contract draft was wrong, not the code
kamperh/bucktsong_eskmeans/downsample/get_seglist.py
code served (permissive licence) · get_code("e263a5f1a087512f")
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)

# Analyze the function:
# - landmarks: used with len(), indexed with [i:i + n_landmarks_max], iterated over with "for j in landmarks[...]"
# - n_landmarks_max: used as an integer in slicing
# The function expects landmarks to be a sequence (list, array, or tensor) of numeric values
# It creates tuples of (prev_landmark, j) where both are individual landmark values

# Create a simple list of landmark indices
landmarks = [0, 5, 10, 15, 20]
n_landmarks_max = 6

ARGS = {
    "landmarks": landmarks,
    "n_landmarks_max": n_landmarks_max
}
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
get_vec_ids_dict Ran
ran; our contract draft was wrong, not the code
kamperh/bucktsong_eskmeans/segmentation/get_data_downsample.py
code served (permissive licence) · get_code("c03ab624cd19df94")
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 numpy as np

# Analyze the function:
# - lengths_dict: a dict mapping utterance identifiers to integers (n_slices)
# - n_landmarks_max: an integer used to limit the range of cur_end

# Create a small lengths_dict with a few utterances and different slice counts
lengths_dict = {
    'utt_1': 3,
    'utt_2': 4,
    'utt_3': 2
}

# n_landmarks_max should be a positive integer that limits landmark ranges
n_landmarks_max = 2

ARGS = {
    'lengths_dict': lengths_dict,
    'n_landmarks_max': n_landmarks_max
}
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 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
local_segment_only_utts Ran
ran; our contract draft was wrong, not the code
kamperh/eskmeans/eskmeans/eskmeans_wordseg.py
pointer only (licence: GPL-3.0) · get_code("5d35604b2fba6f41")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, kamperh/eskmeans, is not in the permissive set Syntology serves inline. 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.

process_embeddings Ran
ran; our contract draft was wrong, not the code
kamperh/eskmeans/eskmeans/eskmeans_wordseg.py
pointer only (licence: GPL-3.0) · get_code("3c99df048b9ea79d")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, kamperh/eskmeans, is not in the permissive set Syntology serves inline. 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.

read_vad_from_fa Ran
ran; our contract draft was wrong, not the code
kamperh/bucktsong_eskmeans/features/utils.py
code served (permissive licence) · get_code("fa13b362a551768b")
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 tempfile
import os

# Create a temporary forced alignment file with valid content
temp_fa_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
fa_content = """speaker1_utt001 0.0 0.5 a
speaker1_utt001 0.5 1.0 b
speaker1_utt001 1.0 1.5 SIL
speaker1_utt001 1.5 2.0 c
speaker2_utt002 0.0 0.3 x
speaker2_utt002 0.3 0.6 SPN
speaker2_utt002 0.6 0.9 y
nchlt_lang_speaker3_utt003 0.0 0.4 m
nchlt_lang_speaker3_utt003 0.4 0.8 n
"""
temp_fa_file.write(fa_content)
temp_fa_file.close()

fa_fn = temp_fa_file.name

ARGS = {
    'fa_fn': fa_fn,
    'frame_indices': True,
}

# Cleanup will happen after function execution
import atexit
atexit.register(lambda: os.unlink(fa_fn))
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 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
strip_nonvad Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kamperh/bucktsong_eskmeans/features/utils.py
code served (permissive licence) · get_code("38722d202e76b2cb")
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 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 numpy as np

# strip_nonvad parameters:
# - utt: appears to be an identifier/label (string or int), used only as a return value context
# - start: int, the start index
# - end: int, the end index
# - vads: list of tuples/lists, each containing (vad_start, vad_end)

utt = "utterance_1"
start = 10
end = 30
vads = [
    (5, 15),      # VAD region 1: overlaps with [10, 30)
    (25, 40),     # VAD region 2: overlaps with [10, 30)
    (50, 60),     # VAD region 3: no overlap
]

ARGS = {
    "utt": utt,
    "start": start,
    "end": end,
    "vads": vads,
}
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, ndim 1, dtype family int — 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
uttlabel_to_uttkey Ran
ran; our contract draft was wrong, not the code
kamperh/bucktsong_eskmeans/features/utils.py
code served (permissive licence) · get_code("eaa884c8ef9ed624")
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.

# Analyze the function: it takes an 'utterance' parameter (a string)
# and performs string operations on it based on whether it starts with 'nchlt'

# Test case 1: utterance starting with 'nchlt'
utterance_nchlt = 'nchlt_lang_speaker_001_seg1'

# Test case 2: utterance not starting with 'nchlt'
utterance_other = 'xyz_utterance_data'

# The function only uses string methods on the utterance parameter
# We'll provide a valid utterance string

ARGS = {
    'utterance': 'nchlt_lang_speaker_001_seg1'
}
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_tokens_from_fa Not yet run
unverified (harvested, no recorded run)
kamperh/bucktsong_eskmeans/segmentation/get_data_downsample.py
code served (permissive licence) · get_code("0bfe2243a58f7b18")
How it ran

no invocation recorded.

mean_average_precision Not yet run
unverified (harvested, no recorded run)
kamperh/bucktsong_eskmeans/downsample/samediff.py
code served (permissive licence) · get_code("e09ac618a9f85288")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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.

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

Unsupervised segmentation and clustering of unlabelled speech are core problems in zero-resource speech processing. Most approaches lie at methodological extremes: some use probabilistic Bayesian models with convergence guarantees, while others opt for more efficient heuristic techniques. Despite competitive performance in previous work, the full Bayesian approach is difficult to scale to large speech corpora. We introduce an approximation to a recent Bayesian model that still has a clear objective function but improves efficiency by using hard clustering and segmentation rather than full Bayesian inference. Like its Bayesian counterpart, this embedded segmental K-means model (ES-KMeans) represents arbitrary-length word segments as fixed-dimensional acoustic word embeddings. We first compare ES-KMeans to previous approaches on common English and Xitsonga data sets (5 and 2.5 hours of speech): ES-KMeans outperforms a leading heuristic method in word segmentation, giving similar scores to the Bayesian model while being 5 times faster with fewer hyperparameters. However, its clusters are less pure than those of the other models. We then show that ES-KMeans scales to larger corpora by applying it to the 5 languages of the Zero Resource Speech Challenge 2017 (up to 45 hours), where it performs competitively compared to the challenge baseline.

For agents

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

get_harvested_code_for_paper("1703.08135")
get_code_for_paper("1703.08135")
have("1703.08135")

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

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

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

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

Connect an agent — have() is free.