Skip to main content

AudioQL

A semantic layer* for audio.

AudioQL wraps Whisper, pyannote, YAMNet and friends behind one small API. You point it at an audio file and get a semantic timeline — a single stream of events ("speech", "laughter", "music", "silence", ...) you can query with plain English:

from audioql import Audio

audio = Audio("meeting.mp3")

audio.find("laughter")               # all the laughs
audio.find("music after applause")   # sequencing works too
audio.find("speaker:SPEAKER_00")     # one speaker's turns
audio.search("someone discussing AI")  # keyword search over the transcript

No model-specific APIs leak out. Every backend produces the same TimelineEvent, so swapping Whisper for something else doesn't change your code.

Install

The core package is small and has no AI dependencies:

pip install audioql

Model backends are optional extras — install only what you use:

pip install "audioql[whisper]"        # speech-to-text
pip install "audioql[diarization]"    # speaker diarization
pip install "audioql[events]"         # laughter, applause, music detection
pip install "audioql[all]"            # everything

Quickstart

from audioql import Audio

audio = Audio("meeting.mp3")

print(audio.duration)                  # seconds
print(audio.sample_rate)

transcript = audio.transcript()        # needs audioql[whisper]
print(transcript.text)
for seg in transcript.segments:
    print(seg.start, seg.end, seg.text)

print(audio.speakers())                # needs audioql[diarization]

for event in audio.find("laughter"):
    print(event.start, event.end, round(event.confidence, 2))

Analysis runs lazily and the results are cached, so calling timeline(), find(), transcript() and search() on the same Audio only analyzes the file once.

Configuration

Backends are configured with keyword arguments to Audio:

import os

audio = Audio(
    "meeting.mp3",
    whisper={"model": "small", "device": "cpu"},
    diarization={"hf_token": os.getenv("HF_TOKEN")},
)

hf_token also falls back to the HF_TOKEN environment variable, so most setups just work.

The diarization plugin needs a Hugging Face access token and you must accept the user conditions on the pyannote/speaker-diarization-3.1 model page.

How it works

audio file
  → loader                 (decodes to mono float32)
  → plugins                (speech, speaker, events, silence)
  → timeline builder       (merges events, fills gaps, detects questions)
  → query engine           (find / search over the timeline)

Plugins are auto-enabled when their dependencies are installed, and disabled when they're not. You can also pass plugins and disabled_plugins to take full control.

Development

python -m venv .venv
.venv\Scripts\activate     # or: source .venv/bin/activate
pip install -e ".[dev]"
pytest

License

MIT

Download files

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

Source Distribution

audioql-0.1.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

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

audioql-0.1.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: audioql-0.1.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for audioql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 093bd618acb68f78e6c0edcf65280e362d303f336115ef446ae21e655810c3b0
MD5 449f4776d75f9c10c7e500c6f1c1f0a7
BLAKE2b-256 fa328848de8a47ea4a88833497bc6bd903fe35775d14a561d539f1a2078ed988

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on d-j7code/AudioQL

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

File details

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

File metadata

  • Download URL: audioql-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for audioql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c314284af26273479eed6a3f756eca3b785aaebdb1cc5ee4c89da45414cc8c4
MD5 413a1156ab48d8fed80798dd1e4dc6e7
BLAKE2b-256 517fac61e23c37a92509998d5a77b301f20f5d47914e2639647e23091416ddbc

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on d-j7code/AudioQL

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