Docs
Integrate Ramsa's Emirati voices into your product in minutes.
Introduction
Ramsa is an API for turning text into authentic Emirati speech. Core concepts: agents (characters with voices and accents), voices, sessions, and streaming.
Each agent has an agent_id and a voice_id that you use in your requests.
Quickstart
Install the SDK, then synthesize your first Emirati line in under five minutes.
npm install @ramsa/sdk
import { Ramsa } from "@ramsa/sdk";
const ramsa = new Ramsa({ apiKey: process.env.RAMSA_KEY });
const audio = await ramsa.speak({
agent: "salem",
text: "هلا والله، نوّرت رمسة",
});Authentication
Pass your API key in the request header. Create and rotate keys from the dashboard, and keep test and live environments separate.
curl https://api.ramsa.ai/v1/speak \
-H "Authorization: Bearer rmsa_live_..." \
-H "Content-Type: application/json" \
-d '{ "agent": "salem", "text": "..." }'Text-to-Speech
The /speak endpoint takes an agent, text, and optional voice settings (speed, pitch, emotion, stability, dialect intensity).
await ramsa.speak({
agent: "moza",
text: "هلا فيك! تبي مساعدة؟",
settings: { speed: 60, emotion: 70, dialectIntensity: 75 },
format: "mp3",
});Streaming conversation
For real-time interactions, consume the event stream: interim ASR results, then tokens, then audio chunks. Wire it to a push-to-talk button.
for await (const chunk of ramsa.stream({ agent: "salem", input })) {
if (chunk.type === "token") render(chunk.text);
if (chunk.type === "audio") play(chunk.audio);
}Errors
The API returns standard HTTP status codes. 401 invalid auth, 429 rate limited, 400 bad request. Retry with exponential backoff on 429/5xx.
Need help?
Contact support