Skip to main content
WSS

Documentation Index

Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt

Use this file to discover all available pages before exploring further.

Connect to the WebSocket and send STT requests to transcribe audio into text.

Quick Start

  1. Enter your API key in the authentication field
  2. Click Connect to establish the WebSocket connection
  3. Provide base64-encoded audio data
  4. Click Send to receive transcription

Request Message

After connecting, send a JSON message with the following structure:
type
string
required
Must be "stt"
payload
object
required
STT Request
{
  "type": "stt",
  "payload": {
    "audioBase64": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAIA+AAACABAAZGF0YQAAAAA=",
    "language": "ar",
    "isEosEnabled": true,
    "eosThreshold": 0.3
  }
}

Response Format

Transcription Result
مرحبا بك في خدمة همسة
Error Response
{
  "type": "error",
  "payload": {
    "message": "Error generating transcription: Audio format not supported"
  }
}
The transcribed text is returned as a plain string, not wrapped in JSON.

Supported Audio Formats

Any audio format supported by the backend (WAV, MP3, etc.), base64-encoded.
Messages
api_key
type:httpApiKey

API key passed as query parameter or X-Api-Key header

STT Request
type:object

Request to transcribe audio to text

STT Response
type:string

Transcribed text result

Error Response
type:object

Error message from the server