SinapsisPyannoteDiarizer
Python template · sinapsis_diarization.templates.pyannote_diarizer_template
Overview
PyannoteDiarizer Template. Runs a diarization pipeline with pyannote models. This pipeline ingests mono audio sampled at 16kHz and outputs speaker diarization. Stereo or multi-channel audio files are automatically downmixed to mono by averaging the channels. Audio files sampled at a different rate are resampled to 16kHz automatically upon loading.
Supported models: 'pyannote/speaker-diarization-community-1'
Attributes: model_name (str): name of model to run device (str): device to run the model sample_rate (int): sample rate of the audio chunk_size_in_secs (int): Size of the chunks to divide the audio. -1 for full audio search_window (float): Size of the search window root_dir(str): Path to root directory. Optional audio_file_path (str): Path to audio file. Optional num_speakers (str): number of speakers to predict
Example agent:
agent: name: my_test_agent templates: - template_name: InputTemplate class_name: InputTemplate attributes: {} - template_name: SinapsisPyannoteDiarizer class_name: SinapsisPyannoteDiarizer template_input: InputTemplate attributes: model_name: pyannote/speaker-diarization-community-1 device: cuda sample_rate: 16000 chunk_size_in_secs: -1 search_window: 5.0 root_dir: /root/.cache/sinapsis audio_file_path: null num_speakers: 2
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-diarization==1.0.0uv pip install sinapsis-diarization==1.0.0uv add sinapsis-diarization==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: "cuda"
Optional
Default: null
Optional
Default: "/home/ariel/.cache/sinapsis"
name of the model to run
Optional
Default: "pyannote/speaker-diarization-community-1"
Optional
Default: 16000
number of speakers to predict
Optional
Default: 2
Optional
Default: 5
Optional
Default: null
Optional
Default: -1
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "SinapsisPyannoteDiarizer"
class_name: "SinapsisPyannoteDiarizer"
attributes:
device: "cuda"
root_dir: "/home/ariel/.cache/sinapsis"
model_name: "pyannote/speaker-diarization-community-1"
sample_rate: 16000
num_speakers: 2
search_window: 5
audio_file_path: null
chunk_size_in_secs: -1
Inheritance
sinapsis_diarization.templates.base_diarizer_template.SinapsisBaseDiarizerEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.