Speech to text
for European languages.
Klang's Pianissimo models for Swedish and Danish, and NVIDIA's Parakeet as released for 23 more European languages, behind one endpoint. Upload a recording, get the transcript with word timings back. ElevenLabs-compatible, so existing code works with a new URL, key and model, and the language named.
POST /v1/speech-to-text
curl https://api.platform.klang.ai/v1/speech-to-text \
-H "Authorization: Bearer $KLANG_API_KEY" \
-F model_id=pianissimo \
-F language_code=sv \
-F file=@meeting.mp3import os
from elevenlabs.client import ElevenLabs
# Already on ElevenLabs? Change the URL, the key and the model.
client = ElevenLabs(
api_key=os.environ["KLANG_API_KEY"],
base_url="https://api.platform.klang.ai",
)
transcript = client.speech_to_text.convert(
file=open("meeting.mp3", "rb"),
model_id="pianissimo",
language_code="sv",
# The SDK's retries resend the file without the form fields.
request_options={"max_retries": 0},
) 200 OK
{
"language_code": "sv",
"text": "Hej och välkommen.",
"words": [
{ "text": "Hej", "start": 0.32, "end": 0.61, "type": "word" },
{ "text": " ", "start": 0.61, "end": 0.66, "type": "spacing" },
{ "text": "och", "start": 0.66, "end": 0.8, "type": "word" },
{ "text": " ", "start": 0.8, "end": 0.84, "type": "spacing" },
{ "text": "välkommen.", "start": 0.84, "end": 1.42, "type": "word" }
],
"model_id": "pianissimo",
"audio_seconds": 1.6
}