Installation · Stable package · Download source code (ZIP)
WhisperX turns speech into text and refines individual word timings. Codex can use it to prepare editable transcripts, subtitles and a map of clips for editing. Recordings can be processed on your computer; the program does not edit the video or burn captions into it.
For example, turn an interview into complete answers and prepare captions for short clips. Get the timed transcript first, then approve the selections. If you only need meeting notes, use available transcription: a separate word-timing setup may be unnecessary.
Official pages: repository and installation, BSD 2-Clause code licence. Models and additional components have their own terms.
How to prepare transcription
- Check the computer and recording. Codex finds the source, language, audio track and FFmpeg. Check Python and dependency compatibility. Stable package 3.8.6 specifies Python 3.10 up to, but not including, 3.14. Use CPU mode on Mac, not CUDA. Choose GPU processing only for a suitable NVIDIA environment using the project's current installation guidance.
- Prepare an isolated environment. After installation approval, install the stable PyPI package separately. Do not upgrade system Python for one recording or default to the development branch. Initial use may download models: agree on downloads, disk space and component terms. Local processing and uploading a recording to another service are separate options.
- Transcribe a short sample. Make a separate excerpt of about a minute containing speech, a pause, a name and a number; retain the source. Choose the recording's language and a compatible alignment model to refine word timings. Start the CPU sample with a small model and batch size 1. If timestamps start at the excerpt's beginning, save its offset in the original recording.
- Check before continuing. Open the text alongside the audio: check the name, number, first and last phrase, and pause. Codex can prepare the files and excerpts for listening. If it cannot listen, it must not claim that it did. Process the full recording after checking the sample. One speaker does not need diarization.
Example for macOS/Linux inside the prepared environment. The assistant supplies SAMPLE with the approved sample's path, LANG with the recording language (ru or en) and OUT with a new output directory. You do not fill these values manually. The command runs models, so installation and practice processing need approval first:
python -m pip install "whisperx==3.8.6"
whisperx "$SAMPLE" --model small --language "$LANG" --device cpu --compute_type int8 --batch_size 1 --vad_method silero --output_format all --output_dir "$OUT"
Parameters follow the stable release's CLI. On Windows, the assistant prepares an equivalent command for the available shell. silero selects speech detection, not speaker identification. Output all includes TXT, SRT, VTT and JSON: editable text, subtitles and detailed timings. It does not produce a captioned video.
If memory runs out, reduce batch size first, then compare a smaller model on the same sample. If the language has no available alignment model, check the language-model mapping; do not change the language just to make the command run. For a download error, check the missing file, access or disk space before deleting a working cache or reinstalling every dependency.
For multiple participants, --diarize adds speaker labels. The current project uses speaker-diarization-community-1, which requires accepting access conditions and a Hugging Face read token. Agree separately before accepting terms, creating tokens or incurring costs. Keep secrets out of command examples, Git and logs. Labels such as SPEAKER_00 separate turns; match them to names by checking the recording.
Check overlapping speech, incorrect speaker labels and untimed words against the audio. Some words in JSON can lack start/end values; do not invent them. Automatic subtitle layout can use neighbouring boundaries, so review numbers and names separately in SRT. If you edit the text after alignment, check its timing again.
Where it is used
- Editing your footage: obtain text and phrase boundaries; inspect images and visual meaning separately.
- Transcripts and subtitles: obtain text, then correct words against the audio.
- Cutting a long recording: map complete ideas using source timestamps.
The result is editable TXT, SRT/VTT and JSON with checked excerpts, plus the command and environment details. Editing changes clip order and duration: align subtitles with the final cut instead of reusing old timestamps unchecked. To put captions on screen, continue with subtitle export.
Stop a local task in its terminal; check existing output files for completeness before continuing. Save reruns to a new directory. Removing a practice environment is separate from deleting source recordings, outputs or a shared model cache.
Prompt for Codex or Work:
Prepare transcripts and subtitles for my recordings using WhisperX. Find the sources, selected track, language, existing plan, FFmpeg and suitable environment yourself. Check the stable package and Python compatibility; if installation is needed, get approval and use an isolated environment. On Mac start with CPU, int8 and a small model, not CUDA. Supply paths and parameters yourself. Agree on model downloads, extra terms, tokens and any upload to an external service before proceeding. Make a short sample without changing the source and retain its offset in the full recording. Produce TXT, SRT/VTT and JSON; check names, numbers, a pause, the beginning and end. If you cannot listen, prepare exact excerpts for me to check and do not claim listening was completed. Do not invent missing word timings. Leave diarization off for one person; for multiple speakers, agree on the model and access separately and check labels against voices. After sample approval, process the recording into a new folder and save versions and the command without secrets. Account for the final edit before exporting subtitles, and show how to stop and rerun safely.