SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.05248 · 2023

Enhancing Speaker Diarization with Large Language Models: A Contextual Beam Search Approach

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 failures of our instrument; 1 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/2309.05248.json · badge: /api/ran/2309.05248.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
tango4j/llm_speaker_tagging community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
add_placeholder_speaker_softmax Ran
ran on a synthesized input
tango4j/llm_speaker_tagging/beam_search_utils.py
code served (permissive licence) · get_code("4d1579a6e3fd7867")
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
import copy

# Construct a minimal json_trans_list that the function expects
json_trans_list = [
    {
        'speaker': 'speaker_1',
        'words': 'hello world this is a test'
    },
    {
        'speaker': 'speaker_2',
        'words': 'goodbye world'
    },
    {
        'speaker': 'speaker_1',
        'words': 'one more sentence'
    }
]

ARGS = {
    'json_trans_list': json_trans_list,
    'peak_prob': 0.94,
    'max_spks': 4
}
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
count_num_of_spks Ran
ran on a synthesized input
tango4j/llm_speaker_tagging/beam_search_utils.py
code served (permissive licence) · get_code("bfe24aba2d5ea13c")
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

# Analyze the function: count_num_of_spks takes json_trans_list
# It iterates through json_trans_list and accesses sentence_dict['speaker']
# So json_trans_list should be a list of dicts, each with a 'speaker' key

json_trans_list = [
    {'speaker': 'speaker_1', 'text': 'hello world'},
    {'speaker': 'speaker_2', 'text': 'hi there'},
    {'speaker': 'speaker_1', 'text': 'how are you'},
]

ARGS = {
    'json_trans_list': json_trans_list
}
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
optuna_suggest_params Ran
ran on a synthesized input
tango4j/llm_speaker_tagging/hyper_optim.py
code served (permissive licence) · get_code("d86ac2ddacbbd6b5")
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 ConfigStandIn. 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 optuna
from unittest.mock import MagicMock

class ConfigStandIn:
    """Minimal config object that can have attributes set dynamically."""
    pass

# Create a mock trial object that implements the suggest_* methods
trial = MagicMock()
trial.suggest_float = MagicMock(side_effect=lambda name, low, high: (low + high) / 2)
trial.suggest_int = MagicMock(side_effect=lambda name, low, high, step=1: low)

# Create a config object
cfg = ConfigStandIn()

ARGS = {
    'cfg': cfg,
    'trial': trial,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
optuna — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ConfigStandIn — a ConfigStandIn output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ConfigStandIn 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
process_session_data Ran
ran on a synthesized input
tango4j/llm_speaker_tagging/speaker_tagging_cpwer_jsons.py
code served (permissive licence) · get_code("e2d5bb1e27b5bc6c")
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 json
import tempfile
import os

# Create temporary JSON files with valid session data
temp_dir = tempfile.mkdtemp()

# Create hypothesis sessions data
hyp_sessions = {
    "session_001": {"error_rate": 0.15},
    "session_002": {"error_rate": 0.08},
    "session_003": {"error_rate": 0.22}
}

# Create source sessions data (with some higher error rates to show improvement)
src_sessions = {
    "session_001": {"error_rate": 0.20},
    "session_002": {"error_rate": 0.12},
    "session_003": {"error_rate": 0.18}
}

# Write hypothesis JSON file
hyp_json_path = os.path.join(temp_dir, "hyp.json")
with open(hyp_json_path, 'w') as f:
    json.dump(hyp_sessions, f)

# Write source JSON file
src_json_path = os.path.join(temp_dir, "src.json")
with open(src_json_path, 'w') as f:
    json.dump(src_sessions, f)

ARGS = {
    "hyp_json_path": hyp_json_path,
    "src_json_path": src_json_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 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
run_mp_beam_search_decoding Not yet run
unverified (harvested, no recorded run)
tango4j/llm_speaker_tagging/beam_search_utils.py
code served (permissive licence) · get_code("bd3015ecb7bf80c1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 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

Large language models (LLMs) have shown great promise for capturing contextual information in natural language processing tasks. We propose a novel approach to speaker diarization that incorporates the prowess of LLMs to exploit contextual cues in human dialogues. Our method builds upon an acoustic-based speaker diarization system by adding lexical information from an LLM in the inference stage. We model the multi-modal decoding process probabilistically and perform joint acoustic and lexical beam search to incorporate cues from both modalities: audio and text. Our experiments demonstrate that infusing lexical knowledge from the LLM into an acoustics-only diarization system improves overall speaker-attributed word error rate (SA-WER). The experimental results show that LLMs can provide complementary information to acoustic models for the speaker diarization task via proposed beam search decoding approach showing up to 39.8% relative delta-SA-WER improvement from the baseline system. Thus, we substantiate that the proposed technique is able to exploit contextual information that is inaccessible to acoustics-only systems which is represented by speaker embeddings. In addition, these findings point to the potential of using LLMs to improve speaker diarization and other speech processing tasks by capturing semantic and contextual cues.

For agents

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

get_harvested_code_for_paper("2309.05248")
get_code_for_paper("2309.05248")
have("2309.05248")

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

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

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

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

Connect an agent — have() is free.