Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/__redirects
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,7 @@
/workers-ai/models/text-classification/ /workers-ai/models/#text-classification 301
/workers-ai/models/image-classification/ /workers-ai/models/#image-classification 301
/workers-ai/models/openchat_3.5-awq/ /workers-ai/models/ 301
/workers-ai/models/deepgram-nova-3/ /workers-ai/models/nova-3/ 301
/workers-ai/platform/bindings/ /workers-ai/configuration/bindings/ 301
/workers-ai/get-started/local-dev-setup/ /workers-ai/get-started/workers-wrangler/ 301
/workers-ai/configuration/function-calling/ /workers-ai/features/function-calling/ 301
Expand Down
124 changes: 62 additions & 62 deletions src/content/docs/realtime/realtimekit/ai/transcription.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@

RealtimeKit provides two transcription modes powered by Cloudflare Workers AI:

| Mode | Model | Use Case |
|------|-------|----------|
| **Real-time** | [Deepgram Nova-3](/workers-ai/models/deepgram-nova-3/) | Live captions during meeting |
| Mode | Model | Use Case |
| ---------------- | -------------------------------------------------------------------- | ------------------------------ |
| **Real-time** | [Deepgram Nova-3](/workers-ai/models/nova-3/) | Live captions during meeting |

Check warning on line 12 in src/content/docs/realtime/realtimekit/ai/transcription.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-month

Potential month found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
| **Post-meeting** | [Whisper Large v3 Turbo](/workers-ai/models/whisper-large-v3-turbo/) | Accurate offline transcription |

## Real-time transcription

Streams transcripts to participants as they speak using [Deepgram Nova-3](/workers-ai/models/deepgram-nova-3/) via Cloudflare AI Gateway.
Streams transcripts to participants as they speak using [Deepgram Nova-3](/workers-ai/models/nova-3/) via Cloudflare AI Gateway.

Check warning on line 17 in src/content/docs/realtime/realtimekit/ai/transcription.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-month

Potential month found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

### Enable via preset

Set `transcription_enabled: true` in the participant's [preset](/realtime/realtimekit/concepts/preset/):

```json
{
"name": "webinar_host",
"transcription_enabled": true
"name": "webinar_host",
"transcription_enabled": true
}
```

Expand All @@ -35,26 +35,26 @@

```json
{
"title": "Team Standup",
"ai_config": {
"transcription": {
"language": "en-US",
"keywords": ["RealtimeKit", "Cloudflare"],
"profanity_filter": false
}
}
"title": "Team Standup",
"ai_config": {
"transcription": {
"language": "en-US",
"keywords": ["RealtimeKit", "Cloudflare"],
"profanity_filter": false
}
}
}
```

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `language` | string | `en-US` | Language code for transcription |
| `keywords` | string[] | `[]` | Terms to boost recognition (names, jargon) |
| `profanity_filter` | boolean | `false` | Filter offensive language |
| Option | Type | Default | Description |
| ------------------ | -------- | ------- | ------------------------------------------ |
| `language` | string | `en-US` | Language code for transcription |
| `keywords` | string[] | `[]` | Terms to boost recognition (names, jargon) |
| `profanity_filter` | boolean | `false` | Filter offensive language |

### Supported languages

Supports all languages available in [Deepgram Nova-3](/workers-ai/models/deepgram-nova-3/)
Supports all languages available in [Deepgram Nova-3](/workers-ai/models/nova-3/)

Check warning on line 57 in src/content/docs/realtime/realtimekit/ai/transcription.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-month

Potential month found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

### Consume transcripts

Expand All @@ -66,37 +66,37 @@

// Listen for new transcripts
meeting.ai.on("transcript", (data) => {
if (data.isPartialTranscript) {
// Interim result - speaker still talking
updateLiveCaption(data.peerId, data.transcript);
} else {
// Final result
appendToHistory(data);
}
if (data.isPartialTranscript) {
// Interim result - speaker still talking
updateLiveCaption(data.peerId, data.transcript);
} else {
// Final result
appendToHistory(data);
}
});
```

#### Transcript payload

```json
{
"id": "1a2b3c4d-5678-90ab-cdef-1234567890ab",
"name": "Alice",
"peerId": "4f5g6h7i-8j9k-0lmn-opqr-1234567890st",
"userId": "uvwxyz-1234-5678-90ab-cdefghijklmn",
"customParticipantId": "abc123xyz",
"transcript": "Hello everyone",
"isPartialTranscript": false,
"date": "2024-08-07T10:15:30.000Z"
"id": "1a2b3c4d-5678-90ab-cdef-1234567890ab",
"name": "Alice",
"peerId": "4f5g6h7i-8j9k-0lmn-opqr-1234567890st",
"userId": "uvwxyz-1234-5678-90ab-cdefghijklmn",
"customParticipantId": "abc123xyz",
"transcript": "Hello everyone",
"isPartialTranscript": false,
"date": "2024-08-07T10:15:30.000Z"
}
```

| Field | Description |
|-------|-------------|
| Field | Description |
| --------------------- | -------------------------------------------------- |
| `isPartialTranscript` | `true` = interim (still speaking), `false` = final |
| `peerId` | Changes if participant rejoins |
| `userId` | Persistent participant ID |
| `customParticipantId` | Your custom ID from Add Participant API |
| `peerId` | Changes if participant rejoins |
| `userId` | Persistent participant ID |
| `customParticipantId` | Your custom ID from Add Participant API |

---

Expand All @@ -114,12 +114,12 @@

### Output formats

| Format | Use Case |
|--------|----------|
| **CSV** | Spreadsheets, data analysis |
| **SRT** | Video subtitle files |
| **VTT** | Web video captions (`<track>` element) |
| **JSON** | Programmatic access |
| Format | Use Case |
| -------- | -------------------------------------- |
| **CSV** | Spreadsheets, data analysis |
| **SRT** | Video subtitle files |
| **VTT** | Web video captions (`<track>` element) |
| **JSON** | Programmatic access |

#### CSV example

Expand All @@ -133,17 +133,17 @@

```json
[
{
"startTime": 0,
"endTime": 2.5,
"sentence": "Hello everyone",
"peerData": {
"id": "peer-123",
"userId": "user-456",
"displayName": "Alice",
"cpi": "cust-789"
}
}
{
"startTime": 0,
"endTime": 2.5,
"sentence": "Hello everyone",
"peerData": {
"id": "peer-123",
"userId": "user-456",
"displayName": "Alice",
"cpi": "cust-789"
}
}
]
```

Expand All @@ -155,11 +155,11 @@

```json
{
"event": "meeting.transcript",
"meetingId": "meeting-123",
"sessionId": "session-456",
"transcriptDownloadUrl": "https://...",
"transcriptDownloadUrlExpiry": "2024-08-14T10:15:30.000Z"
"event": "meeting.transcript",
"meetingId": "meeting-123",
"sessionId": "session-456",
"transcriptDownloadUrl": "https://...",
"transcriptDownloadUrlExpiry": "2024-08-14T10:15:30.000Z"
}
```

Expand Down