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

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

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

# VisionListener

[common]\
interface [VisionListener](index.md)

The outcome of one vision request. The calls arrive on the model's own worker thread: the one result callback the request's task answers with (a detection request calls [onDetections](onDetections.md), a depth request [onDepth](onDepth.md), a text reading [onText](onText.md), an embedding [onEmbedding](onEmbedding.md), a classification [onScores](onScores.md)), then exactly one of [onDone](onDone.md) or [onError](onError.md). The result callbacks default to nothing, so a listener implements the one its request needs.

## Functions

| Name | Summary |
|---|---|
| [onDepth](onDepth.md) | [common]<br>open fun [onDepth](onDepth.md)(depth: [DepthMap](../DepthMap/index.md)) |
| [onDetections](onDetections.md) | [common]<br>open fun [onDetections](onDetections.md)(detections: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Detection](../Detection/index.md)&gt;) |
| [onDone](onDone.md) | [common]<br>abstract fun [onDone](onDone.md)(report: [VisionReport](../VisionReport/index.md))<br>The request ended; [report](onDone.md) says what it cost. |
| [onEmbedding](onEmbedding.md) | [common]<br>open fun [onEmbedding](onEmbedding.md)(embedding: [FloatArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html)) |
| [onError](onError.md) | [common]<br>abstract fun [onError](onError.md)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html))<br>The request failed, or was refused before the model ran; nothing follows. |
| [onScores](onScores.md) | [common]<br>open fun [onScores](onScores.md)(scores: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[LabelScore](../LabelScore/index.md)&gt;) |
| [onText](onText.md) | [common]<br>open fun [onText](onText.md)(text: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)) |