Wyzie Subs
Wyzie Transcribe#
Wyzie Transcribe writes subtitles for anything with speech in it: podcasts, your own YouTube videos, lectures, interviews, home videos. It doesn't need the title to exist anywhere. You send the audio (or the video), speech recognition writes down every word with its timing, and you get an SRT, WebVTT or ASS file back. The language is detected for you, or you can name it.
On the Web#
The easiest way: open sub.wyzie.io/transcribe, enter your Pro key, pick the file and press Transcribe. Your browser pulls the audio track out of the video first, so only the audio is uploaded (an hour is about 14 MB) and the video itself never leaves your device. MP3, M4A, WAV, MP4, MKV, WebM and most other formats work.
The API: POST /transcribe#
Send the audio or video file as the request body, with your key in the query string:
curl -X POST "https://sub.wyzie.io/transcribe?key=YOUR_KEY&format=srt" \
-H "Content-Type: audio/mpeg" --data-binary @podcast.mp3 -o podcast.srt| Parameter | Example | Description |
|---|---|---|
| key | YOUR_KEY | A Pro API key. Required. |
| format | srt | srt (default), vtt or ass. |
| language | en | The spoken language as a two-letter ISO 639-1 code. Leave it out to detect it from the audio. |
You can also send a multipart form with the file in a field named media (and key, format, language as fields), up to 100 MB.
Cloudflare limits a single request to about 100 MB, so for a long video send just the audio track. It is all speech recognition needs:
ffmpeg -i video.mp4 -vn -ac 1 -ar 16000 -b:a 32k audio.mp3Audio up to 4 hours long is accepted.
Response#
When the transcription finishes within about 50 seconds (most files under 20 minutes), the response is the subtitle file itself, with these headers:
| Header | Example | Description |
|---|---|---|
x-wyzie-cost | 10 | Requests charged. |
x-wyzie-duration | 1342 | Length of the audio, in seconds. |
x-wyzie-language | en | The language it was transcribed in. |
A longer file answers 202 Accepted while it keeps working:
{
"id": "5a29c3f6-4bfb-4f03-b429-4b4d935acdbd",
"status": "processing",
"poll": "https://sub.wyzie.io/transcribe/5a29c3f6-4bfb-4f03-b429-4b4d935acdbd",
"cost": 20,
"duration": 2069
}Poll GET /transcribe/{id}?key=YOUR_KEY every 10 seconds or so. It answers 202 until the subtitle is ready, then the file with the same headers as above. An hour of audio takes about two to three minutes. Only the key that started a transcription can fetch it, and finished subtitles are kept for one hour.
Errors#
| Status | Meaning |
|---|---|
| 400 | A bad format or language, or no file. |
| 401 | No key. |
| 402 | Not enough requests left for this file's length. |
| 403 | A free key, or an invalid one. |
| 413 | The file is too big (send the audio track only) or longer than 4 hours. |
| 422 | The file has no audio track, can't be decoded, or has no speech in it. |
| 429 | Too many transcriptions from this key this hour (20). |
| 503 | Busy, or the server restarted while your file was running. Try again; you weren't charged. |
With wyzie-lib#
wyzie-lib's transcribe sends the file and, for a long one, keeps polling until the subtitle is ready. It is never retried, because each transcription is billed.
import { transcribe } from 'wyzie-lib';
const audio = await fetch('https://example.com/episode-12.mp3').then((r) =>
r.blob(),
);
const { subtitle, language, duration, cost } = await transcribe({
media: audio,
format: 'vtt',
});Privacy#
The uploaded audio is written to a temporary folder on our server, cut into short pieces, sent for speech recognition (Whisper, run on Cloudflare Workers AI) and deleted as soon as the transcription ends. It is never stored, logged or used for anything else. The finished subtitle is kept for one hour so you can fetch it, then deleted.
