Batch STT: Speech Recognition from Audio Files on GPU, 5x Cheaper than Manual

2000 hours of call center audio recordings — a task real-time ASR cannot handle: latency grows, quality drops. Real-time systems are designed for low-latency streaming, but when batch uploading hundreds of files, they either queue up or lose accuracy due to suboptimal memory management. Batch STT so

AI Development Areas

Frequently Asked Questions

העבודות האחרונות

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1439
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1301
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    997
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1264
  • image_logo-advance_0.webp
    B2B Advance company logo design
    712
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1002

2000 hours of call center audio recordings — a task real-time ASR cannot handle: latency grows, quality drops. Real-time systems are designed for low-latency streaming, but when batch uploading hundreds of files, they either queue up or lose accuracy due to suboptimal memory management. Batch STT solves the problem differently: files go into a queue (Celery/SQS), are processed in parallel on GPU with int8 quantization, and output a transcript with >95% accuracy. We implement such a solution turnkey — from a simple script to a production pipeline with Prometheus monitoring and a Grafana dashboard. In 3–5 days you get a system that processes hundreds of hours without engineer intervention. Savings compared to manual transcription reach 5x, and compared to cloud ASR services — up to 70%. The investment pays back on average in 2–3 months by reducing manual labor. Pricing is customized based on your volume and requirements.

How Batch STT Solves the Scaling Problem

Batch STT uses a queue (Celery or SQS) for asynchronous processing. This allows horizontal scaling: add workers under load without changing code. Unlike real-time ASR, where each new stream requires a separate model instance, batch mode efficiently utilizes GPUs by grouping tasks. We observed a 10x speedup when switching from sequential processing to a queue with 8 workers on a cluster. GPU load optimization is achieved through int8 quantization and splitting long files.

What to Do with Noisy and Low-Quality Recordings

Whisper large-v3 is robust to noise, but on heavily noisy recordings (street, factory floor) accuracy drops. We apply preprocessing: loudness normalization, low-pass filter, VAD to remove silence. For difficult cases, we add additional audio enhancement — spectral subtraction or denoiser models (RNNoise). In practice, this improves WER by 5–15%.

Why int8 Quantization Became a Production Standard

On Faster-Whisper with compute_type="int8_float16", we get 4x speedup on GPU with less than 1% accuracy loss (per LibriSpeech benchmark). Memory consumption halves, allowing a single RTX 4090 to process up to 4 streams in parallel (batch size=4). For critical projects, we enable VAD filter and beam search with 5 beams.

Batch Pipeline Architecture

Upload → S3/Local Storage → Queue (Celery/SQS) → Worker → STT → Post-Processing → Storage Key decisions:

  • Splitting long files into 5–10 minute segments (improves accuracy)
  • Parallel processing of multiple files
  • Retry logic for failed tasks
  • Storing intermediate results

How to Tune a Pipeline for Optimal Performance

Each worker runs the model with int8 quantization. When the queue overflows, additional workers are automatically spun up via Kubernetes HPA. Monitoring: Prometheus + metrics for queue length, p99 execution time, GPU load.

Hardware Model Speed
RTX 3080 medium (int8) 6–8x RT
RTX 4090 large-v3 (int8) 3–4x RT
A10G large-v3 (int8) 4–5x RT
CPU (16 cores) medium 0.3–0.5x RT

1 hour of audio on RTX 4090 with large-v3: ~15–20 minutes processing — 3–4x faster than real-time.

Full Processing Pipeline

import os from pathlib import Path from faster_whisper import WhisperModel from celery import Celery import ffmpeg app = Celery('batch_stt', broker='redis://localhost:6379/0', backend='redis://localhost:6379/1') model = WhisperModel("large-v3", device="cuda", compute_type="int8_float16") def convert_to_wav(input_path: str) -> str: output_path = input_path.rsplit('.', 1)[0] + '_converted.wav' ffmpeg.input(input_path).output( output_path, ar=16000, ac=1, acodec='pcm_s16le' ).overwrite_output().run(quiet=True) return output_path @app.task(bind=True, max_retries=3, time_limit=3600) def process_audio_file(self, file_path: str, options: dict = None): options = options or {} try: wav_path = convert_to_wav(file_path) segments, info = model.transcribe( wav_path, language=options.get('language'), vad_filter=True, word_timestamps=options.get('word_timestamps', False), beam_size=5 ) result = { "file": file_path, "language": info.language, "language_probability": info.language_probability, "duration": info.duration, "segments": [] } for seg in segments: segment_data = { "start": round(seg.start, 3), "end": round(seg.end, 3), "text": seg.text.strip() } if options.get('word_timestamps'): segment_data["words"] = [ {"word": w.word, "start": w.start, "end": w.end, "probability": w.probability} for w in (seg.words or []) ] result["segments"].append(segment_data) os.unlink(wav_path) return result except Exception as exc: raise self.retry(exc=exc, countdown=60 * (self.request.retries + 1)) 

Handling Failures in the Pipeline

The system automatically retries failed tasks (max_retries=3) with exponential backoff. For critical files, we configure a dead-letter queue and alerts to Telegram/Slack. Every step is logged — from upload to result delivery.

Supported Formats

Format Conversion
MP3, WAV, FLAC Transparent — normalize to WAV 16kHz, 16-bit, mono
M4A, AAC, OGG, OPUS Via FFmpeg with resampling
MP4, MKV Extract audio track, then convert

How to Run Batch STT on Your Data

  1. Install dependencies: pip install faster-whisper celery redis ffmpeg-python.
  2. Start Redis and Celery worker.
  3. Upload files to the specified directory or S3.
  4. Run the script to send tasks to the queue.
  5. Receive results in JSON or subtitles (SRT).

What's Included in the Work

  • Script for single files — tested locally, ready to run.
  • Pipeline with queue — on Celery or SQS, with retry and logging.
  • API for upload and result retrieval — REST/gRPC, Swagger documentation.
  • Status dashboard — Grafana dashboard with queue metrics and accuracy.
  • Integration with your storage — S3, MinIO, local filesystem.
  • Team training — 2-hour workshop on operation.

Implementation Timeline

  • Script for single files: 1 day
  • Pipeline with queue and API: 3–5 days
  • Full system with status dashboard: 1 week

Estimate your project: contact us to discuss volume, required accuracy, and infrastructure. Order batch STT implementation — get a consultation from an engineer. Experience: over 5 years in ASR, more than 30 successful deployments.