Skip to main content
What you will build

15 min | Intermediate

  • One shared Dictation client for the chart screen
  • A clinical notes field with a stable field id
  • In-field Dictation that writes committed text back into that field
Using an AI coding tool?Copy the following prompt to add the Suki developer documentation as a skill and MCP server to your tool for better AI-assisted coding during the integration process. For all AI options (contextual menu, llms.txt, and skill.md), refer to AI-optimized documentation.

Install the Suki developer docs as a skill to get context on Suki's developer tools, APIs, and SDKs. Add the MCP server for documentation search.

Open in Cursor
In this tutorial, you add Dictation SDK in-field mode to a chart note textarea in React. You create one DictationClient, wrap the screen with DictationProvider, and mount <Dictation> only while that field is active. By the end of this tutorial, starting Dictation inserts text into your chart field through onSubmit.
The Dictation SDK is in beta. Confirm package versions and iframe requirements with your Suki contact before production use.

Prerequisites

Before you begin, make sure you have:
Reuse one client for the page. Creating a new DictationClient on every render tears the iframe down and makes the field feel unstable.

Architecture

Project setup

  1. Use a React 18+ browser app that meets Dictation SDK prerequisites (CSP and iframe hosts).
  2. Install the required dependencies:
  1. Configure your credentials:
    • Keep staging partnerId and partnerToken ready.
    • Reuse one DictationClient for the page. Creating a new client on every render tears the iframe down.

Tutorial steps

Work through each step in order. Read the explanation, review the code example, then continue to the next step. The full code example is available in the accordion below.
1

Create One Auth Manager and DictationClient

Build SukiAuthManager and DictationClient once inside useMemo. Do not create a new client per render or per field.
2

Wrap the Chart Screen with DictationProvider

Pass the shared client into DictationProvider. Every &lt;Dictation&gt; must be a child of that provider.
3

Dictate into a Chart Field in In-Field Mode

Use a stable fieldId that matches your textarea id. Pass a wrapper with real height as rootElement. Mount &lt;Dictation&gt; only while that field should own the session. Update the field from onSubmit.

Full code example

React

Troubleshooting

Meet Dictation SDK prerequisites for allowed hosts.
Reuse one DictationClient for the page; recreating it remounts the iframe.
Confirm package versions with your Suki contact before production use.

Summary

In this tutorial, you:
  • Created one shared DictationClient for the chart screen.
  • Wrapped the screen with DictationProvider.
  • Mounted in-field Dictation so submitted text updates the notes field.

Other tutorials

Continue with another end-to-end tutorial.
Dictation

Build a Dictation Streaming Client

Create a transcription session, stream audio, read partial frames, and print the final transcript.

15 minIntermediate
Ambient

Build a Web SDK Ambient Session

Authenticate, initialize the Web SDK in React, and mount SukiAssistant for an ambient encounter.

15 minIntermediate
Last modified on July 23, 2026