Speak in any supported language, we'll detect it automatically. Your translated text appears here, and the translated speech plays back directly.
Translate speech in real time into text or speech, with the highest accuracy and lowest latency.

Stream audio through the Gradium Speech-To-Speech endpoint and get translated audio back in real time.
import numpy as np
from gradium import client as gradium_client
grc = gradium_client.GradiumClient()
setup = {
"model_name": "s2s-translate",
"input_format": "pcm_24000",
"output_format": "pcm_48000",
"voice_id": "cLONiZ4hQ8VpQ4Sz",
"stt_model_name": "stt-translate",
"tts_model_name": "default",
"target_language": "en",
}
async with grc.s2s_realtime(wait_for_ready_on_start=True, **setup) as s2s:
async def send_loop():
for i in range(0, len(pcm), 1920):
await s2s.send_audio(pcm[i : i + 1920])
await s2s.send_eos()
async def recv_loop():
async for msg in s2s:
if msg["type"] == "audio":
out_pcm = np.frombuffer(b"".join(all_bytes), dtype=np.int16)
elif msg["type"] == "text":
print(msg["text"], end=" ", flush=True)
async with asyncio.TaskGroup() as tg:
tg.create_task(send_loop())
tg.create_task(recv_loop())