---
title: "diarize"
sidebar_label: "diarize"
description: "Kotlin binding reference: diarize."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[DiarizationModel](index.md)/[diarize](diarize.md)

# diarize

[common]\
fun [diarize](diarize.md)(pcm16: [ShortArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-short-array/index.html), sampleRate: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), options: [DiarizeOptions](../DiarizeOptions/index.md) = DiarizeOptions(), listener: [DiarizeListener](../DiarizeListener/index.md)): [DiarizeHandle](../DiarizeHandle/index.md)

Diarize [pcm16](diarize.md), mono 16-bit samples at [sampleRate](diarize.md) hertz (the clip is resampled to the model's 16 kHz), under [options](diarize.md). Returns at once; the worker runs the request and calls [listener](diarize.md) on its thread: [DiarizeListener.onSegments](../DiarizeListener/onSegments.md) with the segments in time order, then [DiarizeListener.onDone](../DiarizeListener/onDone.md) with the [DiarizeReport](../DiarizeReport/index.md).