Skip to main content

Insect Audio Features

Biblioteca Python para extração de atributos de sinais optoacústicos de insetos. Oferece dois métodos: librosa e padrao (referência do laboratório).

Instalação

Após publicação no PyPI:

pip install insect-audio-features

Para desenvolvimento, na raiz do repositório:

pip install -e .

Uso

from insect_audio_features import extract_features, get_feature_columns_librosa

print(get_feature_columns_librosa())

df = extract_features(
    path_dataset='Aedes aegypti (female).zip',
    path_output='resultados/librosa.csv',
    biblioteca='librosa',
)
print(df.head())

A entrada pode ser um ZIP, uma pasta contendo ZIPs ou uma lista de caminhos. Cada ZIP contém arquivos WAV, inclusive em subpastas. O resultado é salvo em CSV e também retornado como pandas.DataFrame.

As três primeiras colunas são zip_name, file_path e label. O rótulo é inferido pelo pipeline a partir do nome do ZIP ou, conforme sua estrutura, da pasta do áudio. Confira a rotulagem antes de utilizar os resultados.

Métodos

  • Librosa: RMS, cruzamento por zero, centroide, largura de banda, planicidade, roll-off, sete bandas de contraste e 13 MFCCs (26 atributos).
  • Padrão: temperatura quando disponível, frequência de batimento das asas, complexidade, duração, inarmonicidade, picos e energias harmônicas. Consulte get_feature_columns() para a lista exata.

Também é possível processar um WAV individual:

from insect_audio_features import extract_features_librosa
features = extract_features_librosa('audio.wav')

Os algoritmos mantêm os parâmetros do projeto de pesquisa, incluindo taxa de 44,1 kHz e janela de 1.024 amostras. Não há remoção automática de silêncio. A extração individual pode falhar em áudios inválidos ou incompatíveis; no processamento em lote, essas falhas são informadas no terminal e as amostras são omitidas. Um CSV existente no destino é sobrescrito.

Escopo

O pacote contém apenas extração e processamento de arquivos. Não inclui base de áudios, resultados experimentais, classificadores ou interface web. Dependências numéricas e de áudio são instaladas separadamente pelo pip; sua compatibilidade depende da plataforma e da versão do Python. A validação inicial foi realizada em Linux com Python 3.13.

Organização preservada

Os arquivos originais continuam em main.py, src/extractors e src/utils, com os mesmos imports e funções. insect_audio_features/__init__.py apenas disponibiliza essas funções para importação pelo nome do pacote. Não há outra implementação de extração. O pacote mantém os nomes de módulos originais main e src; instale-o em um ambiente virtual dedicado para evitar conflitos com outros projetos que utilizem esses mesmos nomes.

Metadata

Release files for insect-audio-features 0.1.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 insect-audio-features 0.1.0
File Size Uploaded Provenance Actions
insect_audio_features-0.1.0.tar.gz 12.4 kB With provenance Details for insect_audio_features-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for insect-audio-features 0.1.0
File Interpreter ABI Platform Actions
insect_audio_features-0.1.0-py3-none-any.whl Python 3 none any Details for insect_audio_features-0.1.0-py3-none-any.whl

Total release size: 22.7 kB

Release files / insect_audio_features-0.1.0.tar.gz

Download URL insect_audio_features-0.1.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c2607f715282b9db4b9c1febf5f3ef5f35c48c7490f7a259034ccd8ad94903e4
BLAKE2b-256 checksum
How to use checksums
383098916083a020609f3b5036b745ef251e21f74dd886b1d2e4538558e43242
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Release files / insect_audio_features-0.1.0-py3-none-any.whl

Download URL insect_audio_features-0.1.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdb449317647745ddb0460cc4edaf24c026374eac597cbff52818ce86b65a8b6
BLAKE2b-256 checksum
How to use checksums
1a6ebc4da1def6727fe3d1f46c76fe9339c8538144c988b76bff2b76a9385c7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Security for insect-audio-features 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for insect_audio_features-0.1.0.tar.gz

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 Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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