Speech Studio
Turn text into downloadable speech, or transcribe audio and video into editable text. Both directions run entirely in your browser.
0 / 5000

English text works best. Punctuation shapes the pauses.

Grade is the model card quality rating for that voice.

1.00x

Below 1x is slower and clearer, above 1x is faster.

Video & Audio Tools

Speech Studio

Turn text into downloadable speech, or transcribe audio and video to text — both in your browser.

Speech Studio does both directions of local voice work on one page. The Text to Speech tab turns typed or pasted text into natural sounding speech with eight English voices, a speed slider from 0.5x to 1.5x, an inline player, and a WAV download. The Speech to Text tab takes an audio or video file, transcribes it with Whisper on your own machine, and hands back an editable transcript you can copy or export as TXT, SRT, or VTT.

Nothing is uploaded and there is no account, API key, or server round trip. The first run in each direction downloads model weights once and the browser caches them, so later runs start almost immediately. Statuses call this out plainly, for example "Downloading speech model (~92 MB, cached after first use)...", because a first run is the only slow part.

How it works

The Text to Speech tab lazily imports kokoro-js, whose ONNX runtime fetches the matching WebAssembly build from jsDelivr, and loads onnx-community/Kokoro-82M-v1.0-ONNX with dtype q8 (about 92 MB). It deliberately runs on the CPU runtime: q8 on WebGPU stalls during generation and the lighter q4f16 weights return noise, because the vocoder does not survive that quantization. lib/splitText.ts normalises whitespace, splits on sentence endings without breaking decimals like 3.14 or hosts like example.com, and merges sentences up to 300 characters, hard splitting on a word boundary when a single sentence is longer. Each chunk is generated separately, the Float32 chunks are joined with an 80 ms gap, and lib/encodeWav.ts writes a mono 16 bit PCM WAV at the model sample rate. Text is capped at 5000 characters.

The Speech to Text tab lazily imports @huggingface/transformers and builds an automatic-speech-recognition pipeline for the selected model, keeping one instance per model. Both engines run on the ONNX CPU runtime with a hybrid precision recipe (fp32 encoder, q4 decoder). Progress is staged: weights download into the browser cache across 0 to 55 percent, decoding 55 to 58, transcription 58 onwards, done at 100. Audio is decoded with mediabunny, which reads the audio track out of video containers as well as audio files, then downmixed and resampled to the 16 kHz mono that Whisper expects. Both engines run inside a Web Worker, so the page keeps responding while a model works, and a runtime that crashes cannot take the tab with it. Segment timestamps feed lib/subtitles.ts, which formats SRT with comma milliseconds and VTT with dot milliseconds, numbering cues only after empty segments are dropped.

How to use

  1. Open Speech Studio and pick a direction: the Text to Speech tab or the Speech to Text tab.
  2. Text to Speech: paste or type up to 5000 characters, choose one of the eight voices, and set the speed between 0.5x and 1.5x.
  3. Click Generate Speech and watch the status move from the model download through "Generating sentence N of M..." to encoding.
  4. Play the result in the inline player, check the duration, sample rate, and file size, then click Download WAV.
  5. Speech to Text: drop an audio or video file, pick Fast (whisper-tiny, about 64 MB) or Accurate (whisper-base, about 136 MB), and choose a language or Auto detect.
  6. Click Transcribe and watch the stage labels: downloading model, decoding audio, transcribing. Segments appear as they are produced.
  7. Edit the transcript if you want to, then Copy it or export as TXT, SRT, or VTT.
  8. Click Start Over to clear the tab and generate or transcribe something else.

Tips

  • Kokoro is English only, so keep the input English for natural results. Whisper handles many more languages on the other tab.
  • The first run in each direction is slow because of the model download. The second run reuses the cached weights.
  • Peak memory is roughly 340 MB for speech and higher for Accurate transcription. On a weak phone, use the Fast model and shorter clips.
  • Speech synthesis runs on the CPU on purpose, so the first sentence takes a moment even on a fast GPU. Later sentences in the same request are quicker.
  • Both directions run on the CPU on purpose. On a machine with a GPU, the WebGPU sessions were measured to stall or lose the device, so the CPU runtime is the one that reliably finishes.
  • Inference runs on the main thread, so the tab can feel busy while a long request generates. Keep working in another tab rather than interacting with this one mid job.
  • WAV is lossless and plays everywhere. Convert it afterwards if a specific site needs MP3.
  • A character counter turns red past 5000 characters, which is about six minutes of audio.

Speech Studio FAQ

Is my text or audio uploaded anywhere?

No. Both models run in your browser through ONNX Runtime Web. Only the model weights are downloaded once and then cached.

Why can the old browser speech feature not download audio?

Because the Web Speech API plays through the operating system and exposes no audio stream, so there is nothing to capture or encode. This tool synthesises the samples itself, which is what makes a downloadable file possible.

What format do I get, and can I choose MP3?

Speech downloads as 16 bit mono WAV at the model sample rate, which every browser and player accepts. MP3 conversion is not offered yet.

How large are the downloads?

About 92 MB for the speech model, and 64 MB for the Fast transcription model or 136 MB for the Accurate one. Each is fetched once per browser profile.

Can it transcribe a video file?

Yes. Audio is decoded out of the container with WebCodecs, so MP4 and MOV work as well as MP3, WAV, M4A, OGG, and FLAC.

Credits

  • Kokoro 82M — Model weights licensed Apache-2.0, downloaded from the Hugging Face CDN on first run and cached in your browser. Nothing is redistributed with this page.
  • kokoro-js — Apache-2.0. Bundles an espeak-ng phonemiser that turns text into phonemes. The package is published as Apache-2.0 while espeak-ng upstream is GPL-3.0; it is used here as an unmodified dependency, not redistributed.
  • Transformers.js — Apache-2.0. Runs the Whisper pipeline in the browser through ONNX Runtime Web.
  • mediabunny — MPL-2.0. Demuxes and decodes the audio track out of the uploaded file, used unmodified.
  • Whisper — Whisper weights from OpenAI, MIT on the GitHub repository and Apache-2.0 on its model card, converted to ONNX by the onnx-community repos. Fetched from the Hugging Face CDN and transcribed locally.
  • ONNX Runtime Web — MIT. Inference runtime; the WebAssembly build loads from cdn.jsdelivr.net.
ShareTweet

Command Palette

Search for a command to run...