Palabra API Overview
Real-time speech translation
Add Palabra's world-class translation to your app in minutes with our intuitive API and ready-made client libraries
- Python
- JavaScript
- More
import asyncio
import time
from palabra_ai import Palabra, Transcript, Audio
CHUNK_MS = 320 # ~320 ms of PCM (s16le, 24 kHz, mono)
async def main():
palabra = Palabra()
async with palabra.translation(source="en", targets=["es"]) as session:
async def send_audio():
next_send = time.monotonic()
while chunk := await audio_buffer.get(): # your audio source
await session.send_audio(chunk)
next_send += CHUNK_MS / 1000
await asyncio.sleep(max(0, next_send - time.monotonic()))
await session.end()
sender = asyncio.create_task(send_audio())
async for event in session:
match event:
case Transcript():
print(event)
case Audio():
play(event.pcm)
await sender
asyncio.run(main())
import { Room } from 'livekit-client';
// Your backend creates a temporary session and returns its data object.
// The browser receives session.token and session.webrtc.url, never an API Key.
const room = new Room();
await room.connect(session.webrtc.url, session.token, { autoSubscribe: true });
Palabra API is compatible with any programming language that supports WebSockets or WebRTC protocols. Use our API Direct Integration solution to integrate with your server-side or client-side applications.
Overview
The Palabra API enables real-time speech translation across multiple languages, helping your users communicate clearly and efficiently. With easy integration for both client- and server-side apps, Palabra fits seamlessly into any business workflow.
Features
Real-Time Translation
Translate speech instantly. Play the result back in real time.
Voice Cloning & Management
Personalize translations with custom voices, or use one of Palabra's out-of-the-box solutions.
Customizable Settings
Fine-tune transcription, translation, and text-to-speech settings.
Multilingual Support
Translate real-time audio into multiple languages simultaneously.
Supported Languages
See current source and target language codes and voice-cloning availability in the language catalogue.
Business Term Glossaries
Translate industry-specific terms accurately with custom glossaries.
Live Demo
Supported Languages
The Palabra API supports a wide range of languages for speech recognition and translation, as listed below:
View the full language table for detailed language codes and additional information.
Next steps
Quick Start
Integrate in minutes using one of Palabra's client libraries or directly to the API.
Authentication
Learn how to authenticate your requests to the Palabra API.
API Clients
Python Palabra SDK
Python SDK for Palabra AI's real-time speech-to-speech translation API.
JavaScript Palabra Client
JavaScript client for Palabra AI's real-time speech-to-speech translation API.
Palabra API
Streaming API
Real-time speech-to-speech translation streaming API for speech interpretation.
Sessions API
Create and manage scoped session tokens for your real-time integrations.
Voices API
Create and manage custom voices for your Voices Collection.
Glossaries API
Ensure accuracy for your industry with Palabra's custom glossaries.