🏠 Home 🎙️ Studio ✂️ Edit 📁 Files 💰 Pricing 🔌 API 📊 Dashboard ⚙️ Settings 👤 Login / Sign Up

AI Voice API – Text to Speech REST API

Integrate hyper-realistic AI Voice generation into your software applications with real-time key tracking.

Authentication

All API calls require your unique key to be passed in the x-api-key HTTP header. Free accounts receive 100 requests/day verified directly in real-time.

HTTP Header x-api-key: rax_voice_studio_api_8392018374

1. Generate Voice (Neural TTS)

Converts text strings into high-quality speech and streams/returns an MP3 audio file directly.

GET https://izrxufbmostonmtgunnc.supabase.co/functions/v1/raxzen-voice

Query Parameters

  • text (string, required) - The text context to speak.
  • mode (string, required) - The target Voice Model ID (e.g. bn_f_sweet, en_us_f_aria) from the catalog below.

🌐 Standalone HTML + JS Integration Code

Single-file clean HTML code to embed and test in any website. Just put your_api_key and it works instantly!

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Rax Voice Studio API Demo</title> <style> * { box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0b0f19; color: #f8fafc; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; padding: 20px; } .box { background: #131b2e; border: 1px solid #1e293b; padding: 28px; border-radius: 16px; width: 100%; max-width: 440px; box-shadow: 0 20px 40px rgba(0,0,0,0.6); } h3 { margin: 0 0 16px; font-size: 20px; display: flex; align-items: center; gap: 8px; color: #38bdf8; } label { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #94a3b8; margin-top: 14px; display: block; letter-spacing: 0.05em; } input, select, textarea { width: 100%; padding: 12px; margin-top: 6px; border-radius: 8px; border: 1px solid #334155; background: #0b0f19; color: #fff; font-size: 14px; outline: none; transition: border-color 0.2s; } input:focus, select:focus, textarea:focus { border-color: #10b981; } button { width: 100%; padding: 14px; background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 18px; box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); transition: transform 0.1s, opacity 0.2s; } button:hover { opacity: 0.95; } button:active { transform: scale(0.98); } button:disabled { opacity: 0.6; cursor: not-allowed; } #status { font-size: 13px; margin-top: 12px; text-align: center; font-weight: 600; min-height: 20px; } audio { width: 100%; margin-top: 16px; border-radius: 8px; } </style> </head> <body> <div class="box"> <h3>🎙️ Rax Voice Studio TTS</h3> <label>Your API Key (x-api-key)</label> <input type="text" id="apiKey" value="your_api_key" placeholder="Enter your API Key (e.g. rax_voice_studio_api_...)"> <label>Voice Model</label> <select id="voiceMode"> <option value="en_us_f_aria">English (US) - Aria Female</option> <option value="bn_f_sweet">Bengali (BD) - Nabanita Sweet</option> <option value="bn_m_normal">Bengali (BD) - Ravox Normal Male</option> <option value="en_us_m_guy">English (US) - Guy Male</option> <option value="hi_f_swara">Hindi (IN) - Swara Female</option> </select> <label>Text to Speak</label> <textarea id="textInput" rows="3">Hello! This is a live voice test from Rax Voice Studio API.</textarea> <button onclick="generateSpeech()" id="btn">⚡ Generate Speech</button> <div id="status"></div> <audio id="player" controls style="display:none;"></audio> </div> <script> // Official Supabase REST API Gateway const API_ENDPOINT = "https://izrxufbmostonmtgunnc.supabase.co/functions/v1/raxzen-voice"; async function generateSpeech() { const key = document.getElementById('apiKey').value.trim(); const text = document.getElementById('textInput').value.trim(); const mode = document.getElementById('voiceMode').value; const btn = document.getElementById('btn'); const status = document.getElementById('status'); const player = document.getElementById('player'); if (!key || key === 'your_api_key') return alert('Please enter your valid API key first'); if (!text) return alert('Please enter text to speak'); btn.disabled = true; btn.innerText = 'Connecting & Generating...'; status.style.color = '#38bdf8'; status.innerText = 'Verifying key with server...'; player.style.display = 'none'; try { const url = `${API_ENDPOINT}?text=${encodeURIComponent(text)}&mode=${mode}`; const res = await fetch(url, { headers: { "x-api-key": key } }); if (!res.ok) { let errorMsg = `HTTP Error ${res.status}`; try { const errData = await res.json(); if (errData.message) errorMsg = errData.message; } catch(e) {} throw new Error(errorMsg); } const remaining = res.headers.get("X-RateLimit-Remaining") || ""; const plan = res.headers.get("X-User-Plan") || ""; const blob = await res.blob(); player.src = URL.createObjectURL(blob); player.style.display = 'block'; player.play(); const info = remaining ? `(${plan} Plan: ${remaining} requests remaining today)` : ''; status.style.color = '#10b981'; status.innerText = `✅ Voice Generated Successfully! ${info}`; } catch (err) { status.style.color = '#ef4444'; status.innerText = err.message; } finally { btn.disabled = false; btn.innerText = '⚡ Generate Speech'; } } </script> </body> </html>

2. Voice Model Catalog

Select from over 40+ professional, hyper-realistic voice neural characters. Search and copy IDs directly.

Language Voice ID Description / Artist Name Actions