audio-workernode

A Python-based distributed worker node for audio transcription tasks, designed to run on RunPod infrastructure and communicate with a central orchestrator.

https://github.com/davidbmar/audio-workernode  ·  public  ·  shipped

What it is

audio-workernode is a specialized background service that polls a central orchestrator for audio transcription jobs. It retrieves tasks, processes them using an external transcription API, and reports results back. It is built to be deployed as a scalable worker on the RunPod serverless or cloud GPU platform, handling configuration management and error logging autonomously.

Features

Quickstart

pip install -r requirements.txt
python runpod/worker_node_v3.py

Architecture

flowchart TD
    A[RunPod Instance] --> B[AudioTranscriptionWorker]
    B --> C[ConfigurationManager]
    C --> D[worker_api.config.yaml]
    B --> E[Orchestrator Service]
    B --> F[Transcription API]
    E -->|Fetch Task| B
    B -->|Send Result| E
    B -->|Send Audio| F
    F -->|Return Transcript| B

How it's built

The project is built in Python, utilizing the `requests` library for HTTP communication with both the orchestrator and the transcription API. Configuration is managed via a YAML file loaded by a custom `ConfigurationManager`. The core logic resides in the `AudioTranscriptionWorker` class, which implements a polling loop to fetch tasks, execute transcription, and handle lifecycle events like graceful shutdowns.

How it runs

sequenceDiagram
    participant W as AudioTranscriptionWorker
    participant O as Orchestrator
    participant T as Transcription API
    participant C as ConfigurationManager

    W->>C: Load config (worker_api.config.yaml)
    C-->>W: Return config (URLs, tokens)
    loop Polling Loop
        W->>O: GET /task (with Auth Token)
        alt Task Available
            O-->>W: Return Task Data (audio_url)
            W->>T: POST /transcribe (audio_data)
            T-->>W: Return Transcript
            W->>O: POST /result (transcript)
        else No Task
            O-->>W: Empty/Wait
        end
    end

How to apply & reuse

Deploy this worker on a RunPod instance by setting up the required environment variables and mounting the configuration file. It is suitable for developers building distributed audio processing pipelines who need a reliable, auto-scaling worker component that decouples task execution from task scheduling.

At a glance

CapabilitiesDistributed Task ProcessingAPI IntegrationConfiguration ManagementCloud Deployment (RunPod)
ComponentsAudioTranscriptionWorkerConfigurationManagerLogging Handler
TechPythonRequestsYAMLRunPod SDK
Depends onrequestspyyamlrunpod
Integrates withCentral OrchestratorExternal Transcription APIsRunPod Infrastructure
PatternsWorker PatternPollingDependency Injection (Config)Facade Pattern (API Client)
Reuse tagsdistributed-systemsaudio-processingworker-noderunpodpython-service

Repo hygiene

✓ all on main — nothing unmerged.