Skip to main content

Whispero

Audio transcription and deep audio analysis with any OpenAI-compatible provider. Defaults to Gemini's native audio input (transcribes and reasons in one pass); also works with OpenAI, Groq, Together, or any Whisper-style /v1/audio/transcriptions endpoint.

Unlike pure ASR models, the Gemini path processes audio with reasoning: it transcribes, cleans up, structures output, detects speakers, emotions, and action items in a single pass.

Install

pip install whispero

Setup

# Gemini (default) - free key at https://aistudio.google.com/apikey
export GEMINI_API_KEY="your-key-here"

# ...or any provider key, picked up automatically
export WHISPERO_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"

Usage

# Simple transcription, Gemini (Portuguese default)
whispero meeting.mp3

# English transcription
whispero call.mp3 --lang en

# YouTube URL directly, no download needed (Gemini only)
whispero "https://www.youtube.com/watch?v=..." --lang en
whispero-analyze "https://www.youtube.com/watch?v=..."

# OpenAI-compatible provider (Whisper-style API)
whispero meeting.mp3 --provider openai
whispero meeting.mp3 --provider openai \
    --base-url https://api.groq.com/openai/v1 \
    --model whisper-large-v3

# Deep analysis: transcript, speakers, tone, emotions, urgency,
# intent, action items, key moments, irony/sarcasm detection
whispero-analyze meeting.mp3
whispero-analyze meeting.mp3 --provider openai \
    --base-url https://api.groq.com/openai/v1

# Faster upload for large files (compresses to opus 32k first, local files only)
whispero long.mp3 --compress

# Speaker diarization: who said what, with timestamps
whispero meeting.mp3 --diarize
whispero-analyze meeting.mp3 --diarize

# Precise diarization engine (needs pyannote.audio + HF_TOKEN)
pip install "whispero[diarize]"
whispero meeting.mp3 --diarize --diarize-engine pyannote

# Configurable fallback models (comma-separated, tried in order)
whispero meeting.mp3 --fallback-models gemini-2.0-flash

Speaker diarization

--diarize identifies who is speaking in multi-speaker audio:

whispero debate.mp3 --diarize
# [FALANTE 1] [00:00] Boa noite a todos, vamos começar...
# [FALANTE 2] [00:12] Obrigado pelo convite, é um prazer...
# [FALANTE 1] [00:28] Então, o primeiro ponto da pauta...

Two engines:

  • llm (default): prompt-based diarization using the provider's native audio understanding. Works out of the box, no extra dependencies. On --provider openai it falls back to a text-based heuristic (clearly marked), since Whisper doesn't return voice information — use --provider gemini for voice-based diarization.
  • pyannote: precise timestamped segments via pyannote.audio. Needs pip install "whispero[diarize]" and HF_TOKEN (accept the model terms at https://huggingface.co/pyannote/speaker-diarization-3.1). Each speaker chunk is transcribed separately and reassembled with exact speaker labels and timestamps.

whispero-analyze --diarize adds a diarization array to the JSON output with speaker, start, end and text per segment.

Features

  • Two providers: gemini (default, native audio + YouTube URLs) and openai (any OpenAI-compatible /v1/audio/transcriptions endpoint)
  • Speaker diarization ([FALANTE 1], [FALANTE 2] with voice characteristics)
  • Retry with exponential backoff on rate limits and server errors
  • --fallback-models: configurable comma-separated fallback list
  • --compress flag: converts to opus 32k mono 16kHz via ffmpeg before upload
  • JSON validation on analysis output
  • Zero pip dependencies, only stdlib + ffmpeg

Benchmark

50 seconds of real audio, Gemini (Portuguese):

Script Time Output
transcribe.py ~4s faithful transcript
transcribe.py --compress ~4s same, half the upload size
audio_analyze.py ~14s full JSON analysis

GTA 6 trailer via YouTube URL (no download):

Script Time Output
transcribe.py ~12s dialogue + song lyrics + on-screen text
audio_analyze.py ~23s 4 speakers, tone, 9 key moments, intent

License

Apache 2.0 — see LICENSE.

Metadata

Release files for whispero 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whispero 0.3.0
File Size Uploaded
whispero-0.3.0.tar.gz 18.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whispero 0.3.0
File Interpreter ABI Platform
whispero-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / whispero-0.3.0.tar.gz

Download URL whispero-0.3.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
af354a7288c9aef77a5a32f7893c87213a401dfc969a6084d123ed576d2f033a
BLAKE2b-256 checksum
How to use checksums
67556f54682540bead5c87452973585a816c22497cb9a21e4cd05783cde0a2b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / whispero-0.3.0-py3-none-any.whl

Download URL whispero-0.3.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e1597237bd9b33e6b4a16f6ea3428d5e4c18fd9772b29134104e97c1bbe83e5
BLAKE2b-256 checksum
How to use checksums
3c69b9d423fa9729e1f3e8213f7bd1271a94edf1e8bfc975f0c5d9e06b3a398b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release 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