Skip to content

Parakeet

Transcribes speech in 25 European languages, with punctuation and optional word timestamps.

Access: Keys with the media:generate scope, on an account with media access granted by Albastar Corp.

Speech to text25 languagesparakeet

Capabilities

Languages
25 European languages, detected from the audio; language is an optional hint: Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Ukrainian (model card)
Punctuation
Transcripts include punctuation and capitalisation
Timestamps
verbose_json returns segments with start and end times; timestamp_granularities[]=word returns words with start and end times in seconds
Input
WAV, MP3, M4A, Ogg, WebM or FLAC, up to 20 MB per file, with no limit on duration. A job still queued after 60 s expires and returns 503 queue-timeout; a transcript not ready within 85 s returns 503 queued with job_id, and GET /v1/media/jobs/{job_id}?wait=60 (scope media:read) returns the job with the transcript once the job is done
Output
json (default), text or verbose_json, set with response_format

Request

The input file is reference.mp3, 14 s of Narrator A, a synthetic voice. The request transcribes the file with response_format verbose_json and word timestamps.

curl

curl -sS -o reference.mp3 \
  https://api.albastov.com/v1/media/samples/reference-848c3d555461736a.mp3

curl https://api.albastov.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $ALBASTAR_API_KEY" \
  -F model=parakeet \
  -F [email protected] \
  -F response_format=verbose_json \
  -F "timestamp_granularities[]=word"

Python

import os

import httpx
from openai import OpenAI

clip = httpx.get(
    "https://api.albastov.com/v1/media/samples/"
    "reference-848c3d555461736a.mp3"
)
clip.raise_for_status()
with open("reference.mp3", "wb") as f:
    f.write(clip.content)

client = OpenAI(
    base_url="https://api.albastov.com/v1",
    api_key=os.environ["ALBASTAR_API_KEY"],
)

with open("reference.mp3", "rb") as audio:
    transcript = client.audio.transcriptions.create(
        model="parakeet",
        file=audio,
        response_format="verbose_json",
        timestamp_granularities=["word"],
    )
print(transcript.text)
print(transcript.words[:4])

JavaScript

import { readFile, writeFile } from "node:fs/promises";

const api = "https://api.albastov.com/v1";
const clip = await fetch(
  `${api}/media/samples/reference-848c3d555461736a.mp3`,
);
if (!clip.ok) throw new Error(`${clip.status} ${await clip.text()}`);
await writeFile("reference.mp3", Buffer.from(await clip.arrayBuffer()));

const form = new FormData();
form.append("model", "parakeet");
form.append(
  "file",
  new Blob([await readFile("reference.mp3")], { type: "audio/mpeg" }),
  "reference.mp3",
);
form.append("response_format", "verbose_json");
form.append("timestamp_granularities[]", "word");

const res = await fetch(`${api}/audio/transcriptions`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.ALBASTAR_API_KEY}` },
  body: form,
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const transcript = await res.json();
console.log(transcript.text);
console.log(transcript.words.slice(0, 4));

Every parameter, header and error: Transcriptions reference.

Response

The response Parakeet returned for reference.mp3, with text and words shortened:

Response
{
  "duration": 13.975,
  "language": "auto",
  "task": "transcribe",
  "text": "Okay, so here's the plan. We land just after sunset, …",
  "words": [
    {"end": 0.72, "start": 0.16, "word": "Okay,"},
    {"end": 0.96, "start": 0.72, "word": "so"},
    {"end": 1.28, "start": 0.96, "word": "here's"},
    {"end": 1.6, "start": 1.28, "word": "the"}
  ]
}

The full response lists 41 words. The full text, wrapped onto three lines:

Text
Okay, so here's the plan. We land just after sunset, grab the bags, and head
straight for the harbor. If the ferry's late again, and honestly, it usually
is, we'll get dinner by the water and wait it out. Sound good.

language repeats the language field of the request, auto when the request has none. duration is the length of the file in seconds. A request for word timestamps only returns no segments.