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
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.
pip install -r requirements.txt python runpod/worker_node_v3.py
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
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.
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
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.
✓ all on main — nothing unmerged.