Skip to main content

sonarwise

sonarwise

Pluggable audio perception engine. Hear. Search. Retrieve.

PyPI License Python Open In Colab


sonarwise indexes any audio like meetings, calls, podcasts, factory floors, lectures and makes it searchable by text, speaker, sound events, or audio similarity. Every component is pluggable: swap transcription, embedding, diarization, or storage without changing your code.

Features

  • Transcription : Whisper, Faster Whisper, or bring your own ASR
  • Audio Embeddings : CLAP joint text-audio space for semantic search
  • Speaker Diarization : know who said what (pyannote)
  • Speaker Registry : track speakers across files by voiceprint
  • Audio Event Detection : detect alarms, machinery, glass breaks, and 50+ sound types
  • Live Streaming : real-time transcription with keyword and event callbacks
  • Export : SRT, VTT, JSON, CSV, TXT, meeting notes
  • Pluggable Architecture : every component swappable via base classes
  • CLI : full command-line interface

Install

# Core (no ML dependencies)
pip install sonarwise

# With all features
pip install sonarwise[all]

# Pick what you need
pip install sonarwise[whisper]          # Whisper transcription
pip install sonarwise[faster-whisper]   # Faster Whisper (CTranslate2)
pip install sonarwise[clap]            # CLAP audio embeddings
pip install sonarwise[diarization]     # Speaker diarization
pip install sonarwise[speaker]         # Speaker identification
pip install sonarwise[events]          # Audio event detection
pip install sonarwise[live]            # Live microphone capture

Requires: ffmpeg (sudo apt install ffmpeg or brew install ffmpeg)

Quick Start

from sonarwise import SonarWise

sw = SonarWise(diarization=True, events=True)

# Index audio
sw.index("meeting.wav")
sw.index_folder("./recordings/")

# Search by text
results = sw.query("budget discussion", top_k=5)
for r in results:
    print(f"[{r.speaker_name}] {r.transcript} (score: {r.score})")

# Search by audio similarity
results = sw.query_audio("alarm_clip.wav", top_k=5)

# Search by speaker
results = sw.query("budget", speaker="Ant", top_k=5)

# Search by event
results = sw.query_events(event="machine_fault", top_k=5)

Speaker Intelligence

# Register a speaker
sw.register_speaker("Ant", reference_audio="ant_voice.wav")

# Query by speaker
results = sw.query("budget", speaker="Ant")

# Speaker timeline
timeline = sw.speaker_timeline("meeting.wav")

# Speaker stats
stats = sw.speaker_stats("meeting.wav")

# Find speaker across files
presence = sw.find_speaker_across(speaker="Ant", folders=["./meetings/"])

Live Mode

sw = SonarWise(mode="live", diarization=True, events=True)

@sw.on("transcript")
def on_speech(segment):
    print(f"[{segment.speaker_name}] {segment.transcript}")

@sw.on("keyword", words=["budget", "deadline", "risk"])
def on_keyword(segment):
    send_alert(segment.transcript)

@sw.on("sound_event", events=["alarm", "glass_break"])
def on_danger(event):
    trigger_alert(event)

sw.listen(source="microphone")

Plug Any Model

Every component is swappable:

from sonarwise import SonarWise
from sonarwise.core.transcriber import BaseTranscriber

class MyTranscriber(BaseTranscriber):
    def transcribe(self, audio):
        return my_model.process(audio)

sw = SonarWise(transcriber=MyTranscriber())

Pluggable slots:

Component Base Class Default
Transcriber BaseTranscriber Whisper
Audio Embedder BaseAudioEmbedder CLAP
Vector Store BaseVectorStore SQLite
Chunker BaseChunker Silero VAD
Diarizer BaseDiarizer pyannote
Speaker Embedder BaseSpeakerEmbedder ECAPA-TDNN
Event Classifier BaseEventClassifier PANNs
Stream Listener BaseStreamListener sounddevice

CLI

sonarwise index meeting.wav
sonarwise query "budget discussion"
sonarwise speakers meeting.wav
sonarwise timeline meeting.wav
sonarwise listen --source microphone --on-keyword "budget,risk"
sonarwise export meeting.wav --format srt
sonarwise stats

Export

sw.export("meeting.wav", format="srt", output="subtitles.srt")
sw.export("meeting.wav", format="json", output="segments.json")
sw.export("meeting.wav", format="txt", output="transcript.txt")
sw.export("meeting.wav", format="notes", output="meeting_notes.md")

Ecosystem

sonarwise is part of the VK-Ant AI perception ecosystem:

Library Purpose Tagline
SightRAG Visual perception See. Search. Retrieve.
sonarwise Audio perception Hear. Search. Retrieve.
adaptive-intelligence Reasoning & memory Learn. Remember. Adapt.
llmevalkit Evaluation Evaluate. Score. Improve.

License

Apache 2.0

Author

Built by Venkatkumar Rajan

Download files

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

Source Distribution

sonarwise-0.1.5.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

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

sonarwise-0.1.5-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file sonarwise-0.1.5.tar.gz.

File metadata

  • Download URL: sonarwise-0.1.5.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for sonarwise-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a85539ed0518d65999e4f3df7ab29da3a26e714ab6ec2a89fbfa8830b79c032e
MD5 4ad31e3788db3027d48dfc71da612724
BLAKE2b-256 e5ca1aaf7c2150dbfad819424c2714f4189026cc85316a8683123d3d711e7672

See more details on using hashes here.

File details

Details for the file sonarwise-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: sonarwise-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for sonarwise-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ca01b2fd6e0ae36b0fe88f6b9e71d6ee1c2e8b0d72d2057a8cdc5803a43cddde
MD5 544f301191f9a175430b74b1a2a27f45
BLAKE2b-256 2b12c0691d7d1b762b4b109adc16830655937ff8876844224ff441a054035441

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page