Skip to main content

AssemblyAI audio transcription wrapper with optional YouTube download.

Project description

AssemblyAI Audio Transcriber

Reusable transcription utilities with optional YouTube audio download.

Requirements

  • Python 3.10+
  • AssemblyAI API key (ASSEMBLYAI_API_KEY)
  • Optional: yt-dlp (only needed for YouTube downloads)

Install

pip install -e .

With YouTube download support:

pip install -e ".[youtube]"

Quickstart (CLI)

export ASSEMBLYAI_API_KEY=your_key_here
assemblyai-transcriber --audio-path /path/to/audio.mp3

CLI Usage

Transcribe a local audio file:

assemblyai-transcriber --audio-path /path/to/audio.mp3

Transcribe a remote audio URL:

assemblyai-transcriber --audio-url https://example.com/audio.mp3

Download YouTube audio and transcribe it:

assemblyai-transcriber --youtube https://www.youtube.com/watch?v=VIDEO_ID

--youtube accepts full YouTube URLs or a raw video ID.

Library Usage

from pathlib import Path
from transcription_pipeline import transcribe_audio

text = transcribe_audio(audio_path=Path("/path/to/audio.mp3"))
print(text)

Transcribe from YouTube:

from transcription_pipeline import transcribe_audio

text = transcribe_audio(youtube="https://youtu.be/VIDEO_ID")
print(text)

Tests

Run tests:

pytest

Quality Checks

Install dev dependencies:

pip install -e ".[dev]"

Run lint and tests:

ruff check .
ruff format --check .
pytest

Pre-commit

pip install pre-commit
pre-commit install

Changelog

See CHANGELOG.md.

Versioning

See VERSIONING.md.

Releases

Tag releases as vX.Y.Z to trigger the GitHub Actions release workflow.

Project details


Download files

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

Source Distribution

assemblyai_transcriber-0.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

assemblyai_transcriber-0.1.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file assemblyai_transcriber-0.1.0.tar.gz.

File metadata

  • Download URL: assemblyai_transcriber-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for assemblyai_transcriber-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94b5043c1619c5bb8dd9a181b5a31572d68fbd28b16f1ab0dfdb96626ac0bfab
MD5 170504d474cd21eacea618d1bfeceb6c
BLAKE2b-256 ab60f9b57ca55385cb542ba7d4bd0449f037f0b93a53412fc4ea6eba3353c1cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for assemblyai_transcriber-0.1.0.tar.gz:

Publisher: release.yml on jerturowetz/assemblyai-transcriber

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

File details

Details for the file assemblyai_transcriber-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for assemblyai_transcriber-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7efe2a0c7a0d5f80204c0d790eaae0e5e62ac02d733f3e35ccb6751a8d87b1d6
MD5 6dcf7267548bee6313319f6d53d601f5
BLAKE2b-256 3dd3c6551a034ebdff8c3f62b6037fa2c71c4eb8155cffa1caaaac8b6ce1446c

See more details on using hashes here.

Provenance

The following attestation bundles were made for assemblyai_transcriber-0.1.0-py3-none-any.whl:

Publisher: release.yml on jerturowetz/assemblyai-transcriber

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page