Skip to main content

Small CLI for uploading local audio to AssemblyAI and printing or saving transcripts.

Project description

assemblyai-transcribe

Small CLI for uploading local audio file(s) to AssemblyAI and saving the transcript(s).

The code is compatible with Python 2.7 and Python 3.x.

Installation

Install from PyPI:

pip install assemblyai-transcribe

After installation, run it as assemblyai_transcribe.

Usage

Transcribe a single file:

assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY -o transcript.txt

Transcribe multiple files:

assemblyai_transcribe ./ep1.mp3 ./ep2.mp3 ./ep3.mp3 --api-key YOUR_API_KEY
# Saves: ep1.mp3.txt, ep2.mp3.txt, ep3.mp3.txt

Transcribe multiple files into a directory (auto-created if it doesn't exist):

assemblyai_transcribe ./ep1.mp3 ./ep2.mp3 --api-key YOUR_API_KEY -o transcripts/
# Saves: transcripts/ep1.txt, transcripts/ep2.txt

Examples:

assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY -o transcript.txt
assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY --eu -o transcript.txt
assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY --model universal-3-pro -o transcript.txt
assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY --model universal-3-pro --model universal-2 -o transcript.txt
assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY --no-language-detection -o transcript.txt
assemblyai_transcribe ./example.mp3 --api-key YOUR_API_KEY --no-speaker-labels -o transcript.txt

Arguments:

  • audio_files: one or more paths to local audio files.
  • --api-key API_KEY: AssemblyAI API key.
  • --base-url BASE_URL: override the API base URL. Default: https://api.assemblyai.com
  • --eu: use the EU AssemblyAI endpoint.
  • --model MODEL: repeat to provide multiple speech models. Default models: universal-3-pro, universal-2
  • --no-speaker-labels: disable speaker diarization (enabled by default).
  • --no-language-detection: disable automatic language detection (enabled by default).
  • --poll-interval SECONDS: seconds between polling attempts. Default: 3.0
  • -o OUTPUT, --output OUTPUT: write transcript(s). With one input file, this is the output file path (default: AUDIO_FILE.txt). With multiple input files, this must be a directory; each transcript is saved as BASENAME.txt inside it.

Help:

assemblyai_transcribe --help

Contributing

Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.

License

This project is licensed under the MIT License.

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_transcribe-0.1.0a5.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

assemblyai_transcribe-0.1.0a5-py2.py3-none-any.whl (7.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file assemblyai_transcribe-0.1.0a5.tar.gz.

File metadata

  • Download URL: assemblyai_transcribe-0.1.0a5.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for assemblyai_transcribe-0.1.0a5.tar.gz
Algorithm Hash digest
SHA256 ad7684b7264408cde0fa433f7044571d43ea0d33e61ae19c95403bca1525dd7a
MD5 be87b735ff50269efa138f280235d116
BLAKE2b-256 dfb86234eda8f0c75f54e4c58ae40b532e4ebe0be60dd33a7b02fbd7baababe7

See more details on using hashes here.

File details

Details for the file assemblyai_transcribe-0.1.0a5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for assemblyai_transcribe-0.1.0a5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 57e0970c2f87e20aecbd7c57d5a6969cb43e9d1d463d372da8630a7659815a89
MD5 3a71dcb045dca9b9a130397ea3bab552
BLAKE2b-256 2ae44895b97612b3063870935569ddc280701a2ba969f96eb6d81b1869a6ea0d

See more details on using hashes here.

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