[!NOTE] The OpenBench code is licensed under the MIT License. However, please note that:
- SpeakerKit CLI and other integrated systems have their own licenses that apply
- The datasets used in this benchmark have their own licenses and usage restrictions (see Diarization Datasets section for details)
[!IMPORTANT] OpenBench is the evolution of SDBench, originally introduced in the paper "SDBench: A Comprehensive Benchmark Suite for Speaker Diarization". While SDBench focused specifically on speaker diarization, OpenBench has expanded to encompass a broader range of speech processing tasks and is designed to accommodate future modalities beyond speech.
OpenBench is an open-source benchmarking framework for speech processing systems. Originally focused on speaker diarization (as SDBench), the framework has evolved to support comprehensive evaluation of:
The primary objective is to promote standardized, reproducible, and continuous evaluation of open-source and proprietary speech processing systems across on-device and server-side implementations.
Key features include:
pyannote standard metric implementationshydraWeights & Biases logging[!TIP] Want to add your own diarization, ASR, or orchestration pipeline? Check out our Adding a New Diarization Pipeline section for a step-by-step guide!
[!IMPORTANT] Before getting started, please note that some datasets in our Datasets section require special access or have license restrictions. While we provide dataset preparation utilities in
common/download_dataset, you'll need to procure the raw data independently for these datasets. See the dataset table for details on access requirements.
For comprehensive benchmark results across all supported tasks, please see BENCHMARKS.md.
If you want to reproduce SpeakerKit benchmark values please contact to get access to a CLI and an api-key speakerkitpro@argmaxinc.com.
If you already have access please update the speakerkit.yaml and follow the rest of instructions to setup the environment and run evals
In order to get started, first make sure you have uv installed. The official documentation has instructions for how to install the uv CLI.
If you already have uv installed you can run make setup to install the dependencies and set up the environment.
If you use conda or venv directly to manage your python environment you can install uv with pip install uv and then run make setup to install the dependencies.
Example with conda:
conda create -n <your-env-name> python=3.11
conda activate <your-env-name>
pip install uv
make setup
Alternatively, you can use uv directly to manage the environment:
# Install dependencies and create virtual environment
uv sync
# Activate the environment (if needed)
source .venv/bin/activate # On macOS/Linux
# or
.venv\Scripts\activate # On Windows
OpenBench provides a powerful command-line interface for easy interaction with the benchmarking framework. The CLI offers three main commands for different use cases:
evaluate - Run Benchmark EvaluationsRun comprehensive evaluations of your pipelines on datasets with configurable metrics.
# Evaluate using pipeline and dataset aliases
openbench-cli evaluate \
--pipeline pyannote \
--dataset voxconverse \
--metrics der \
--metrics jer \
--use-wandb \
--wandb-project my-evaluation
# Evaluate using a configuration file
openbench-cli evaluate \
--evaluation-config config/my_evaluation.yaml \
--evaluation-config-overrides wandb.project=my-project
# Get help and see available options
openbench-cli evaluate --help
inference - Run Single Audio InferenceTest your pipeline on individual audio files for quick validation.
# Run inference on a single audio file
openbench-cli inference \
--pipeline pyannote \
--audio-path path/to/audio.wav \
--output-path path/to/output.json
# Run inference with custom configuration
openbench-cli inference \
--pipeline pyannote \
--audio-path path/to/audio.wav \
--pipeline-config '{"min_speakers": 2, "max_speakers": 5}'
summary - Explore Available ResourcesGet an overview of all available pipelines, datasets, metrics, and their compatibility.
# Show all available pipelines, datasets, and metrics
openbench-cli summary
# Show only pipelines
openbench-cli summary --disable-datasets --disable-metrics --disable-compatibility
# Show only compatibility matrix
openbench-cli summary --disable-pipelines --disable-datasets --disable-metrics
# Get detailed information
openbench-cli summary --verbose
pyannote, aws-diarization, whisperx instead of class namesvoxconverse, earnings21der, jer, werSome pipelines require specific environment variables to be set:
# AWS Transcribe
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
# Pyannote API
export PYANNOTE_API_KEY="your-api-key"
# SpeakerKit (contact speakerkitpro@argmaxinc.com for access)
export SPEAKERKIT_CLI_PATH="/path/to/speakerkit/cli"
export SPEAKERKIT_API_KEY="your-api-key"
# Other API-based pipelines
export PICOVOICE_API_KEY="your-api-key"
export DEEPGRAM_API_KEY="your-api-key"
export FIREWORKS_API_KEY="your-api-key"
export GLADIA_API_KEY="your-api-key"
export OPENAI_API_KEY="your-api-key"
For more details about pipeline requirements, run openbench-cli summary to see the full list of available pipelines and their descriptions.
OpenBench supports different types of pipelines (Diarization, Transcription, Orchestration, and Streaming Transcription) with specific dataset schemas for each task type.
The benchmark suite uses several speaker diarization datasets that are stored on the HuggingFace Hub. You can find all the datasets used in our evaluation in this collection. The datasets available in the aforementioned collection are:
| Dataset Name | Out-of-the-box | License | How to Access |
|---|---|---|---|
| earnings21 | β | CC BY-SA 4.0 | Provided |
| msdwild | β | MSDWild License Agreement | Use common/download_dataset.py script |
| icsi-meetings | β | CC BY 4.0 | Provided |
| aishell-4 | β | CC BY-SA 4.0 | Provided |
| ali-meetings | β | CC BY-SA 4.0 | Provided |
| voxconverse | β | CC BY 4.0 | Provided |
| ava-avd | β | MIT | Provided |
| ami-sdm | β | CC BY 4.0 | Provided |
| ami-ihm | β | CC BY 4.0 | Provided |
| american-life-podcast | β | Not disclosed | Use common/download_dataset.py script |
| dihard-III | β | LDC License Agreement | Request access to LDC and use common/download_dataset.py script to parse |
| callhome | β | LDC License Agreement | Request access to LDC and use common/download_dataset.py script to parse |
| ego-4d | β | Ego4D License Agreement | Request access to Ego4D and use common/download_dataset.py script to parse |
For other pipeline types, additional dataset collections are available:
From these datasets voxconverse and ami are not present as download options as they were already present in the HuggingFace Hub uploaded by diarizers-community.
Note: You can use openbench-cli summary to see all available pre-registered datasets and their compatibility with different pipeline types.
OpenBench supports different pipeline types, each requiring specific dataset schemas:
Required columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertimestamps_start: List of float containing start timestamps of segments in secondstimestamps_end: List of float containing end timestamps of segments in secondsspeakers: List of str containing speaker IDs for each segmentOptional columns:
uem_timestamps: List of tuples [(start, end), ...] containing Universal Evaluation Map (UEM) timestamps for evaluationRequired columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertranscript: List of strings containing the words in the transcriptOptional columns:
word_timestamps_start: List of float containing start timestamps for each word in secondsword_timestamps_end: List of float containing end timestamps for each word in secondsRequired columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertranscript: List of strings containing the words in the transcriptword_speakers: List of strings containing speaker IDs for each wordOptional columns:
word_timestamps_start: List of float containing start timestamps for each word in secondsword_timestamps_end: List of float containing end timestamps for each word in secondsValidation rules:
word_speakers and transcript must have the same lengthword_timestamps_start and word_timestamps_end are provided, they must have the same length as transcriptRequired columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertext: String containing the reference transcriptOptional columns:
word_detail: List of dictionaries containing word-level information with start and stop timestamps in samples (will be converted to seconds)Note: Currently, most available datasets are optimized for diarization tasks. For transcription, orchestration, and streaming transcription pipelines, you may need to prepare additional annotations or use datasets that include the required fields for each task type.
OpenBench supports loading datasets from local directories, which is useful for:
Local datasets should follow this directory structure:
dataset_dir/
βββ audio/ # Audio files named by audio_id (e.g., sample_001.wav)
βββ reference/ # JSON files with same names as audio (e.g., sample_001.json)
β # Each JSON file contains a dict with columns matching the expected schema
β # Example for diarization:
β # {"timestamps_start": [0.0, 5.2, ...],
β # "timestamps_end": [5.2, 10.5, ...],
β # "speakers": ["SPEAKER_00", "SPEAKER_01", ...]}
β # Example for transcription:
β # {"transcript": ["hello", "world", ...]}
βββ splits/ # Split definitions (train.txt, test.txt, validation.txt)
β βββ test.txt # Each line contains an audio_id (without extension)
βββ metadata.json # Optional: {audio_id: {extra_info_fields}}
# Example: {"sample_001": {"language": "en", "dictionary": [...]}}
Each reference JSON file should contain a dictionary where:
audio, which comes from audio files)prepare_sample() expectsFor example, a diarization reference file (sample_001.json) should contain:
{
"timestamps_start": [0.0, 5.2, 10.5],
"timestamps_end": [5.2, 10.5, 15.8],
"speakers": ["SPEAKER_00", "SPEAKER_01", "SPEAKER_00"],
"uem_timestamps": [[0.0, 15.8]] // Optional
}
A transcription reference file should contain:
{
"transcript": ["hello", "world", "how", "are", "you"],
"word_timestamps_start": [0.0, 0.5, 1.0, 1.5, 2.0], // Optional
"word_timestamps_end": [0.5, 1.0, 1.5, 2.0, 2.5], // Optional
"language": "en", // Optional, goes to extra_info
"dictionary": ["hello", "world"] // Optional, goes to extra_info
}
To use a local dataset, simply pass the directory path as the dataset_id in your DatasetConfig:
from openbench.dataset.dataset_base import DatasetConfig
from openbench.dataset.dataset_diarization import DiarizationDataset
# Local dataset - just use a path!
config = DatasetConfig(
dataset_id="downloaded_datasets/earnings21", # Path to local dataset directory
split="test"
)
# Works exactly the same as HuggingFace datasets
dataset = DiarizationDataset.from_config(config)
The system automatically detects if dataset_id is a local directory path (by checking if it exists and is a directory) and loads it accordingly. If it's not a local path, it treats it as a HuggingFace dataset ID.
The local dataset loader supports common audio formats:
.wav (preferred).flac.mp3.m4aThe loader will automatically detect the audio file format by trying these extensions in order.
If you want to reproduce the exact dataset downloads and processing, you can use our dataset downloading scripts. First, make sure you have the required dependencies installed as mentioned in the Getting Started section and also install the dataset dependencies doing uv sync --group dataset
After installing the dependencies, you can run the dataset downloading script at common/download_dataset.py. For example, to download the ICSI meetings dataset, you can run:
uv run python common/download_dataset.py --dataset icsi-meetings --hf-repo-owner <your-huggingface-username>
This will download the dataset and store locally at raw_datasets/icsi-meetings directory and upload it to the designated HuggingFace organization at <your-huggingface-username>/icsi-meetings. In case you only want to download and not push to HuggingFace, you can use the --generate-only flag.
For simplicity if you want to download all the datasets you can run:
# This will download all the datasets and store them in the raw_datasets directory
# Will not push to HuggingFace
make download-datasets
HF_TOKEN environment variable setAmerican Life Podcast dataset, you'll need Kaggle API credentials in ~/.kaggle/kaggle.jsonCallhome and Dihard-III you need to acquire the datasets from LDC first and then set their paths in the following env variables:
DIHARD_DATASET_DIR if not specified it will assume the directory lives at ~/third_dihard_challenge_eval/dataCALLHOME_AUDIO_ROOT if not specified it will assume the directory lives at ~/callhome/nist_recognition_evaluation/r65_8_1/sid00sg1/dataraw_datasets directory (which is gitignored):OpenBench can be used as a library to evaluate your own diarization, transcription, or orchestration pipelines. The framework supports three types of pipelines:
my_pipeline.py) and implement your pipeline:from typing import Callable
from openbench.dataset import DiarizationSample
from openbench.types import PipelineType
from openbench.pipeline.base import Pipeline, register_pipeline
from openbench.pipeline.diarization.common import DiarizationOutput, DiarizationPipelineConfig
from openbench.pipeline_prediction import DiarizationAnnotation
@register_pipeline
class MyDiarizationPipeline(Pipeline):
_config_class = MyDiarizationConfig
pipeline_type = PipelineType.DIARIZATION
def build_pipeline(self) -> Callable[[dict], dict]:
# Initialize your model/function and return a callable
return my_diarizer_function
def parse_input(self, input_sample: DiarizationSample) -> dict:
# Convert DiarizationSample to your model's input format
return {
"waveform": input_sample.waveform,
"sample_rate": input_sample.sample_rate
}
def parse_output(self, output: dict) -> DiarizationOutput:
# Convert your model's output to DiarizationOutput
return DiarizationOutput(prediction=annotation)
from pydantic import Field
from openbench.pipeline.diarization.common import DiarizationPipelineConfig
class MyDiarizationConfig(DiarizationPipelineConfig):
model_path: str = Field(..., description="Path to model weights")
threshold: float = Field(0.5, description="Detection threshold")
num_speakers: int | None = Field(None, description="Number of speakers (optional)")
# my_pipeline_config.yaml
out_dir: ./my_pipeline_logs
model_path: /path/to/model
threshold: 0.5
num_speakers: null
The CLI is currently limited to the pre-implemented pipelines in the library. For custom pipelines, you'll need to use the library directly:
from openbench.runner import BenchmarkConfig, BenchmarkRunner, WandbConfig
from openbench.metric import MetricOptions
from openbench.dataset import DiarizationDatasetConfig
from my_pipeline import MyDiarizationPipeline, MyDiarizationConfig
# Create pipeline configuration
pipeline_config = MyDiarizationConfig(
model_path="/path/to/model",
threshold=0.5,
num_speakers=None,
out_dir="./my_pipeline_logs"
)
# Create benchmark configuration
benchmark_config = BenchmarkConfig(
wandb_config=WandbConfig(
project_name="my-diarization-benchmark",
run_name="my-pipeline-evaluation",
tags=["my-pipeline", "evaluation"],
wandb_mode="online" # or "offline" for local testing
),
metrics={
MetricOptions.DER: {}, # Diarization Error Rate
MetricOptions.JER: {}, # Jaccard Error Rate
},
datasets={
"voxconverse": DiarizationDatasetConfig(
dataset_id="diarizers-community/voxconverse",
split="test"
)
}
)
# Create pipeline instance
pipeline = MyDiarizationPipeline(pipeline_config)
# Create and run benchmark
runner = BenchmarkRunner(benchmark_config, [pipeline])
benchmark_result = runner.run()
print(benchmark_result.global_results[0])
pipeline_config = MyDiarizationConfig(
model_path="/path/to/model",
threshold=0.5,
num_speakers=None,
out_dir="./my_pipeline_logs",
num_worker_processes=4, # Number of parallel workers
per_worker_chunk_size=2 # Samples per worker
)
wandb loginwandb_config in your benchmark configurationThe BenchmarkRunner will automatically:
build_pipeline(), parse_input(), and parse_output()DiarizationSample to your model's expected formatDiarizationOutput with a prediction fieldbuild_pipeline(), parse_input(), and parse_output()DiarizationSample to your model's expected formatTranscriptionOutput with a prediction fieldbuild_pipeline(), parse_input(), and parse_output()PostInferenceMergePipeline to combine separate diarization and transcription pipelinesOrchestrationOutput with a prediction field and optionaly diarization and transcription resultsThe benchmark suite uses Hydra for configuration management, providing a flexible and modular way to configure evaluation runs. The configuration files are organized in the following structure:
config
βββ evaluation_config.yaml # Main evaluation configuration
βββ benchmark_config # Base configurations for benchmarking
β βββ datasets # Dataset-specific configs
β βββ wandb_config # Weights & Biases logging configs
β βββ base.yaml # Default benchmark_config used in evaluation_config.yaml
βββ pipeline_configs # Predefined pipeline configurations for ease of use
βββ my_pipeline
β βββ base.yaml # Default config used in my_pipeline.yaml
β βββ config
β βββ base.yaml # Default config used in MyPipeline
β βββ diarization_config
β βββ chunking_config # Defines different useful chunking configurations
β βββ cluster_definition # Defines different useful cluster definitions
β βββ speaker_embedder_config # Defines different useful speaker embedder configurations
β βββ speaker_segmenter_config # Defines different useful speaker segmenter configurations
β βββ base.yaml # Default diarization_config used in evaluation_config.yaml
βββ my_pipeline.yaml # Uses MyPipeline as default pipeline
βββ pyannote.yaml # Defines configuration for PyAnnotePipeline
You can easily customize your evaluation runs using Hydra's override syntax. Here are some common usage patterns:
All Hydra configuration features work with the CLI using --evaluation-config and --evaluation-config-overrides:
# Run evaluation with a specific config file
openbench-cli evaluate --evaluation-config config/my_evaluation.yaml
# Override configuration parameters
openbench-cli evaluate \
--evaluation-config config/my_evaluation.yaml \
--evaluation-config-overrides wandb.project=my-project pipeline_configs.MyPipeline.config.threshold=0.7
# See the resulting configuration
openbench-cli evaluate --evaluation-config config/my_evaluation.yaml --help
# Run evaluation with only MyPipeline
uv run python evaluation.py pipeline_configs=my_pipeline
a. Override by Value:
# Change the speaker segmenter stride
uv run python evaluation.py \
pipeline_configs=my_pipeline \
pipeline_configs.MyPipeline.config.diarization_config.speaker_segmenter_config.variant_name=stride_2
b. Override by Config:
# Use a predefined speaker segmenter configuration
uv run python evaluation.py \
pipeline_configs=my_pipeline \
pipeline_configs/MyPipeline/config/diarization_config/speaker_segmenter_config=stride_2
Note: Use -h flag with any command to see the resulting configuration:
uv run python evaluation.py pipeline_configs=my_pipeline -h
Jupyter Notebook
61.5%
Python
38.4%
[!NOTE] The OpenBench code is licensed under the MIT License. However, please note that:
- SpeakerKit CLI and other integrated systems have their own licenses that apply
- The datasets used in this benchmark have their own licenses and usage restrictions (see Diarization Datasets section for details)
[!IMPORTANT] OpenBench is the evolution of SDBench, originally introduced in the paper "SDBench: A Comprehensive Benchmark Suite for Speaker Diarization". While SDBench focused specifically on speaker diarization, OpenBench has expanded to encompass a broader range of speech processing tasks and is designed to accommodate future modalities beyond speech.
OpenBench is an open-source benchmarking framework for speech processing systems. Originally focused on speaker diarization (as SDBench), the framework has evolved to support comprehensive evaluation of:
The primary objective is to promote standardized, reproducible, and continuous evaluation of open-source and proprietary speech processing systems across on-device and server-side implementations.
Key features include:
pyannote standard metric implementationshydraWeights & Biases logging[!TIP] Want to add your own diarization, ASR, or orchestration pipeline? Check out our Adding a New Diarization Pipeline section for a step-by-step guide!
[!IMPORTANT] Before getting started, please note that some datasets in our Datasets section require special access or have license restrictions. While we provide dataset preparation utilities in
common/download_dataset, you'll need to procure the raw data independently for these datasets. See the dataset table for details on access requirements.
For comprehensive benchmark results across all supported tasks, please see BENCHMARKS.md.
If you want to reproduce SpeakerKit benchmark values please contact to get access to a CLI and an api-key speakerkitpro@argmaxinc.com.
If you already have access please update the speakerkit.yaml and follow the rest of instructions to setup the environment and run evals
In order to get started, first make sure you have uv installed. The official documentation has instructions for how to install the uv CLI.
If you already have uv installed you can run make setup to install the dependencies and set up the environment.
If you use conda or venv directly to manage your python environment you can install uv with pip install uv and then run make setup to install the dependencies.
Example with conda:
conda create -n <your-env-name> python=3.11
conda activate <your-env-name>
pip install uv
make setup
Alternatively, you can use uv directly to manage the environment:
# Install dependencies and create virtual environment
uv sync
# Activate the environment (if needed)
source .venv/bin/activate # On macOS/Linux
# or
.venv\Scripts\activate # On Windows
OpenBench provides a powerful command-line interface for easy interaction with the benchmarking framework. The CLI offers three main commands for different use cases:
evaluate - Run Benchmark EvaluationsRun comprehensive evaluations of your pipelines on datasets with configurable metrics.
# Evaluate using pipeline and dataset aliases
openbench-cli evaluate \
--pipeline pyannote \
--dataset voxconverse \
--metrics der \
--metrics jer \
--use-wandb \
--wandb-project my-evaluation
# Evaluate using a configuration file
openbench-cli evaluate \
--evaluation-config config/my_evaluation.yaml \
--evaluation-config-overrides wandb.project=my-project
# Get help and see available options
openbench-cli evaluate --help
inference - Run Single Audio InferenceTest your pipeline on individual audio files for quick validation.
# Run inference on a single audio file
openbench-cli inference \
--pipeline pyannote \
--audio-path path/to/audio.wav \
--output-path path/to/output.json
# Run inference with custom configuration
openbench-cli inference \
--pipeline pyannote \
--audio-path path/to/audio.wav \
--pipeline-config '{"min_speakers": 2, "max_speakers": 5}'
summary - Explore Available ResourcesGet an overview of all available pipelines, datasets, metrics, and their compatibility.
# Show all available pipelines, datasets, and metrics
openbench-cli summary
# Show only pipelines
openbench-cli summary --disable-datasets --disable-metrics --disable-compatibility
# Show only compatibility matrix
openbench-cli summary --disable-pipelines --disable-datasets --disable-metrics
# Get detailed information
openbench-cli summary --verbose
pyannote, aws-diarization, whisperx instead of class namesvoxconverse, earnings21der, jer, werSome pipelines require specific environment variables to be set:
# AWS Transcribe
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
# Pyannote API
export PYANNOTE_API_KEY="your-api-key"
# SpeakerKit (contact speakerkitpro@argmaxinc.com for access)
export SPEAKERKIT_CLI_PATH="/path/to/speakerkit/cli"
export SPEAKERKIT_API_KEY="your-api-key"
# Other API-based pipelines
export PICOVOICE_API_KEY="your-api-key"
export DEEPGRAM_API_KEY="your-api-key"
export FIREWORKS_API_KEY="your-api-key"
export GLADIA_API_KEY="your-api-key"
export OPENAI_API_KEY="your-api-key"
For more details about pipeline requirements, run openbench-cli summary to see the full list of available pipelines and their descriptions.
OpenBench supports different types of pipelines (Diarization, Transcription, Orchestration, and Streaming Transcription) with specific dataset schemas for each task type.
The benchmark suite uses several speaker diarization datasets that are stored on the HuggingFace Hub. You can find all the datasets used in our evaluation in this collection. The datasets available in the aforementioned collection are:
| Dataset Name | Out-of-the-box | License | How to Access |
|---|---|---|---|
| earnings21 | β | CC BY-SA 4.0 | Provided |
| msdwild | β | MSDWild License Agreement | Use common/download_dataset.py script |
| icsi-meetings | β | CC BY 4.0 | Provided |
| aishell-4 | β | CC BY-SA 4.0 | Provided |
| ali-meetings | β | CC BY-SA 4.0 | Provided |
| voxconverse | β | CC BY 4.0 | Provided |
| ava-avd | β | MIT | Provided |
| ami-sdm | β | CC BY 4.0 | Provided |
| ami-ihm | β | CC BY 4.0 | Provided |
| american-life-podcast | β | Not disclosed | Use common/download_dataset.py script |
| dihard-III | β | LDC License Agreement | Request access to LDC and use common/download_dataset.py script to parse |
| callhome | β | LDC License Agreement | Request access to LDC and use common/download_dataset.py script to parse |
| ego-4d | β | Ego4D License Agreement | Request access to Ego4D and use common/download_dataset.py script to parse |
For other pipeline types, additional dataset collections are available:
From these datasets voxconverse and ami are not present as download options as they were already present in the HuggingFace Hub uploaded by diarizers-community.
Note: You can use openbench-cli summary to see all available pre-registered datasets and their compatibility with different pipeline types.
OpenBench supports different pipeline types, each requiring specific dataset schemas:
Required columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertimestamps_start: List of float containing start timestamps of segments in secondstimestamps_end: List of float containing end timestamps of segments in secondsspeakers: List of str containing speaker IDs for each segmentOptional columns:
uem_timestamps: List of tuples [(start, end), ...] containing Universal Evaluation Map (UEM) timestamps for evaluationRequired columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertranscript: List of strings containing the words in the transcriptOptional columns:
word_timestamps_start: List of float containing start timestamps for each word in secondsword_timestamps_end: List of float containing end timestamps for each word in secondsRequired columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertranscript: List of strings containing the words in the transcriptword_speakers: List of strings containing speaker IDs for each wordOptional columns:
word_timestamps_start: List of float containing start timestamps for each word in secondsword_timestamps_end: List of float containing end timestamps for each word in secondsValidation rules:
word_speakers and transcript must have the same lengthword_timestamps_start and word_timestamps_end are provided, they must have the same length as transcriptRequired columns:
audio: Audio column containing:
array: Audio waveform as numpy array of shape (n_samples,)sampling_rate: Sample rate as integertext: String containing the reference transcriptOptional columns:
word_detail: List of dictionaries containing word-level information with start and stop timestamps in samples (will be converted to seconds)Note: Currently, most available datasets are optimized for diarization tasks. For transcription, orchestration, and streaming transcription pipelines, you may need to prepare additional annotations or use datasets that include the required fields for each task type.
OpenBench supports loading datasets from local directories, which is useful for:
Local datasets should follow this directory structure:
dataset_dir/
βββ audio/ # Audio files named by audio_id (e.g., sample_001.wav)
βββ reference/ # JSON files with same names as audio (e.g., sample_001.json)
β # Each JSON file contains a dict with columns matching the expected schema
β # Example for diarization:
β # {"timestamps_start": [0.0, 5.2, ...],
β # "timestamps_end": [5.2, 10.5, ...],
β # "speakers": ["SPEAKER_00", "SPEAKER_01", ...]}
β # Example for transcription:
β # {"transcript": ["hello", "world", ...]}
βββ splits/ # Split definitions (train.txt, test.txt, validation.txt)
β βββ test.txt # Each line contains an audio_id (without extension)
βββ metadata.json # Optional: {audio_id: {extra_info_fields}}
# Example: {"sample_001": {"language": "en", "dictionary": [...]}}
Each reference JSON file should contain a dictionary where:
audio, which comes from audio files)prepare_sample() expectsFor example, a diarization reference file (sample_001.json) should contain:
{
"timestamps_start": [0.0, 5.2, 10.5],
"timestamps_end": [5.2, 10.5, 15.8],
"speakers": ["SPEAKER_00", "SPEAKER_01", "SPEAKER_00"],
"uem_timestamps": [[0.0, 15.8]] // Optional
}
A transcription reference file should contain:
{
"transcript": ["hello", "world", "how", "are", "you"],
"word_timestamps_start": [0.0, 0.5, 1.0, 1.5, 2.0], // Optional
"word_timestamps_end": [0.5, 1.0, 1.5, 2.0, 2.5], // Optional
"language": "en", // Optional, goes to extra_info
"dictionary": ["hello", "world"] // Optional, goes to extra_info
}
To use a local dataset, simply pass the directory path as the dataset_id in your DatasetConfig:
from openbench.dataset.dataset_base import DatasetConfig
from openbench.dataset.dataset_diarization import DiarizationDataset
# Local dataset - just use a path!
config = DatasetConfig(
dataset_id="downloaded_datasets/earnings21", # Path to local dataset directory
split="test"
)
# Works exactly the same as HuggingFace datasets
dataset = DiarizationDataset.from_config(config)
The system automatically detects if dataset_id is a local directory path (by checking if it exists and is a directory) and loads it accordingly. If it's not a local path, it treats it as a HuggingFace dataset ID.
The local dataset loader supports common audio formats:
.wav (preferred).flac.mp3.m4aThe loader will automatically detect the audio file format by trying these extensions in order.
If you want to reproduce the exact dataset downloads and processing, you can use our dataset downloading scripts. First, make sure you have the required dependencies installed as mentioned in the Getting Started section and also install the dataset dependencies doing uv sync --group dataset
After installing the dependencies, you can run the dataset downloading script at common/download_dataset.py. For example, to download the ICSI meetings dataset, you can run:
uv run python common/download_dataset.py --dataset icsi-meetings --hf-repo-owner <your-huggingface-username>
This will download the dataset and store locally at raw_datasets/icsi-meetings directory and upload it to the designated HuggingFace organization at <your-huggingface-username>/icsi-meetings. In case you only want to download and not push to HuggingFace, you can use the --generate-only flag.
For simplicity if you want to download all the datasets you can run:
# This will download all the datasets and store them in the raw_datasets directory
# Will not push to HuggingFace
make download-datasets
HF_TOKEN environment variable setAmerican Life Podcast dataset, you'll need Kaggle API credentials in ~/.kaggle/kaggle.jsonCallhome and Dihard-III you need to acquire the datasets from LDC first and then set their paths in the following env variables:
DIHARD_DATASET_DIR if not specified it will assume the directory lives at ~/third_dihard_challenge_eval/dataCALLHOME_AUDIO_ROOT if not specified it will assume the directory lives at ~/callhome/nist_recognition_evaluation/r65_8_1/sid00sg1/dataraw_datasets directory (which is gitignored):OpenBench can be used as a library to evaluate your own diarization, transcription, or orchestration pipelines. The framework supports three types of pipelines:
my_pipeline.py) and implement your pipeline:from typing import Callable
from openbench.dataset import DiarizationSample
from openbench.types import PipelineType
from openbench.pipeline.base import Pipeline, register_pipeline
from openbench.pipeline.diarization.common import DiarizationOutput, DiarizationPipelineConfig
from openbench.pipeline_prediction import DiarizationAnnotation
@register_pipeline
class MyDiarizationPipeline(Pipeline):
_config_class = MyDiarizationConfig
pipeline_type = PipelineType.DIARIZATION
def build_pipeline(self) -> Callable[[dict], dict]:
# Initialize your model/function and return a callable
return my_diarizer_function
def parse_input(self, input_sample: DiarizationSample) -> dict:
# Convert DiarizationSample to your model's input format
return {
"waveform": input_sample.waveform,
"sample_rate": input_sample.sample_rate
}
def parse_output(self, output: dict) -> DiarizationOutput:
# Convert your model's output to DiarizationOutput
return DiarizationOutput(prediction=annotation)
from pydantic import Field
from openbench.pipeline.diarization.common import DiarizationPipelineConfig
class MyDiarizationConfig(DiarizationPipelineConfig):
model_path: str = Field(..., description="Path to model weights")
threshold: float = Field(0.5, description="Detection threshold")
num_speakers: int | None = Field(None, description="Number of speakers (optional)")
# my_pipeline_config.yaml
out_dir: ./my_pipeline_logs
model_path: /path/to/model
threshold: 0.5
num_speakers: null
The CLI is currently limited to the pre-implemented pipelines in the library. For custom pipelines, you'll need to use the library directly:
from openbench.runner import BenchmarkConfig, BenchmarkRunner, WandbConfig
from openbench.metric import MetricOptions
from openbench.dataset import DiarizationDatasetConfig
from my_pipeline import MyDiarizationPipeline, MyDiarizationConfig
# Create pipeline configuration
pipeline_config = MyDiarizationConfig(
model_path="/path/to/model",
threshold=0.5,
num_speakers=None,
out_dir="./my_pipeline_logs"
)
# Create benchmark configuration
benchmark_config = BenchmarkConfig(
wandb_config=WandbConfig(
project_name="my-diarization-benchmark",
run_name="my-pipeline-evaluation",
tags=["my-pipeline", "evaluation"],
wandb_mode="online" # or "offline" for local testing
),
metrics={
MetricOptions.DER: {}, # Diarization Error Rate
MetricOptions.JER: {}, # Jaccard Error Rate
},
datasets={
"voxconverse": DiarizationDatasetConfig(
dataset_id="diarizers-community/voxconverse",
split="test"
)
}
)
# Create pipeline instance
pipeline = MyDiarizationPipeline(pipeline_config)
# Create and run benchmark
runner = BenchmarkRunner(benchmark_config, [pipeline])
benchmark_result = runner.run()
print(benchmark_result.global_results[0])
pipeline_config = MyDiarizationConfig(
model_path="/path/to/model",
threshold=0.5,
num_speakers=None,
out_dir="./my_pipeline_logs",
num_worker_processes=4, # Number of parallel workers
per_worker_chunk_size=2 # Samples per worker
)
wandb loginwandb_config in your benchmark configurationThe BenchmarkRunner will automatically:
build_pipeline(), parse_input(), and parse_output()DiarizationSample to your model's expected formatDiarizationOutput with a prediction fieldbuild_pipeline(), parse_input(), and parse_output()DiarizationSample to your model's expected formatTranscriptionOutput with a prediction fieldbuild_pipeline(), parse_input(), and parse_output()PostInferenceMergePipeline to combine separate diarization and transcription pipelinesOrchestrationOutput with a prediction field and optionaly diarization and transcription resultsThe benchmark suite uses Hydra for configuration management, providing a flexible and modular way to configure evaluation runs. The configuration files are organized in the following structure:
config
βββ evaluation_config.yaml # Main evaluation configuration
βββ benchmark_config # Base configurations for benchmarking
β βββ datasets # Dataset-specific configs
β βββ wandb_config # Weights & Biases logging configs
β βββ base.yaml # Default benchmark_config used in evaluation_config.yaml
βββ pipeline_configs # Predefined pipeline configurations for ease of use
βββ my_pipeline
β βββ base.yaml # Default config used in my_pipeline.yaml
β βββ config
β βββ base.yaml # Default config used in MyPipeline
β βββ diarization_config
β βββ chunking_config # Defines different useful chunking configurations
β βββ cluster_definition # Defines different useful cluster definitions
β βββ speaker_embedder_config # Defines different useful speaker embedder configurations
β βββ speaker_segmenter_config # Defines different useful speaker segmenter configurations
β βββ base.yaml # Default diarization_config used in evaluation_config.yaml
βββ my_pipeline.yaml # Uses MyPipeline as default pipeline
βββ pyannote.yaml # Defines configuration for PyAnnotePipeline
You can easily customize your evaluation runs using Hydra's override syntax. Here are some common usage patterns:
All Hydra configuration features work with the CLI using --evaluation-config and --evaluation-config-overrides:
# Run evaluation with a specific config file
openbench-cli evaluate --evaluation-config config/my_evaluation.yaml
# Override configuration parameters
openbench-cli evaluate \
--evaluation-config config/my_evaluation.yaml \
--evaluation-config-overrides wandb.project=my-project pipeline_configs.MyPipeline.config.threshold=0.7
# See the resulting configuration
openbench-cli evaluate --evaluation-config config/my_evaluation.yaml --help
# Run evaluation with only MyPipeline
uv run python evaluation.py pipeline_configs=my_pipeline
a. Override by Value:
# Change the speaker segmenter stride
uv run python evaluation.py \
pipeline_configs=my_pipeline \
pipeline_configs.MyPipeline.config.diarization_config.speaker_segmenter_config.variant_name=stride_2
b. Override by Config:
# Use a predefined speaker segmenter configuration
uv run python evaluation.py \
pipeline_configs=my_pipeline \
pipeline_configs/MyPipeline/config/diarization_config/speaker_segmenter_config=stride_2
Note: Use -h flag with any command to see the resulting configuration:
uv run python evaluation.py pipeline_configs=my_pipeline -h
Jupyter Notebook
61.5%
Python
38.4%