***

title: transcribe
slug: /reference/typescript/relay/call/transcribe
description: Start transcribing call audio.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[transcribeaction]: /docs/server-sdks/reference/typescript/relay/actions

[live-transcribe]: /docs/server-sdks/reference/typescript/relay/call/live-transcribe

[calling-call-transcribe]: /docs/server-sdks/reference/typescript/relay/call#events

[call-events]: /docs/server-sdks/reference/typescript/relay/call#events

Start transcribing call audio. Returns a
[`TranscribeAction`][transcribeaction] that you can use
to stop the transcription or wait for it to complete.

<Info>
  For real-time transcription with immediate text output, see
  [`liveTranscribe()`][live-transcribe].
  The `transcribe()` method starts a background transcription that resolves when the operation finishes.
</Info>

<Info>
  This method emits [`calling.call.transcribe`][calling-call-transcribe] events. See [Call Events][call-events] for payload details.
</Info>

## **Parameters**

<ParamField path="controlId" type="string | undefined" toc={true}>
  Custom control ID. Auto-generated if not provided.
</ParamField>

<ParamField path="statusUrl" type="string | undefined" toc={true}>
  URL to receive transcription status webhooks.
</ParamField>

<ParamField path="onCompleted" type="(event: RelayEvent) => void | Promise<void>" toc={true}>
  Callback invoked when transcription completes. The event contains the
  transcription `url`, `duration`, and `size`.
</ParamField>

## **Returns**

`Promise<`[`TranscribeAction`][transcribeaction]`>` -- An action handle
with `stop()` and `wait()` methods.

## **Example**

```typescript {13}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_TOKEN!,
  contexts: ['default']
});

client.onCall(async (call) => {
  await call.answer();

  // Start transcription
  const action = await call.transcribe({
    statusUrl: 'https://example.com/transcription-status',
  });

  // Let the call proceed...
  await call.waitForEnded();

  // The transcription result is available after the call ends
  if (action.result) {
    const url = action.result.params.url ?? '';
    console.log(`Transcription available at: ${url}`);
  }
});

await client.run();
```