--- id: panns-inference version: "0.1.1" license: unclear license_treatment: permissive maintenance: dormant --- # panns-inference — panns_inference: audio tagging and sound event detection inference toolbox License: permissive · Maintenance: dormant · Downloads: 81.8K/mo ## What it is and what it does panns_inference wraps pretrained audio neural networks from the PANNs project to perform two main tasks: audio tagging (labeling what sounds are present in an audio clip with confidence scores) and sound event detection (identifying when specific sounds occur within an audio file). It loads audio via librosa, feeds it through pretrained convolutional neural network models, and returns either clip-level tags with probabilities or frame-level event predictions. The package is designed for researchers and developers who want to apply pretrained audio understanding without training their own models. The package depends on librosa for audio loading and preprocessing, matplotlib for visualization, and torchlibrosa for PyTorch-compatible audio feature extraction. It requires PyTorch >= 1.0 and Python >= 3.6. Since the last release was in March 2023 and the repository shows no recent commits, the package is in maintenance limbo—it will work with existing code but should not be expected to receive updates for compatibility with newer dependencies. Use it for: - Classify audio clips into semantic categories (speech, music, vehicle sounds, etc.) with confidence scores for content moderation or audio organization. - Detect and timestamp specific sound events within longer audio recordings for audio annotation or event-based analysis. - Extract audio embeddings from pretrained models for downstream machine learning tasks like clustering or similarity search. - Prototype audio understanding features in applications without the overhead of training custom models from scratch. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides pretrained neural network models for audio tagging and sound event detection on audio files using PANNs (Pretrained Audio Neural Networks). Yes, if you need audio tagging or sound event detection and can tolerate dormant maintenance. The package is stable, has no known vulnerabilities, and low install friction. However, do not expect bug fixes or updates—verify that the pretrained models and PyTorch compatibility meet your production requirements before committing to it for critical systems. ## Install pip install panns-inference uv add panns-inference poetry add panns-inference ## Installing panns-inference Before you install: Low install friction with a pure-Python wheel. Maintenance is dormant—last commit was 2024-03-05 and no releases since 2023-03-26—so expect no active bug fixes or updates, though the codebase remains archived and available. License in practice: MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, provided you retain the license notice. Quickstart: import librosa from panns_inference import AudioTagging, SoundEventDetection audio_path = 'examples/audio.wav' audio, _ = librosa.core.load(audio_path, sr=32000, mono=True) audio = audio[None, :] at = AudioTagging(checkpoint_path=None, device='cuda') clipwise_output, embedding = at.inference(audio) PyTorch >= 1.0 is required; GPU device support (cuda) is optional but models run on CPU if device='cpu' is specified. Verify before relying: - Whether pretrained checkpoint files are automatically downloaded or must be manually provided. - Current accuracy/performance metrics for the bundled models on modern audio datasets. - Compatibility with recent PyTorch and librosa versions beyond the minimum requirements. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 81.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags audio tagging inference, sound event detection, audio classification, pretrained audio models, audio pattern recognition, neural audio analysis, audio-analysis, pretrained-models, sound-detection [View on SkillFed](https://skillfed.io/packages/panns-inference) · [View on PyPI](https://pypi.org/project/panns-inference/)