> ## 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.

# Stream de Transcripciones

> Transcripciones de conferencias de resultados en tiempo real, frase por frase a medida que se pronuncian.

<div id="overview">
  ## Descripción general
</div>

Suscríbete a transcripciones en tiempo real de llamadas de resultados y recibe actualizaciones frase por frase a medida que se pronuncian durante las llamadas de resultados en vivo. Ideal para crear visores de transcripciones en tiempo real y herramientas de análisis.

<div id="key-features">
  ### Funcionalidades principales
</div>

* **Transcripción en vivo**: Obtén actualizaciones de frases en tiempo real mientras los oradores hablan durante las llamadas de resultados
* **Temporización a nivel de palabra**: Cada frase incluye marcas de tiempo para cada palabra y puntuaciones de confianza
* **Identificación de oradores**: Realiza un seguimiento de quién está hablando (ejecutivos, analistas, etc.)
* **Seguimiento del estado**: Supervisa si las transcripciones están en curso o completas
* **Suscripción flexible**: Suscríbete a símbolos bursátiles específicos o a todas las transcripciones con `*`
* **Pruebas con datos simulados**: Prueba tu integración con datos simulados cuando no haya llamadas en vivo en curso

<div id="use-cases">
  ### Casos de uso
</div>

* Crear visualizadores en tiempo real de transcripciones de llamadas de resultados
* Crear herramientas de subtitulado en vivo y de accesibilidad
* Realizar análisis de sentimiento en tiempo real sobre llamadas de resultados
* Extraer frases y métricas clave a medida que se mencionan
* Generar alertas para palabras clave o temas específicos durante llamadas en vivo
* Archivar transcripciones completas con marcas de tiempo precisas

<div id="quick-start">
  ## Inicio rápido
</div>

Usa la herramienta interactiva de prueba de WebSocket de arriba para conectarte y probar el flujo en tiempo real.

<div id="connection-url">
  ### URL de conexión
</div>

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

<div id="query-parameters">
  ### Parámetros de consulta
</div>

| Parámetro | Obligatorio | Descripción                              |
| --------- | ----------- | ---------------------------------------- |
| `token`   | Sí          | Tu token de la API WebSocket de Benzinga |

<div id="subscription-commands">
  ## Comandos de suscripción
</div>

Envía comandos en JSON para controlar tus suscripciones:

<div id="subscribe-to-a-ticker">
  ### Suscribirse a un ticker
</div>

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

<div id="subscribe-to-all-transcripts">
  ### Suscribirse a todas las transcripciones
</div>

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

<div id="unsubscribe-from-a-ticker">
  ### Cancelar la suscripción a un ticker
</div>

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

<div id="list-active-transcripts">
  ### Listar transcripciones activas
</div>

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

<div id="keep-connection-alive">
  ### Mantén la conexión activa
</div>

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

<div id="test-with-mock-data">
  ### Prueba con datos simulados
</div>

Cuando no haya transcripciones en tiempo real disponibles, usa el modo simulado para realizar pruebas:

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

Tickers simulados admitidos: `AAPL`, `MSFT`, `TSLA`

<div id="message-example">
  ## Ejemplo de mensaje
</div>

```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"
}
```

<div id="key-fields">
  ### Campos clave
</div>

| Campo                     | Descripción                                                              |
| ------------------------- | ------------------------------------------------------------------------ |
| `sentence`                | El texto completo de la frase pronunciada                                |
| `sequence`                | Orden de esta frase dentro de la transcripción (0, 1, 2...)              |
| `speaker`                 | Nombre/identificador de la persona que habla                             |
| `status`                  | `IN_PROGRESS` (en curso) o `COMPLETE` (completado)                       |
| `confidence`              | Confianza general en la precisión (0.0 - 1.0)                            |
| `words`                   | Lista de palabras individuales con marcas de tiempo y nivel de confianza |
| `start_time` / `end_time` | Marcas de tiempo ISO 8601 para el inicio y fin de la frase               |

<div id="transcript-status">
  ### Estado de la transcripción
</div>

| Estado        | Descripción                                                       |
| ------------- | ----------------------------------------------------------------- |
| `IN_PROGRESS` | La transcripción está en vivo y recibiendo actualizaciones        |
| `COMPLETE`    | La transcripción ha finalizado, no se esperan más actualizaciones |

<div id="word-level-data">
  ## Datos a nivel de palabra
</div>

Cada oración incluye información detallada a nivel de palabra:

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

* **text**: La palabra en sí
* **confidence**: Confianza de reconocimiento (0.0 - 1.0)
* **start/end**: Desplazamientos de tiempo en milisegundos desde el inicio de la oración

<div id="interactive-commands">
  ## Comandos interactivos
</div>

| Comando       | Parámetros | Descripción                                                       |
| ------------- | ---------- | ----------------------------------------------------------------- |
| `subscribe`   | `ticker`   | Suscribirse a las actualizaciones de transcripciones de un ticker |
| `unsubscribe` | `ticker`   | Dejar de recibir actualizaciones de transcripciones de un ticker  |
| `list`        | -          | Obtener la lista de transcripciones activas/disponibles           |
| `subscribed`  | -          | Obtener la lista de tus suscripciones actuales                    |
| `ping`        | -          | Mantener viva la conexión (responde con `pong`)                   |
| `echo`        | `message`  | Prueba de eco (responde con tu mensaje)                           |

<div id="best-practices">
  ## Prácticas recomendadas
</div>

<div id="real-time-display">
  ### Visualización en tiempo real
</div>

* **Gestión de búfer**: Muestra las oraciones en orden de secuencia utilizando el campo `sequence`
* **Formato de orador**: Aplica un formato diferente según el valor de `speaker` (ejecutivos vs analistas)
* **Indicadores de estado**: Muestra indicadores visuales para los estados `IN_PROGRESS` y `COMPLETE`

<div id="performance">
  ### Rendimiento
</div>

* **Precaución con comodines**: Usar `ticker: "*"` te suscribe a TODAS las transcripciones, lo que puede generar un volumen elevado
* **Suscripciones específicas**: Suscríbete solo a los símbolos bursátiles que necesitas para reducir el uso de ancho de banda
* **Heartbeat**: Envía `ping` cada 30–60 segundos para mantener la conexión

<div id="data-quality">
  ### Calidad de datos
</div>

* **Filtrado por confianza**: Considera ignorar o marcar las oraciones con puntuaciones de confianza bajas
* **Precisión de palabras**: Utiliza la confianza a nivel de palabra para identificar transcripciones dudosas
* **Gestión del idioma**: Verifica el campo `language` para una representación adecuada del texto

<div id="testing">
  ### Pruebas
</div>

* **Modo simulado**: Usa `mock: true` para desarrollo cuando no haya llamadas en vivo activas
* **Prueba de eco**: Usa la acción `echo` para verificar la conexión y el manejo de mensajes
* **Comando de lista**: Consulta `list` para ver qué está disponible actualmente

<div id="example-integration">
  ## Ejemplo de integración
</div>

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

ws.onopen = () => {
  // Suscribirse a las transcripciones de Apple
  ws.send(JSON.stringify({
    action: 'subscribe',
    ticker: 'AAPL'
  }));
};

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

  // Mostrar la frase con el interlocutor
  console.log(`[${data.sequence}] ${data.speaker}: ${data.sentence}`);

  // Verificar si la transcripción está completa
  if (data.status === 'COMPLETE') {
    console.log('Transcripción finalizada');
  }
};

// Mantener la conexión activa
setInterval(() => {
  ws.send(JSON.stringify({ action: 'ping' }));
}, 30000);
```

<div id="related-documentation">
  ## Documentación relacionada
</div>

* [Introducción a WebSocket](../introduction) - Conceptos generales sobre WebSocket y aspectos básicos de la conexión
* [Autenticación](../authentication) - Cómo obtener y usar tokens de la API


## 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
                properties:
                  - name: confidence
                    type: number
                    description: Confidence score for word recognition
                    required: false
                  - name: start
                    type: integer
                    description: Start time offset in milliseconds
                    required: false
                  - name: end
                    type: integer
                    description: End time offset in milliseconds
                    required: false
                  - name: text
                    type: string
                    description: The word text
                    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
                properties:
                  - name: item
                    type: object
                    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: []

````