Skip to main content

Run the example WebSocket client script:

Arguments:

  • <stream_id>: The stream UUID you get from Lingopal
  • <api_key>: Your Lingopal API key
  • [env] (optional):
    • prod (default): connect to production

Example

This will:

  • Connect to the transcription WebSocket server
  • Print any messages received from the server

Notes

  • The client uses the websockets library
  • If connection fails due to a missing header argument, make sure you’re using websockets>=11.0
  • Example script is located at examples/run_client.py

Usage

The WebSocket client allows you to receive real-time transcription data from your active streams. This is useful for:
  • Real-time captioning applications
  • Live translation services
  • Stream monitoring and analytics
  • Interactive applications that need immediate transcript updates

Connection Details

The WebSocket client automatically handles:
  • Authentication using your API key
  • Connection to the appropriate environment (production by default)
  • Message parsing and formatting
  • Error handling and reconnection logic
For more information about the WebSocket protocol and message formats, see the Introduction documentation.

Getting Help