Skip to main content

WebSocket API Introduction

The 60db WebSocket API provides real-time, bidirectional streaming for Speech-to-Text (STT) and Text-to-Speech (TTS) services.

Base URL

Available Endpoints

Why WebSocket?

WebSocket provides several advantages over REST API for audio processing:
  • Real-time streaming: Low-latency bidirectional communication
  • Continuous audio: Stream audio chunks as they’re recorded
  • Live transcription: Get partial results while speaking
  • Efficient: No need to send complete audio files
  • Interactive: Natural conversation experience

Quick Start

1. Connect with API Key

2. Handle Connection Events

3. Send Messages

4. Send Binary Data

Connection Flow

Authentication

WebSocket connections authenticate via query parameter:
Or with JWT token:

Message Format

All control messages are JSON formatted:
Binary audio data is sent as raw bytes without JSON encoding.

Next Steps