Skip to main content

AudioSense

Audio intelligence framework for machines, robots, and modern applications.

AudioSense provides a unified, multi-model audio perception library that transforms raw acoustic signals into sound events, speech transcripts, and contextual environmental insights.

The AudioSense framework includes the following:

  • Sound Event Classification: Ensemble consensus scoring combining AST (Audio Spectrogram Transformer), PANNs (CNN14), and YAMNet.
  • Intelligent Routing: Automatic VAD gating that routes human speech to Faster-Whisper and environmental audio to situational reasoning.
  • Context Reasoning: High-level environmental situation descriptions powered by local LLMs (Ollama, llama-server, GGUF) or custom endpoints.
  • Universal Audio Ingestion: Ingests .mp3, .flac, .ogg, .m4a, .aac, .opus, .webm, and .mp4, converting to conditioned .wav.
  • Live Real-time Microphone Loop: Continuous listening with callback hooks for robotics and alert systems.
  • Acoustic Event History: Built-in persistence for tracking auditory events over time with summary reporting.

Installation

Install AudioSense using pip:

pip install audiosense

For optional server dependencies (FastAPI & Uvicorn):

pip install "audiosense[server]"

Quickstart

Add intelligent audio perception to your application in a few lines of code:

from audiosense import AudioSense

# Initialize engine
model = AudioSense()

# Predict on an audio file
result = model.predict("audio.wav")
print(result)

# Inspect detected labels and context
print("Detected labels:", result.labels)
print("Context:", result.text)

Core Capabilities

1. Unified Speech vs. Environmental Routing

AudioSense automatically determines whether incoming sound is human speech or ambient environmental sound:

res = model.predict("sample.wav")

if res.route == "transcription":
    print("Speech transcript:", res.transcription)
else:
    print("Environmental context:", res.context)

2. Functional Label APIs

Direct access to AudioSet taxonomy and multi-model consensus predictions:

from audiosense.label import get_label, top_k, get_categories

# Top prediction
primary = get_label("sample.wav")

# Top 5 consensus predictions
rankings = top_k("sample.wav", k=5)

# Inspect categories
categories = get_categories(["Dog", "Car horn", "Speech"])

3. Real-Time Microphone Listening

Continuous listening loop for robots and interactive systems:

from audiosense import AudioSense

model = AudioSense()

def on_sound(res):
    print("Heard:", res.labels)

# Start real-time listening loop (Press Ctrl+C to stop)
model.loop(chunk_duration=2.0, callback=on_sound)

4. Universal Audio Conversion

Convert any supported audio format to standardized .wav:

from audiosense import convert_to_wav

wav_path = convert_to_wav("recording.m4a", output_path="recording.wav")

Discussion & Support

If you run into bugs or have feature suggestions, please file them in our GitHub Issue Tracker.

License

AudioSense is licensed under the MIT License.

Metadata

Release files for audiosense 1.0.1

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

Source distribution (sdist)

Source distribution for audiosense 1.0.1
File Size Uploaded
audiosense-1.0.1.tar.gz 36.7 kB Details

Built distribution (wheel)

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

Total release size: 78.0 kB

Release files / audiosense-1.0.1.tar.gz

Download URL audiosense-1.0.1.tar.gz
Size 36.7 kB
Tags Source
SHA-256 checksum
How to use checksums
63141aae03a4b8e512438d7bddc1a4b7005e9c3780e09579b1bddaaa322d2112
BLAKE2b-256 checksum
How to use checksums
74a7c4371e916489f4da33d0ea164071bfadf816c33a585ad145a4b7f3f8cc77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / audiosense-1.0.1-py3-none-any.whl

Download URL audiosense-1.0.1-py3-none-any.whl
Size 41.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aac82503c7db5d80eaf6097fb74cd090c46542b546f9c2dded9a51f5e79bccc4
BLAKE2b-256 checksum
How to use checksums
c220f3ddcc68c908079b9a1f15abeb6af2e35ea6706ed6757a868851fca0f0ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.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