Samples
0:00 / 0:14
Transcript
Morning light reached the harbour slowly. A cargo ship waited by the pier while gulls circled above the cranes. On the quay a clerk checked the last list of crates, folded it twice, and walked back toward the office as the tide began to turn.
Saved voice vo_hVAiUiqrYyvgKKkBvgzHnh
Capabilities
- Languages
- 25 European languages, detected from the audio;
languageis a hint - Punctuation
- Transcripts include punctuation and capitalisation
- Timestamps
- Segments in
verbose_json; words with start and end times withtimestamp_granularities[]=word - Input
- WAV, MP3, M4A, Ogg, WebM or FLAC
- Output
json,textorverbose_json, set withresponse_format
Request
The request for the sample above.
curl
curl -sS -o river.mp3 https://api.albastov.com/v1/media/samples/parakeet-7d74d019c0b0b3c7.mp3
curl https://api.albastov.com/v1/audio/transcriptions \
-H "Authorization: Bearer $ALBASTOV_API_KEY" \
-F model=parakeet \
-F [email protected]Python
import os
import httpx
from openai import OpenAI
with open("river.mp3", "wb") as f:
sample = httpx.get("https://api.albastov.com/v1/media/samples/parakeet-7d74d019c0b0b3c7.mp3")
sample.raise_for_status()
f.write(sample.content)
client = OpenAI(base_url="https://api.albastov.com/v1", api_key=os.environ["ALBASTOV_API_KEY"])
with open("river.mp3", "rb") as audio:
transcript = client.audio.transcriptions.create(model="parakeet", file=audio)
print(transcript.text)JavaScript
import { readFile, writeFile } from "node:fs/promises";
const sample = await fetch("https://api.albastov.com/v1/media/samples/parakeet-7d74d019c0b0b3c7.mp3");
if (!sample.ok) throw new Error(`${sample.status} ${await sample.text()}`);
await writeFile("river.mp3", Buffer.from(await sample.arrayBuffer()));
const form = new FormData();
form.append("model", "parakeet");
form.append("file", new Blob([await readFile("river.mp3")], { type: "audio/mpeg" }), "river.mp3");
const response = await fetch("https://api.albastov.com/v1/audio/transcriptions", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.ALBASTOV_API_KEY}` },
body: form,
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log((await response.json()).text);Every parameter, response header and error: Transcriptions reference.