A robust tool to transcribe audio (including music) files and URLs using ElevenLabs Scribe AI model.
- 64-bit operating system
- Python 3.8+ if not using standalone binary
- ElevenLabs API key (instructions below)
Download a standalone binary from the latest release. Comes with keyring support.
If you don't want to enter your API key every time, the optional keyring dependency allows
Pyscribe to securely store it in your system's credential store.
# Recommended: Installation with keyring support
pip install "pyscribest[keyring]"
# Minimal installation without keyring support
pip install pyscribestRun the tool without installation using uv1
# With keyring support
uvx "pyscribest[keyring]" "path/or/url.mp3"
# Without keyring support
uvx pyscribest "path/or/url.mp3"pyscribe was taken 🥹
Important
Log in to your ElevenLabs dashboard and create an API key with access to Speech to Text endpoint.
The script looks for the API key in the following order:
- Environment Variable: Looks for the
ELEVENLABS_API_KEYenvironment variable. - System Credential Store: Automatically saved to by the other methods if
keyringis installed. - Terminal Prompt: If terminal is detected, prompt user for the key without displaying it.
- Standard Input: Read one line from
sys.stdin.
pyscribe "https://storage.googleapis.com/eleven-public-cdn/audio/marketing/nicole.mp3"In the spirit of Unix philosophy only successful transcription prints to sys.stdout.
Everything else is written to sys.stderr.
Use your shell's output redirection operator to write transcription to disk.
pyscribe "Never Gonna Give You Up.webm" > lyrics.txtNote
python -m pyscribe is available as an alternative if installed via pip.
The pyscribest entrypoint is intended to avoid typing uvx --from pyscribest pyscribe.
--full: Insert audio event tags like[laughter].--lang: An ISO-639-1 or ISO-639-3 language code2 for improved performance, e.g.deordeufor German.--no-keyring: Avoid reading or writing key to the system keyring.-v,--verbose: Show diagnostic messages.-V,--version: Print program's version and exit.
pyscribe --lang deu --full recording.wav -vThe pyscribe package provides both synchronous and asynchronous
interfaces for seamless integration into any project.
from elevenlabs import ElevenLabs
from pyscribe import transcribe
client = ElevenLabs(api_key="YOUR API KEY")
text = transcribe(client, "path/or/url.mp3")
print(text)from elevenlabs import AsyncElevenLabs
from pyscribe import atranscribe
client = AsyncElevenLabs(api_key="YOUR API KEY")
text = await atranscribe(client, "path/or/url.mp3")
print(text)Tip
The elevenlabs SDK is included as a dependency; no separate installation is required.
ElevenLabs imposes limitations
on concurrent Speech to Text requests.
For example, the free plan only allows 8 transcription requests at the same time.
ElevenLabs also imposes different file size limits:
Pyscribe focuses on end users and aims to provide a simple interface for the Scribe model.
As such, this tool does not implement all Scribe features, including but not limited to:
- Webhook support
- Word-level timestamps
- Speaker diarization
- Output in other formats