> ## Documentation Index
> Fetch the complete documentation index at: https://docs-classic.cognigy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# transcription

> The transcription event delivers real-time voice transcription data during a call.

Emitted when transcription data is received during a call. Transcription messages are automatically separated from regular [`infoReceived`](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/info-received) events.

## Category

Transcription

## Callback Parameters

| Parameter | Type | Description |
| - | - | - |
| `transcription` | `object` | The transcription data extracted from the `_transcription` property of the incoming SIP INFO message. |

The transcription object typically has the following structure (depending on your Voice Gateway configuration):

| Property | Type | Description |
| - | - | - |
| `originator` | `string` | Indicates the source of the transcription, for example, `'user'` or `'bot'`. |
| `messages` | `{ text: string }[]` | Array of message objects, each containing a `text` field. |

## Example

```typescript theme={null}
client.on('transcription', (transcription) => {
  const speaker = transcription.originator === 'user' ? 'User' : 'Bot';
  transcription.messages.forEach((message) => {
    console.log(`${speaker}: ${message.text}`);
  });
});
```

> [!NOTE]
>
> If an incoming info message contains a `_transcription` property, it is emitted only as a `transcription` event — not as an [`infoReceived`](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/info-received) event.

## Transcription Filtering

The SDK automatically separates transcription data from regular info messages. No additional configuration is needed — the filtering is handled automatically:

* **`transcription` event**: Receives only messages that contain a `_transcription` property.
* **`infoReceived` event**: Receives all other info messages.

This means you can listen to both events independently without worrying about duplicates.

## More Information

* [infoReceived](https://docs-classic.cognigy.com/click-to-call/sdk/event-reference/info-received.md)
* [Types](https://docs-classic.cognigy.com/click-to-call/sdk/api-reference/types.md#transcription-data)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.