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

# Transcripts Stream

> Real-time earnings call transcripts sentence-by-sentence as they're spoken.

## Overview

Subscribe to real-time earnings call transcripts and receive sentence-by-sentence updates as they're spoken during live earnings calls. Perfect for building real-time transcript viewers and analysis tools.

### Key Features

* **Live Transcription**: Get real-time sentence updates as speakers talk during earnings calls
* **Word-Level Timing**: Each sentence includes individual word timestamps and confidence scores
* **Speaker Identification**: Track who is speaking (executives, analysts, etc.)
* **Status Tracking**: Monitor whether transcripts are in progress or complete
* **Flexible Subscription**: Subscribe to specific tickers or all transcripts with `*`
* **Mock Testing**: Test your integration with mock data when no live calls are active

### Use Cases

* Build real-time earnings call transcript viewers
* Create live captioning and accessibility tools
* Perform real-time sentiment analysis on earnings calls
* Extract key phrases and metrics as they're mentioned
* Alert on specific keywords or topics during live calls
* Archive complete transcripts with precise timing data

## Quick Start

Use the interactive WebSocket tester above to connect and test the stream in real-time.

### Connection URL

```
wss://api.benzinga.com/api/v1/transcripts/stream?token=YOUR_TOKEN
```

### Query Parameters

| Parameter | Required | Description                       |
| --------- | -------- | --------------------------------- |
| `token`   | Yes      | Your Benzinga WebSocket API token |

## Subscription Commands

Send JSON commands to control your subscriptions:

### Subscribe to a Ticker

```json theme={null}
{
  "action": "subscribe",
  "ticker": "AAPL"
}
```

### Subscribe to All Transcripts

```json theme={null}
{
  "action": "subscribe",
  "ticker": "*"
}
```

### Unsubscribe from a Ticker

```json theme={null}
{
  "action": "unsubscribe",
  "ticker": "AAPL"
}
```

### List Active Transcripts

```json theme={null}
{
  "action": "list"
}
```

### Keep Connection Alive

```json theme={null}
{
  "action": "ping"
}
```

### Test with Mock Data

When no live transcripts are available, use mock mode for testing:

```json theme={null}
{
  "action": "subscribe",
  "ticker": "AAPL",
  "mock": true
}
```

Supported mock tickers: `AAPL`, `MSFT`, `TSLA`

## Message Example

```json theme={null}
{
  "call_id": "call_123456",
  "transcript_id": "550e8400-e29b-41d4-a716-446655440000",
  "call_title": "Apple Inc. Q4 2024 Earnings Call",
  "sentence": "Revenue for the quarter was 89.5 billion dollars.",
  "start_time": "2024-01-15T16:30:15Z",
  "end_time": "2024-01-15T16:30:19Z",
  "symbol": "AAPL",
  "exchange": "NASDAQ",
  "name": "Apple Inc.",
  "sequence": 42,
  "status": "IN_PROGRESS",
  "speaker": "Tim Cook, CEO",
  "type": "LIVE",
  "language": "en",
  "confidence": 0.98,
  "words": [
    {
      "text": "Revenue",
      "confidence": 0.99,
      "start": 0,
      "end": 450
    },
    {
      "text": "for",
      "confidence": 0.98,
      "start": 450,
      "end": 600
    }
  ],
  "created_time": "2024-01-15T16:30:19Z"
}
```

### Key Fields

| Field                     | Description                                           |
| ------------------------- | ----------------------------------------------------- |
| `sentence`                | The complete sentence text spoken                     |
| `sequence`                | Order of this sentence in the transcript (0, 1, 2...) |
| `speaker`                 | Name/identifier of the person speaking                |
| `status`                  | `IN_PROGRESS` (live) or `COMPLETE` (finished)         |
| `confidence`              | Overall accuracy confidence (0.0 - 1.0)               |
| `words`                   | Array of individual words with timing and confidence  |
| `start_time` / `end_time` | ISO 8601 timestamps for sentence timing               |

### Transcript Status

| Status        | Description                                        |
| ------------- | -------------------------------------------------- |
| `IN_PROGRESS` | Transcript is currently live and receiving updates |
| `COMPLETE`    | Transcript has finished, no more updates expected  |

## Word-Level Data

Each sentence includes detailed word-level information:

```json theme={null}
{
  "text": "Revenue",
  "confidence": 0.99,
  "start": 0,
  "end": 450
}
```

* **text**: The word itself
* **confidence**: Recognition confidence (0.0 - 1.0)
* **start/end**: Timing offsets in milliseconds from sentence start

## Interactive Commands

| Command       | Parameters | Description                                  |
| ------------- | ---------- | -------------------------------------------- |
| `subscribe`   | `ticker`   | Subscribe to transcript updates for a ticker |
| `unsubscribe` | `ticker`   | Stop receiving updates for a ticker          |
| `list`        | -          | Get list of active/available transcripts     |
| `subscribed`  | -          | Get list of your current subscriptions       |
| `ping`        | -          | Keep connection alive (responds with `pong`) |
| `echo`        | `message`  | Echo test (responds with your message)       |

## Best Practices

### Real-Time Display

* **Buffer Management**: Display sentences in sequence order using the `sequence` field
* **Speaker Formatting**: Format differently based on `speaker` (executives vs analysts)
* **Status Indicators**: Show visual indicators for `IN_PROGRESS` vs `COMPLETE` status

### Performance

* **Wildcard Caution**: Using `ticker: "*"` subscribes to ALL transcripts, which can be high volume
* **Targeted Subscriptions**: Subscribe only to tickers you need to reduce bandwidth
* **Heartbeat**: Send `ping` every 30-60 seconds to maintain connection

### Data Quality

* **Confidence Filtering**: Consider ignoring or flagging sentences with low confidence scores
* **Word Accuracy**: Use word-level confidence to identify uncertain transcriptions
* **Language Handling**: Check `language` field for proper text rendering

### Testing

* **Mock Mode**: Use `mock: true` for development when no live calls are active
* **Echo Testing**: Use `echo` action to verify connection and message handling
* **List Command**: Check `list` to see what's currently available

## Example Integration

```javascript theme={null}
const ws = new WebSocket(
  'wss://api.benzinga.com/api/v1/transcripts/stream?token=YOUR_TOKEN'
);

ws.onopen = () => {
  // Subscribe to Apple transcripts
  ws.send(JSON.stringify({
    action: 'subscribe',
    ticker: 'AAPL'
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);

  // Display the sentence with speaker
  console.log(`[${data.sequence}] ${data.speaker}: ${data.sentence}`);

  // Check if transcript is complete
  if (data.status === 'COMPLETE') {
    console.log('Transcript finished');
  }
};

// Keep connection alive
setInterval(() => {
  ws.send(JSON.stringify({ action: 'ping' }));
}, 30000);
```

## Related Documentation

* [WebSocket Introduction](../introduction) - General WebSocket concepts and connection basics
* [Authentication](../authentication) - How to obtain and use API tokens


## AsyncAPI

````yaml asyncapi/transcripts-stream.yml transcripts
id: transcripts
title: Transcripts
description: Send action commands; receive real-time transcript updates
servers:
  - id: production
    protocol: wss
    host: api.benzinga.com/api/v1/transcripts
    bindings: []
    variables: []
address: stream
parameters: []
bindings: []
operations:
  - &ref_1
    id: transcripts.publish
    title: Transcripts.publish
    description: Send commands to the server
    type: receive
    messages:
      - &ref_3
        id: publish
        contentType: application/json
        payload:
          - name: publish
            description: WebSocket command to interact with transcript stream
            type: object
            properties:
              - name: action
                type: string
                description: Action to perform
                enumValues:
                  - list
                  - subscribe
                  - unsubscribe
                  - subscribed
                  - echo
                  - ping
                required: true
              - name: ticker
                type: string
                description: Stock ticker symbol (e.g., AAPL) or '*' for all transcripts
                required: false
              - name: message
                type: string
                description: Optional message for echo testing
                required: false
              - name: mock
                type: boolean
                description: Optional boolean for mock testing when no live transcripts
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - action
          properties:
            action:
              type: string
              enum:
                - list
                - subscribe
                - unsubscribe
                - subscribed
                - echo
                - ping
              description: Action to perform
              x-parser-schema-id: <anonymous-schema-2>
            ticker:
              type: string
              description: Stock ticker symbol (e.g., AAPL) or '*' for all transcripts
              x-parser-schema-id: <anonymous-schema-3>
            message:
              type: string
              description: Optional message for echo testing
              x-parser-schema-id: <anonymous-schema-4>
            mock:
              type: boolean
              description: Optional boolean for mock testing when no live transcripts
              x-parser-schema-id: <anonymous-schema-5>
          x-parser-schema-id: <anonymous-schema-1>
        title: Publish
        description: WebSocket command to interact with transcript stream
        example: |-
          {
            "action": "list"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: publish
          - id: x-parser-message-name
            value: ActionRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: transcripts
  - &ref_2
    id: transcripts.subscribe
    title: Transcripts.subscribe
    description: Receive real-time transcript data
    type: send
    messages:
      - &ref_4
        id: subscribe
        contentType: application/json
        payload:
          - name: subscribe
            description: Real-time transcript message
            type: object
            properties:
              - name: call_id
                type: string
                description: Unique identifier for the earnings call
                required: true
              - name: transcript_id
                type: string
                description: Unique identifier for this transcript
                required: true
              - name: call_title
                type: string
                description: Title of the earnings call
                required: false
              - name: sentence
                type: string
                description: The spoken sentence text
                required: true
              - name: start_time
                type: string
                description: When this sentence started
                required: false
              - name: end_time
                type: string
                description: When this sentence ended
                required: false
              - name: symbol
                type: string
                description: Stock ticker symbol (e.g., AAPL)
                required: true
              - name: exchange
                type: string
                description: Exchange where security is listed
                required: false
              - name: isin
                type: string
                description: International Securities Identification Number
                required: false
              - name: cusip
                type: string
                description: CUSIP identifier
                required: false
              - name: name
                type: string
                description: Company name
                required: false
              - name: sequence
                type: integer
                description: Sequence number of this sentence in the transcript
                required: true
              - name: status
                type: string
                description: Status of the transcript
                enumValues:
                  - IN_PROGRESS
                  - COMPLETE
                required: true
              - name: words
                type: array
                description: Individual words with timing and confidence
                required: false
              - name: confidence
                type: number
                description: Overall confidence score for the sentence
                required: false
              - name: speaker
                type: string
                description: Name or identifier of the speaker
                required: false
              - name: type
                type: string
                description: Type of transcript (LIVE for real-time)
                enumValues:
                  - LIVE
                required: false
              - name: language
                type: string
                description: Language code (e.g., en, en-US)
                required: false
              - name: participants
                type: array
                description: List of call participants
                required: false
              - name: created_time
                type: string
                description: When this transcript entry was created
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - call_id
            - transcript_id
            - sentence
            - symbol
            - sequence
            - status
          properties:
            call_id:
              type: string
              description: Unique identifier for the earnings call
              x-parser-schema-id: <anonymous-schema-7>
            transcript_id:
              type: string
              format: uuid
              description: Unique identifier for this transcript
              x-parser-schema-id: <anonymous-schema-8>
            call_title:
              type: string
              description: Title of the earnings call
              x-parser-schema-id: <anonymous-schema-9>
            sentence:
              type: string
              description: The spoken sentence text
              x-parser-schema-id: <anonymous-schema-10>
            start_time:
              type: string
              format: date-time
              description: When this sentence started
              x-parser-schema-id: <anonymous-schema-11>
            end_time:
              type: string
              format: date-time
              description: When this sentence ended
              x-parser-schema-id: <anonymous-schema-12>
            symbol:
              type: string
              description: Stock ticker symbol (e.g., AAPL)
              x-parser-schema-id: <anonymous-schema-13>
            exchange:
              type: string
              description: Exchange where security is listed
              x-parser-schema-id: <anonymous-schema-14>
            isin:
              type: string
              description: International Securities Identification Number
              x-parser-schema-id: <anonymous-schema-15>
            cusip:
              type: string
              description: CUSIP identifier
              x-parser-schema-id: <anonymous-schema-16>
            name:
              type: string
              description: Company name
              x-parser-schema-id: <anonymous-schema-17>
            sequence:
              type: integer
              description: Sequence number of this sentence in the transcript
              x-parser-schema-id: <anonymous-schema-18>
            status:
              type: string
              enum:
                - IN_PROGRESS
                - COMPLETE
              description: Status of the transcript
              x-parser-schema-id: <anonymous-schema-19>
            words:
              type: array
              description: Individual words with timing and confidence
              items:
                type: object
                properties:
                  confidence:
                    type: number
                    description: Confidence score for word recognition
                    x-parser-schema-id: <anonymous-schema-22>
                  start:
                    type: integer
                    description: Start time offset in milliseconds
                    x-parser-schema-id: <anonymous-schema-23>
                  end:
                    type: integer
                    description: End time offset in milliseconds
                    x-parser-schema-id: <anonymous-schema-24>
                  text:
                    type: string
                    description: The word text
                    x-parser-schema-id: <anonymous-schema-25>
                x-parser-schema-id: <anonymous-schema-21>
              x-parser-schema-id: <anonymous-schema-20>
            confidence:
              type: number
              description: Overall confidence score for the sentence
              x-parser-schema-id: <anonymous-schema-26>
            speaker:
              type: string
              description: Name or identifier of the speaker
              x-parser-schema-id: <anonymous-schema-27>
            type:
              type: string
              enum:
                - LIVE
              description: Type of transcript (LIVE for real-time)
              x-parser-schema-id: <anonymous-schema-28>
            language:
              type: string
              description: Language code (e.g., en, en-US)
              x-parser-schema-id: <anonymous-schema-29>
            participants:
              type: array
              nullable: true
              description: List of call participants
              items:
                type: object
                x-parser-schema-id: <anonymous-schema-31>
              x-parser-schema-id: <anonymous-schema-30>
            created_time:
              type: string
              format: date-time
              description: When this transcript entry was created
              x-parser-schema-id: <anonymous-schema-32>
          x-parser-schema-id: <anonymous-schema-6>
        title: Subscribe
        description: Real-time transcript message
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
          - id: x-parser-message-name
            value: TranscriptMessage
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: transcripts
securitySchemes:
  - id: tokenAuth
    name: token
    type: httpApiKey
    description: Benzinga WebSocket API token
    in: query
    extensions: []

````