Tuesday, November 24, 2026SubscribeMastheadAbout
Cali ReporterCalifornia · National · West Coast · Good News

Advertisement

Technology

In-Browser Audio Transcription with Whisper

A recent development demonstrates how audio files can be transcribed directly in the browser using Whisper, without uploading data to a server or incurring costs. This approach leverages Web technologies to handle…

Portrait of Benjamin Boyce
Artificial Intelligence & Technology · November 19, 2026
Share

AI-generated editorial illustration from an imagined camera angle.
AI-generated editorial illustration from an imagined camera angle. Source image: dev.to.

A technique for transcribing audio directly in the browser using the Whisper model has been developed, allowing for local processing without the need for server-side resources or API keys. This method utilizes the Web Audio API to decode audio files into 16 kHz mono format, which is required by Whisper for processing. The audio file remains on the user's device, and the browser handles the transcription process locally. This approach ensures privacy by not transmitting the audio data to external servers. The decoding function handles various audio formats, including MP3, M4A, WAV, OGG, FLAC, and the audio tracks of MP4 and WebM video files. The decoded audio is then processed in blocks to manage long files efficiently (Dev.to, 1). [1]

The Whisper model is loaded in a Web Worker to prevent blocking the main thread during transcription. This implementation first attempts to use WebGPU for faster processing and falls back to WASM if WebGPU is not available. Different model sizes are available, with the base model being suitable for clear speech and the small model offering better performance with accents, noise, and non-English languages. The loading process includes handling the model's file size and providing feedback on the download progress (Dev.to, 1). [1]

Long audio files are processed in blocks of 90 seconds to allow for real-time transcription and partial results. Each block is offset by its starting point to ensure accurate timestamp alignment. The transcription results are then formatted into SRT and VTT files, which are compatible with video editing software and platforms like YouTube Studio. These formats differ only in their header and timestamp separators, with SRT using commas and VTT using periods for millisecond notation (Dev.to, 1). [1]

A technique for transcribing audio directly in the browser using the Whisper model has been developed, allowing for local processing without the need for server-side resources or API keys. The Whisper model is loaded in a Web Worker to prevent blocking the main thread during transcription. Long audio files are processed in blocks of 90 seconds to allow for real-time transcription and partial results. This approach ensures that the audio file never leaves the visitor's computer, as the browser downloads the speech model once, caches it, and performs the transcription locally (1). [1]

Advertisement

The audio file is decoded to 16 kHz mono using the Web Audio API, which resamples the audio if the context is created at that rate. This allows for compatibility with various audio formats, including MP3, M4A, WAV, OGG, FLAC, and the audio track of MP4 and WebM video, as the browser's own decoders handle the conversion (1). [1]

The Whisper model is loaded in a Web Worker to prevent blocking the main thread during transcription. The model is loaded using WebGPU first, with a fallback to WASM if WebGPU is not available. This ensures that the transcription process is efficient and does not interfere with the user experience (1). [1]

Long audio files are processed in blocks of 90 seconds, with each block's timestamps shifted by its offset to allow for real-time transcription and partial results. This method ensures that the user receives partial results as the transcription progresses, rather than waiting for the entire file to be processed (1). [1]

A technique for transcribing audio directly in the browser using the Whisper model has been developed, allowing for local processing without the need for server-side resources or API keys (1). The audio file is decoded to 16 kHz mono using the Web Audio API, which resamples the audio if the context is created at that rate (1). This ensures compatibility with the Whisper model's requirement for 16,000 samples per second and one channel, enabling accurate transcription without relying on external servers or API keys (1). [1]

Advertisement

The Whisper model is loaded in a Web Worker to prevent blocking the main thread during transcription (1). This approach ensures that the browser remains responsive while processing audio files (1). The model is loaded using Transformers.js, with a preference for WebGPU and a fallback to WASM if WebGPU is not available (1). This allows for efficient and flexible model execution depending on the user's hardware capabilities (1). [1]

Long audio files are processed in blocks of 90 seconds, with each block's timestamps shifted by its offset to allow for real-time transcription and partial results (1). This method enables the transcription of extended audio files without overwhelming the user interface or delaying the output (1). The audio file never leaves the visitor's computer, as the browser downloads the speech model once, caches it, and processes the transcription locally (1). This approach enhances privacy and eliminates the need for server-side processing or API keys (1). [1]

Sources

Dev.to

Prepared with AI assistance from the cited sources.

The Cali Reporter newsletter

The stories worth your time.

California, the country, and what comes next. Join our free newsletter for reporting that keeps you informed.

By joining, you agree to receive the Cali Reporter newsletter. Unsubscribe at any time. Privacy policy.

More in Technology

  • Modern Web Guidance 1.0 and Browser Compatibility

    Modern Web Guidance 1.0, announced by Chrome for Developers on November 10, introduces browser compatibility data to assist coding agents in building web features. The initiative emphasizes the importance of fallback…

  • Apache mod_http2 Vulnerability Detection with Nmap

    A new Nmap scripting module has been developed to detect the Apache mod_http2 vulnerability (CVE-2026-119618), addressing the challenges of identifying affected systems accurately.

  • Securing Remote Vendor Access in Industrial Networks

    Best practices for managing remote vendor access in operational technology (OT) networks emphasize controlled access points, multifactor authentication, and time-bound sessions to reduce cybersecurity risks.

Advertisement