Skip to content

[Enhancement] Add batch transcription manager with concurrency control and progress callbacks #755

Description

@deepgram-robot

Summary

Add a BatchTranscriber class that manages concurrent transcription of multiple audio files with configurable concurrency limits, progress callbacks, automatic retry on failure, and structured result aggregation.

Problem it solves

Developers processing large audio corpora (call recordings, podcast archives, meeting libraries) currently write custom async orchestration code to manage concurrent API calls, handle rate limiting, track progress, and retry failures. A built-in batch manager makes high-volume transcription a one-liner while respecting API rate limits and providing visibility into processing status.

Proposed API

from deepgram import DeepgramClient, BatchTranscriber

client = DeepgramClient()
batch = BatchTranscriber(
    client,
    concurrency=10,
    retry_attempts=3,
    on_progress=lambda done, total: print(f"{done}/{total}"),
)

results = await batch.transcribe_urls(
    urls=["https://example.com/audio1.wav", "https://example.com/audio2.wav", ...],
    options={"model": "nova-3", "smart_format": True, "summarize": "v2"},
)

for result in results:
    print(result.url, result.transcript, result.summary)
    if result.error:
        print(f"Failed: {result.error}")

Acceptance criteria

  • Configurable concurrency limit (default: 5)
  • Progress callback with (completed, total) signature
  • Automatic retry with exponential backoff on transient errors
  • Structured results with per-file success/error status
  • Supports both URL and file upload sources
  • Documented with usage example
  • Compatible with existing API

Raised by the DX intelligence system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions