SLNG. WebSocket API

TTS Open Source

Endpoint:https://api.slng.ai

Orpheus WS Stream

GET
https://api.slng.ai
/v1/tts/slng/orpheus-websocket-stream

Real-time text-to-speech synthesis using Orpheus model via WebSocket connection. Uses SLNG unified protocol with graceful degradation - same client code works across all TTS providers. Supports both unified parameters and legacy SLNG-specific parameters for backward compatibility.

Orpheus WS Streamquery Parameters

  • voice_idstring

    🔄 UNIFIED: Voice identifier. Standard parameter that works across all TTS providers. For Orpheus: maps to SLNG-hosted model voice parameter.

    Default: tara
  • regionstring · enum

    🔄 UNIFIED: Compute region for processing

    Enum values:
    us-west
    us-east
    eu-west
    Default: us-west
  • sample_rate_hzinteger · enum

    🔄 UNIFIED: Audio sample rate in Hz

    Enum values:
    8000
    16000
    24000
    48000
    Default: 24000
  • codecstring · enum

    🔄 UNIFIED: Audio codec format

    Enum values:
    pcm16
    opus
    Default: pcm16
  • voicestring

    ⚠️ LEGACY: SLNG-hosted model specific voice parameter. Use 'voice_id' for unified protocol compatibility.

  • buffer_sizeinteger

    ⚠️ LEGACY: SLNG-hosted model buffer size (words before auto-flush). Use unified 'configure' commands in protocol instead.

    Default: 10
  • temperaturenumber · min: 0 · max: 1

    ⚠️ LEGACY: SLNG-hosted model temperature (synthesis variability). Use unified TTS extension 'style' parameters in init command.

    Default: 0.6

Orpheus WS StreamHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • Upgradestring · enum · required

    Must be 'websocket' for WebSocket upgrade

    Enum values:
    websocket
  • Connectionstring · enum · required

    Must be 'Upgrade' for WebSocket upgrade

    Enum values:
    Upgrade

Orpheus WS StreamResponses

Switching Protocols - WebSocket connection established

No data returned

Aura2 EN WS Stream

GET
https://api.slng.ai
/v1/tts/slng/aura2-en-websocket-stream

Real-time Aura-2 English text-to-speech via Modal deployment using SLNG unified WebSocket protocol.

Aura2 EN WS Streamquery Parameters

  • modelstring

    Aura-2 model identifier (voice)

    Default: aura-2-thalia-en
  • encodingstring · enum

    Audio encoding format

    Enum values:
    linear16
    mp3
    opus
    Default: linear16
  • sample_rateinteger · enum

    Sample rate in Hz

    Enum values:
    16000
    22050
    24000
    32000
    44100
    48000
    Default: 24000
  • containerstring · enum

    Container format

    Enum values:
    none
    wav
    ogg
    Default: none

Aura2 EN WS StreamHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • Upgradestring · enum · required

    Must be 'websocket' for WebSocket upgrade

    Enum values:
    websocket
  • Connectionstring · enum · required

    Must be 'Upgrade' for WebSocket upgrade

    Enum values:
    Upgrade

Aura2 EN WS StreamResponses

Switching Protocols - WebSocket connection established

No data returned