Skip to main content

genblaze-assemblyai

AssemblyAI speech-to-text / transcription provider adapter for genblaze.

This connector is the inverse of every other genblaze adapter: instead of generating media it consumes an audio URL and produces a text transcript with word-level timings. The transcript lands as a hash-verified TEXT asset with a provenance manifest, so it composes into pipelines (generate audio → transcribe, caption a generated video) and persists to Backblaze B2 / S3 like any other genblaze step.

Install

pip install genblaze-assemblyai      # or: pip install "genblaze[assemblyai]"
export ASSEMBLYAI_API_KEY="..."      # from https://www.assemblyai.com/app/api-keys

Usage

from genblaze_core import Modality, Pipeline
from genblaze_assemblyai import AssemblyAIProvider

run, manifest = (
    Pipeline("transcribe")
    .step(
        AssemblyAIProvider(),
        model="universal-3-pro",                       # speech_models: universal-3-pro | universal-2
        prompt="https://example.com/podcast-episode.mp3",  # or params={"audio_url": ...}, or a chained audio input
        modality=Modality.TEXT,
        speaker_labels=True,                           # any TranscriptionConfig flag passes through
    )
    .run()
)

asset = run.steps[0].assets[0]
print(asset.metadata["text"])          # the transcript
print(asset.audio.word_timings[:3])    # [WordTiming(word=..., start=..., end=...), ...] (seconds)
print(manifest.canonical_hash)

The audio URL is resolved from (in priority order) step.inputs[0].urlstep.params["audio_url"]step.prompt, then SSRF-validated (https:// or file:// only) before submission. step.model selects the AssemblyAI speech model (sent on the SDK's plural speech_models field — the live API retired the singular speech_model field and the best / nano aliases; current values are universal-3-pro / universal-2); every other TranscriptionConfig flag (speaker_labels, language_code, audio-intelligence options, …) passes through step.params.

Pricing

The SDK ships no hardcoded prices. AssemblyAI bills per minute of input audio; the connector captures the input duration in step.provider_payload["audio_duration"] (seconds) during fetch_output. Register a recipe at runtime — see docs/reference/pricing-recipes.md ("AssemblyAI" section):

from genblaze_core.providers import per_response_metric

RATE_PER_MINUTE = RATE  # replace RATE with the per-minute USD rate from assemblyai.com/pricing


def per_minute(ctx):
    seconds = ctx.provider_payload.get("audio_duration")
    return (seconds / 60.0) * RATE_PER_MINUTE if seconds is not None else None


provider = AssemblyAIProvider(api_key="...")
# Speech-model slugs match the connector's family, so register against the
# concrete slug(s) you use (register_pricing layers onto the family spec).
for slug in ("universal-3-pro", "universal-2"):
    provider.models.register_pricing(slug, per_response_metric(per_minute))

Notes

  • Out of scope for v1: real-time/streaming transcription, LeMUR (LLM-over-transcript), and first-class SRT/VTT subtitle outputs. Audio- intelligence flags pass through to the API and land in metadata.

Docs

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genblaze_assemblyai-0.3.2.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genblaze_assemblyai-0.3.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file genblaze_assemblyai-0.3.2.tar.gz.

File metadata

  • Download URL: genblaze_assemblyai-0.3.2.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for genblaze_assemblyai-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c57819ed64386e83a1124d4e3be554152a0543528967e0f7c49a7ae909ab220c
MD5 4feb7b203d795963e205fbab38d733e6
BLAKE2b-256 ee22d68d687be13312c59a0d2c9290c8d7e204917abc838c9ec92b7b2be9a234

See more details on using hashes here.

Provenance

The following attestation bundles were made for genblaze_assemblyai-0.3.2.tar.gz:

Publisher: release.yml on backblaze-labs/genblaze

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genblaze_assemblyai-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for genblaze_assemblyai-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 01c141e9b90aa8dcee4f9b7cf8ba993417bbf7c5a923395dbcd45b7abbfbe450
MD5 ba1fbf1e804c1dfc9ed1a8a33f0391e0
BLAKE2b-256 5f1466aaa8fb85a4281fd692ff306a5ccca2f4c73e7fcedd6a34471c1e595bdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for genblaze_assemblyai-0.3.2-py3-none-any.whl:

Publisher: release.yml on backblaze-labs/genblaze

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page