Skip to main content

Required Environment Variables

  • LINGOPAL_API_KEY: Your API key for authentication
  • LINGOPAL_INGEST_URL: The SRT ingest URL (e.g., srt://your.server:7070)

Example

Python Implementation

What This Does

This example demonstrates how to:
  1. Set up environment variables for your API key and ingest URL
  2. Create a payload with all the necessary stream parameters
  3. Make an authenticated API request to start your stream
  4. Handle the response from the API

Parameters Explained

  • ingest_url: Your SRT stream source URL
  • src_language: Source language (e.g., β€œen” for English)
  • dst_language: Target language(s) for translation (e.g., [β€œes”] for Spanish)
  • enable_captions_708/608: Enable CEA-708 or CEA-608 captions
  • vocals_track: Audio track for vocals (default: β€œ0”)
  • background_track: Audio track for background audio (default: 1)
  • mix: Audio mix settings (default: β€œ-9,-6”)
  • lipsync: Enable lip synchronization
  • use_contextual_translation: Enable contextual translation
  • start_wowza: Start Wowza streaming server
  • is_hls_stream: Set to true for HLS streams

Next Steps

After starting your stream, you can:
  • Monitor stream status using the stream ID returned
  • Retrieve transcripts and captions
  • Stop the stream when finished
  • View analytics and usage data
For more information about the WebSocket protocol and message formats, see the Introduction documentation.

Getting Help