---
title: "Dictation"
canonical_url: https://developer.repebble.com/guides/alloy/dictation/
last_updated: 2026-06-24
sdk_version: 4.43
---
# Dictation

Source: https://developer.repebble.com/guides/alloy/dictation/

The `Dictation` class lets your Alloy app capture speech from the user and receive it as text. It drives the system dictation UI and delivers the transcription to your code through callbacks.

> **Platform Support** : Dictation is available on Emery (Pebble Time 2) and Gabbro (Pebble Round 2), and requires a connected phone with a working internet connection.

## Basic Usage

Import the class and create an instance with `onReadable` and `onError` handlers, then call `start()` to begin listening:

```
import Dictation from "pebble/dictation";let dictation = new Dictation({onReadable() {console.log(`Transcription: ${this.read()}`);},onError(e) {console.log(`Dictation error: ${e}`);}});dictation.start();
```

## Methods

| Method | Description |
| --- | --- |
| `start()` | Open the dictation UI and begin listening. |
| `stop()` | Stop an in-progress dictation session. |
| `read()` | Return the transcribed text. Call from `onReadable`. |
| `configure(options)` | Change dictation behavior (see [Configuration](#configuration)). |
| `close()` | Release the dictation instance when you're done with it. |

## Events

| Event | Description |
| --- | --- |
| `onReadable()` | Called when a transcription is ready. Call `this.read()` to get the text. |
| `onError(status)` | Called when dictation fails (for example, no connection or no speech detected). `status` is a numeric error code. |

## Configuration

Pass a `byteLength` to the constructor to size the transcription buffer, and use `configure()` to control the dictation UI:

```
import Dictation from "pebble/dictation";let dictation = new Dictation({byteLength: 512,// maximum transcription size, in bytesonReadable() {console.log(`Transcription: ${this.read()}`);}});dictation.configure({confirm: false,// skip the confirmation screen after dictationerrorDialogs: true// let the system show its own error dialogs});dictation.start();
```

| Option | Description |
| --- | --- |
| `confirm` | Whether to show the confirmation screen after dictation (default `true`). |
| `errorDialogs` | Whether the system shows its own error UI on failure. |

## Continuous Dictation

To keep listening after each transcription, start a new session from within `onReadable`. Use `setImmediate` so the current session finishes cleanly first:

```
import Dictation from "pebble/dictation";let dictation = new Dictation({onReadable() {console.log(`Transcription: ${this.read()}`);setImmediate(() =\> {console.log("Listening...");this.start();});},onError(e) {console.log(`Dictation error: ${e}`);}});console.log("Listening...");dictation.start();
```

See the [`hellodictation` example](https://github.com/Moddable-OpenSource/pebble-examples/tree/main/hellodictation) for a complete project.
