---
title: "Turn Detection | Micdrop"
description: "Hold the turn open while someone hesitates on a phone, and answer as soon as their question lands, with the Smart Turn model running on the native ONNX runtime."
url: "https://micdrop.dev/docs/react-native/turn-detection"
---

*   [Getting Started](/docs/getting-started)
*   [Client (Browser)](/docs/client)
    
    *   [Installation](/docs/client/installation)
    *   [React Hooks](/docs/client/react-hooks)
    *   [Start/Stop Call](/docs/client/start-stop-call)
    *   [Pause/Resume Call](/docs/client/pause-resume-call)
    *   [Mute/Unmute Call](/docs/client/mute-unmute-call)
    *   [Call State](/docs/client/call-state)
    *   [Display Conversation Messages](/docs/client/display-conversation-messages)
    *   [Handling Tool Calls](/docs/client/handling-tool-calls)
    *   [Device Management](/docs/client/devices-management)
    *   [Voice Activity Detection (VAD)](/docs/client/vad)
    *   [Turn Detection](/docs/client/turn-detection)
    *   [Reducing Latency](/docs/client/latency)
    *   [Error Handling](/docs/client/error-handling)
    *   Utility Classes
        
        *   [Mic](/docs/client/utility-classes/mic)
        *   [MicdropClient](/docs/client/utility-classes/micdrop-client)
        *   [MicRecorder](/docs/client/utility-classes/mic-recorder)
        *   [Speaker](/docs/client/utility-classes/speaker)
        
    
*   [Client (React Native)](/docs/react-native)
    
    *   [Installation](/docs/react-native/installation)
    *   [Hooks and Call State](/docs/react-native/hooks)
    *   [Audio Output and Devices](/docs/react-native/audio-output)
    *   [Voice Activity Detection (VAD)](/docs/react-native/vad)
    *   [Turn Detection](/docs/react-native/turn-detection)
    *   [Using Another Audio Library](/docs/react-native/custom-audio)
    
*   [Server (Node.js)](/docs/server)
    
    *   [Installation](/docs/server/installation)
    *   [With Fastify](/docs/server/with-fastify)
    *   [With NestJS](/docs/server/with-nestjs)
    *   [Auth and Parameters](/docs/server/auth-and-parameters)
    *   [First Message](/docs/server/first-message)
    *   [Dictation and Text-Only Calls](/docs/server/dictation)
    *   [Partial Messages](/docs/server/partial-messages)
    *   [Save Messages](/docs/server/save-messages)
    *   [Resume a Conversation](/docs/server/resume-conversation)
    *   [Recording Audio](/docs/server/recording-audio)
    *   [Error Handling](/docs/server/error-handling)
    *   [Tools](/docs/server/tools)
    *   [Extract Value from Answer](/docs/server/extract)
    *   [Auto End Call](/docs/server/auto-end-call)
    *   [Semantic Turn Detection](/docs/server/semantic-turn-detection)
    *   [Noise Filtering](/docs/server/noise-filtering)
    *   [Micdrop Protocol](/docs/server/protocol)
    
*   [AI Integrations](/docs/ai-integration)
    
    *   Provided Integrations
        
        *   [AI SDK](/docs/ai-integration/provided-integrations/ai-sdk)
        *   [Cartesia](/docs/ai-integration/provided-integrations/cartesia)
        *   [ElevenLabs](/docs/ai-integration/provided-integrations/elevenlabs)
        *   [Gladia](/docs/ai-integration/provided-integrations/gladia)
        *   [Gradium](/docs/ai-integration/provided-integrations/gradium)
        *   [Kokoro](/docs/ai-integration/provided-integrations/kokoro)
        *   [Mistral](/docs/ai-integration/provided-integrations/mistral)
        *   [OpenAI](/docs/ai-integration/provided-integrations/openai)
        *   [Piper](/docs/ai-integration/provided-integrations/piper)
        *   [Pocket TTS](/docs/ai-integration/provided-integrations/pocket-tts)
        *   [Whisper](/docs/ai-integration/provided-integrations/whisper)
        
    *   Custom Integrations
        
        *   [Agent (LLM)](/docs/ai-integration/custom-integrations/custom-agent)
        *   [Speech-to-Text (STT)](/docs/ai-integration/custom-integrations/custom-stt)
        *   [Text-to-Speech (TTS)](/docs/ai-integration/custom-integrations/custom-tts)
        
    *   Fallback Strategies
        
        *   [FallbackAgent](/docs/ai-integration/fallback-strategies/agent-fallback)
        *   [FallbackSTT](/docs/ai-integration/fallback-strategies/stt-fallback)
        *   [FallbackTTS](/docs/ai-integration/fallback-strategies/tts-fallback)
        
    *   [Local Models](/docs/ai-integration/local-models)
        
        *   [Choosing the Models](/docs/ai-integration/local-models/choosing-models)
        *   [Latency and Memory](/docs/ai-integration/local-models/performance)
        *   [Explorations](/docs/ai-integration/local-models/explorations)
        
    *   [IA Vocale Souveraine 🇫🇷🇪🇺](/docs/ai-integration/sovereign-voice-ai)
    
*   [Migration](/docs/migration)
    
    *   [Upgrade to v3](/docs/migration/v3)
    

[Micdrop](/) › [Documentation](/docs/getting-started) › [Client (React Native)](/docs/react-native)

# Turn Detection

[Turn detection](/docs/client/turn-detection) hears whether the sentence has landed, so the wait after the last word becomes adaptive rather than a fixed amount of silence. On a phone, held in the hand and often used on the move, the pauses are longer and a fixed wait is a worse compromise still.

How it behaves during a call, the deadline on a held turn, the threshold and how to write a detector of your own are the same code on both platforms and are documented on that page. This one covers what is specific to a phone.

## Installation

Terminal window

```
npm install @micdrop/smart-turnnpx expo install onnxruntime-react-native
```

The runtime needs a patch before it links, described in [Installation](/docs/react-native/installation#the-onnx-runtime). The same patch serves the Silero voice detection, so an app already running Silero has nothing more to do.

## Usage

```
import { Micdrop } from '@micdrop/react-native'import { SmartTurn } from '@micdrop/smart-turn'import '@micdrop/smart-turn/react-native'
await Micdrop.start({  url: 'wss://example.com/call',  vad: 'volume',  turnDetector: new SmartTurn(),})
```

Importing `@micdrop/smart-turn/react-native` is what registers the native runtime. Without it the model has nowhere to load and the call reports `No Smart Turn model`. The import carries the native runtime with it, which is why it is separate from the package itself: an app that never asks for turn detection never pays for it.

## The model

A phone runs the model on its own processor, with none of the penalty a browser pays for WebAssembly, so the quantised checkpoint of eight megabytes is the right one and is what this entry point loads by default. It is fetched once on the first call and kept for as long as the app runs.

To ship it with the app instead, so the first call costs nothing:

```
import { setSmartTurnOptions } from '@micdrop/smart-turn/react-native'
setSmartTurnOptions({ model: modelPathOnTheDevice })
```

`model` takes an address to fetch, a file already on the device, or the bytes themselves. The full precision checkpoint is exported as `FULL_MODEL_URL`, thirty megabytes for a couple of points more accuracy, which a phone rarely justifies.

The processor handles the model comfortably on its own, so leave `executionProviders` alone unless you have measured that `nnapi` or `coreml` helps on the devices you ship to.

## Loading it when you choose

`new SmartTurn()` loads nothing. The model is fetched on the first turn it has to judge, which puts a download in the middle of a conversation. Loading it ahead of time, while the user is still on the screen before the call, keeps that out of the way:

```
const smartTurn = new SmartTurn()
await smartTurn.load()
await Micdrop.start({ url, turnDetector: smartTurn })
```

A detector can also be attached and removed during a call, which is how the [example app](https://github.com/Godefroy/micdrop/tree/main/examples/react-native) puts it behind a button:

```
Micdrop.setTurnDetector(enabled ? smartTurn : undefined)
```

## Running it on the server instead

An old phone, or an app that would rather not carry the ONNX runtime at all, can have the model run where the audio already arrives. See [Semantic Turn Detection](/docs/server/semantic-turn-detection). The client then needs nothing, at the cost of the network round trip the local model avoids.

[Previous← Voice Activity Detection (VAD)](/docs/react-native/vad)[NextUsing Another Audio Library →](/docs/react-native/custom-audio)

On this page

*   [Installation](#installation)
*   [Usage](#usage)
*   [The model](#the-model)
*   [Loading it when you choose](#loading-it-when-you-choose)
*   [Running it on the server instead](#running-it-on-the-server-instead)
