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

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

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

# SttModel

[common]\
class [SttModel](index.md) : [PreTrainedModel](../PreTrainedModel/index.md)

A speech recognition model loaded from its files on disk, on the CPU.

Open it with [open](Companion/open.md) from a snapshot directory. Hand it a clip as 16-bit PCM with [transcribe](transcribe.md); the text arrives through the listener on the model's own worker thread, one clip at a time per model. [close](close.md) frees the weights.

## Types

| Name | Summary |
|---|---|
| [Companion](Companion/index.md) | [common]<br>object [Companion](Companion/index.md) |

## Properties

| Name | Summary |
|---|---|
| [capabilities](capabilities.md) | [common]<br>val [capabilities](capabilities.md): [Capabilities](../Capabilities/index.md)<br>What the model takes and gives, read when it opened. |
| [config](config.md) | [common]<br>open override val [config](config.md): [PretrainedConfig](../PretrainedConfig/index.md)<br>The checkpoint's identity, read when the model opened. |

## Functions

| Name | Summary |
|---|---|
| [close](close.md) | [common]<br>open fun [close](close.md)() |
| [residency](residency.md) | [common]<br>open override fun [residency](residency.md)(): [ResidencyReport](../ResidencyReport/index.md)<br>Free the model. A running request is canceled first and the call waits for it to return; called from inside a listener callback, the free runs right after that callback's request ends instead. Idempotent. |
| [transcribe](transcribe.md) | [common]<br>fun [transcribe](transcribe.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: [TranscribeOptions](../TranscribeOptions/index.md), listener: [TranscribeListener](../TranscribeListener/index.md)): [TranscribeHandle](../TranscribeHandle/index.md)<br>Transcribe [pcm16](transcribe.md), mono 16-bit samples at [sampleRate](transcribe.md) hertz (the clip is resampled to the model's rate), under [options](transcribe.md). Returns at once; the worker runs the request and calls [listener](transcribe.md) on its thread: the clip's text as one [TranscriptSegment](../TranscriptSegment/index.md) spanning the clip, then [TranscribeListener.onDone](../TranscribeListener/onDone.md) with the [TranscribeReport](../TranscribeReport/index.md), the language the clip was read in among its facts. A clip longer than the model's window is transcribed window by window into that one segment. |