How I Built a Scalable Audio Transcription System with Node.js and RabbitMQ

Jyotirmoy RoyJyotirmoy Roy
3 min read

Transcribing audio files seems simple until multiple users start uploading large files simultaneously. That’s exactly what happened in one of my recent projects, where I had to design a system that could handle concurrent uploads efficiently, process them in parallel, and provide real-time job tracking – all while ensuring low latency and high throughput.

In this blog, I’ll walk you through:

  • The problem we faced

  • How I designed the workflow architecture

  • Why we chose RabbitMQ

  • The challenges and optimizations that made it production-ready

The Challenge

The initial setup was straightforward – a user uploads an audio file, we transcribe it, and send back the result. But as usage grew, so did the bottlenecks:

  • Uploads started queueing up, causing delays.

  • The system wasn’t designed to handle multiple files at once.

  • There was no real-time visibility into job statuses.

We needed to scale horizontally without rewriting everything from scratch.

Designing the Scalable Workflow

Here's how I tackled the solution:

1. Directory-based Workflow

The core idea was to separate files based on their processing stage using three directories:

  • Queue Directory – where uploaded files are stored initially

  • Transcription Directory – holds files currently being transcribed

  • Completed Directory – stores transcription results along with original audio files

2. Using a Cron Job for Detection

A simple cron job periodically scanned the queue directory. When it found a new file, it moved it to the transcription directory for processing.

3. RabbitMQ for Concurrent Processing

Here’s where RabbitMQ came in. Instead of processing files directly from the directory scan, the cron job would:

  • Publish a message to a RabbitMQ queue for each new file

  • Worker processes, built with Node.js, would consume these messages concurrently, transcribing audio files in parallel

This approach had multiple benefits:

  • Decoupled upload and processing, preventing overload

  • Enabled horizontal scaling by adding more workers

  • Provided reliable message acknowledgments and retries if a worker failed

Why Node.js + RabbitMQ?

Many may ask why I combined these two. The answer is:

  • Node.js offers non-blocking, asynchronous processing ideal for I/O-heavy tasks like transcription.

  • RabbitMQ acts as a powerful message broker, ensuring jobs are distributed evenly to workers without crashing the system under load.

Together, they create a robust pipeline with minimal configuration overhead.

Real-Time Status Tracking

To improve UX, I implemented real-time job status tracking. Each worker emitted events during different stages:

  • File picked for processing

  • Transcription started

  • Transcription completed

  • File moved to completed directory

These events were pushed to the frontend, so users knew exactly where their file was in the pipeline.

Performance Optimizations

After testing under simulated load, here’s what we achieved:

  • 30% reduction in latency by optimizing cron schedules and RabbitMQ prefetch settings

  • Improved throughput, as multiple workers processed files concurrently without blocking each other

  • Graceful handling of spikes, with no loss of messages even during peak uploads

Key Learnings

  1. Decoupling workflows is powerful – it simplifies scaling and error handling.

  2. RabbitMQ is more than a queue; its routing and acknowledgment features make it ideal for production-grade systems.

  3. Monitoring matters – real-time tracking improved user trust and reduced support queries.

Final Thoughts

Building this transcription system showed me the real-world value of combining asynchronous frameworks with message brokers. Whether you’re handling file processing, image conversions, or ML inference jobs, this architecture pattern scales elegantly.

If you’re working on something similar or planning to integrate RabbitMQ into your Node.js projects, feel free to connect. I’d love to hear your approach and share insights.

Connect withme by following or comment below if this blog helped you.

4
Subscribe to my newsletter

Read articles from Jyotirmoy Roy directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jyotirmoy Roy
Jyotirmoy Roy

A passionate developer trying to explore the different fields.