Skip to main content

eXtensive Audio Representation and Evaluation Suite

Project description

X-ARES: eXtensive Audio Representation and Evaluation Suite

Introduction

X-ARES is a toolkit for training, evaluating, and exporting audio encoders for various audio tasks. It is heavily inspired by the HEAR benchmark.

Supported tasks

Speech

  • Speech Commands V2
  • LibriCount
  • VoxLingua107
  • VoxCeleb1
  • LibriSpeech-Male-Female
  • Fluent Speech Commands
  • VocalSound
  • CREMA-D
  • RAVDESS
  • LibriSpeech-Phoneme
  • ASV2015

Environment

  • ESC-50
  • FSD50k
  • UrbanSound 8k
  • DESED
  • FSD18-Kaggle
  • Clotho

Music

  • MAESTRO
  • GTZAN Genre
  • NSynth
  • FMA

Installation

X-ARES is available on PyPI. You can install it via pip.

pip install xares

For development, you can clone the repository and install the package in editable mode.

git clone <this-repo>
cd xares
pip install -e .[examples]

Run with the baseline pretrained audio encoder (Dasheng)

You can run the benchmark with the baseline pretrained audio encoder (Dasheng) with 8 parallel jobs using the following command:

python -m xares.run --max-jobs 8 example/dasheng/dasheng_encoder.py src/tasks/*.py

It will download the datasets from Zenodo, and then evaluate the encoder on all the tasks. If the automatic download fails, you can also manually download the datasets using tools/download_manually.sh.

Alternatively, you can run tasks from within Python. Here is an example of running the ASVspoof2015 task in a single process:

>>> from example.dasheng.dasheng_encoder import DashengEncoder
>>> from tasks.asvspoof_task import asvspoof2015_config
>>> from xares.task import XaresTask

>>> task = XaresTask(encoder=DashengEncoder(), config=asvspoof2015_config())
>>> task.run()

Run with your own pretrained audio encoder

Two examples of audio encoder wrapper could be found at example/dasheng/dasheng_encoder.py and example/wav2vec2/wav2vec2.py.

We provide a check function to verify if the encoder is correctly implemented:

>>> from xares.audio_encoder_checker import check_audio_encoder

>>> encoder = YourEncoder()
>>> check_audio_encoder(encoder)
True

And then you can run the benchmark with your own encoder:

python -m xares.run --max-jobs 8 your_encoder.py src/tasks/*.py

Add new tasks

Adding a new task is easy. Refer to the existing task implementations for guidance. You need to create a TaskConfig tailored to your chosen dataset.

Project details


Download files

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

Source Distribution

xares-0.0.5.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

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

xares-0.0.5-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file xares-0.0.5.tar.gz.

File metadata

  • Download URL: xares-0.0.5.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for xares-0.0.5.tar.gz
Algorithm Hash digest
SHA256 cf2b52aefab21b9dfce9afb8572e4899845b5caeb3efdc07434b82fe93f637a9
MD5 cd082ec9b6e697608a386b5ecc50cdc5
BLAKE2b-256 b7536a900a2af51bedbc267331b7f7df465e7d81a5754fe2cdb64f34ff6f803e

See more details on using hashes here.

File details

Details for the file xares-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: xares-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 48.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for xares-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f1a5da16b83e91b1ced11734c0c0f05b694541c759106396735a139880572116
MD5 af56e817d1c7c8212835dc1d5d1c9cab
BLAKE2b-256 97625a6fa53457764ee3df5a1aac49c2e2df0eecf30198a422b9be363d648a73

See more details on using hashes here.

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