Overview
UneeQ is a digital human platform that can use a custom voice service for text-to-speech synthesis. This guide explains how to connect UneeQ to Hamsa’s real-time TTS engine so your digital human speaks with a Hamsa voice. Hamsa exposes a dedicated endpoint that speaks the UneeQ custom voice protocol — UneeQ calls it directly, passing your Hamsa API key and the desired voice preset, and receives a raw PCM audio stream in response.How It Works
Configure UneeQ
In your UneeQ experience settings, set the custom voice endpoint URL and provide your Hamsa API key.
UneeQ sends a TTS request
When the digital human needs to speak, UneeQ sends a POST request to your endpoint with the text and the voice preset name.
Hamsa synthesises speech
Hamsa validates the API key, generates the audio using the requested voice, and streams back raw PCM audio.
Endpoint
Authentication
Unlike other Hamsa endpoints, this one does not use anAuthorization header. UneeQ sends the API key inside the JSON request body, so no extra headers are required on your side.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Hamsa API key |
preset | string | Yes | Hamsa speaker name to use as the voice (e.g. Amjad, Salma) |
text | string | Yes | Text to synthesise. Maximum 2000 characters |
Response
On success the endpoint returns a chunked binary stream of raw PCM audio with the following properties:| Parameter | Value |
|---|---|
| HTTP Status | 200 OK |
| Content-Type | application/octet-stream |
| Sample Rate | 16 kHz |
| Channels | Mono |
| Encoding | 16-bit signed integers |
| Byte Order | Little-endian |
| Format | Raw PCM — no WAV headers or compression |
These audio specs match UneeQ’s custom voice requirements exactly. No conversion is needed on your end.
Error Responses
| Status | Meaning |
|---|---|
400 | Validation error — check that all required fields are present and text is under 2000 characters |
401 | Invalid or missing API key |
402 | Insufficient wallet balance |
429 | Rate limit exceeded (100 requests/minute per API key) |
503 | TTS service temporarily unavailable |
Available Voices (Presets)
Pass any Hamsa speaker name as thepreset value. You can find the full list of available voices in the Voice Library on the dashboard. Some examples:
| Preset | Description |
|---|---|
Amjad | Male, Modern Standard Arabic |
Salma | Female, Egyptian dialect |
Lyali | Female, Levantine dialect |
Jasem | Male, Gulf dialect |
The
preset value maps directly to Hamsa’s speaker names. The language is Arabic (ar) by default. If you need a different dialect, contact support to discuss configuration options.Setting Up in UneeQ
Set the API key
Paste your Hamsa API key into the API Key field. UneeQ will include it as
apiKey in every request body automatically.Example Request
This is what UneeQ sends to the endpoint behind the scenes:Support
Contact Support
Get help from our technical team
UneeQ Custom Voice Docs
UneeQ’s official custom voice integration guide