Whisper Audio Chunk Length, Token Duration & Batch Size Calculator

Verified Nov 18, 2026 Quality 100/100 Confidence 100% 0 Evaluations
VERIFIED QUICK ANSWER

OpenAI Whisper processes audio at a 16 kHz sample rate with a 30-second default chunk length (480,000 samples). This calculator determines exact mel frames, audio tokens (50 tokens/sec), total chunk count, and GPU batch workloads.

Interactive Parameters & Live Verdict

Rule Diagnostics & Recommendations

    Engineering Formula & Verification Notes

    Calculations adhere strictly to OpenAI Whisper's hardcoded audio hyperparameters: sample rate = 16,000 Hz, hop length = 160 samples, N_FFT = 400, N_Mel = 80, and initial convolution stride 2 resulting in N_SAMPLES_PER_TOKEN = 320 (yielding 50 audio tokens per second).

    Worked Engineering Example

    Consider a 300-second (5-minute) audio file processed with a standard 30-second chunk length and a batch size of 16. Total samples equal 300 * 16,000 = 4,800,000. Each 30-second chunk contains 480,000 samples, producing 3,000 mel spectrogram frames and 1,500 audio tokens (at 50 tokens per second). Across 10 total chunks, running a batch size of 16 completes the job in 1 batch iteration.

    • Sample Rate: 16,000 Hz fixed baseline
    • Tokens per second: Exactly 50 audio tokens
    • Total chunks: 10 segments for 300 seconds

    Common Sizing & Compatibility Mistakes

    Developers often mismatch audio sample rates before feeding tensors into the feature extractor, leading to shape mismatch errors. Another common pitfall is ignoring the 25 MB file size limit when hitting the OpenAI Whisper API directly without local pipeline chunking.

    • Failing to resample audio to 16 kHz prior to feature extraction
    • Exceeding the 25 MB payload limit on the hosted API endpoint
    • Setting batch sizes too high for limited GPU VRAM capacity

    Whisper Parameter Reference Benchmarks

    Whisper Parameter Reference Benchmarks
    Audio Duration Chunk Length Total Chunks Tokens Per Chunk
    30 seconds 30 seconds 1 chunk 1,500 tokens
    5 minutes 30 seconds 10 chunks 1,500 tokens
    1 hour 30 seconds 120 chunks 1,500 tokens

    Frequently Asked Technical Questions

    What is the native sample rate for OpenAI Whisper?

    Whisper natively expects audio sampled at exactly 16,000 Hz (16 kHz) with mono channel configuration.

    How many audio tokens are generated per second?

    With a hop length of 160 and an initial convolution stride of 2, Whisper generates exactly 50 audio tokens per second (one token every 20 ms).

    Is there a maximum audio duration limit for Whisper?

    The local Hugging Face pipeline has no duration limit when chunking is enabled. However, the hosted OpenAI Whisper API restricts single file uploads to 25 MB.

    Did this interactive specification answer your scenario accurately?