OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Security & Safety

Asradversarialattacks

Asradversarialattacks is a Python package for testing automatic speech recognition models with white-box adversarial audio attacks, including FGSM, BIM, PGD, Carlini–Wagner and Imperceptible.

Independent OpenViST project profile, based on linked sources.

Asradversarialattacks — OpenViST project profile in AI Security & Safety.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when evaluating an authorized CTC-based ASR model against documented white-box attacks, or exploring adversarial robustness in speech recognition.

Who it is for

  • Researchers studying adversarial machine learning for speech recognition.
  • Developers assessing the robustness of ASR models they are authorized to evaluate.

Documented uses

  • Generate targeted or untargeted adversarial inputs for an ASR model.
  • Compare clean and adversarial speech recognition outputs.
  • Measure a documented targeted BIM example using word error rate.
Before you choose

Requirements & limits

The project is a public GitHub repository under the Apache-2.0 license. The README documents installation from PyPI and Python 3.10+ with PyTorch 2.x.

  • The documented backends target CTC modules, including torchaudio wav2vec2 and Hugging Face CTC models.
  • The wav2vec2 example expects 16 kHz audio.
  • Robust-mode Imperceptible attacks require a RoomSimulator; the rooms extra installs pyroomacoustics for generating its rooms.
  • The README provides attack examples and a benchmark reference, but reported benchmark conditions should be consulted for model-specific performance.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up a wav2vec2-based ASR attack

Install the documented wav2vec2 extra and prepare the model, backend and attacker shown in the quickstart.

Before you start

  • Python 3.10 or later and PyTorch 2.x
  • A CUDA or CPU PyTorch wheel appropriate to your environment, installed first
  • The package's wav2vec2 extra and torchaudio

Steps

  1. Install a suitable PyTorch wheel, as directed by the PyTorch installation page.

  2. Install the package with the command below.

    Documented command
    pip install asr-attacks[wav2vec2]
  3. Load the documented torchaudio WAV2VEC2_ASR_BASE_960H model and create a CTCModuleBackend with the model, labels and selected device.

  4. Wrap the backend with ASRAttacker; the documented example loads a waveform and expects a 16 kHz sample rate.

Expected outcome

The documented quickstart setup produces an ASRAttacker connected to a wav2vec2 CTC model, ready for the attack calls shown in the README.

Guide limitations

  • The recipe stops at preparing the documented quickstart inputs and attacker; it does not claim an independent execution result.
  • The shown waveform must have a 16 kHz sample rate.
  • Use attacks only on models and data you are authorized to evaluate.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
13 October 2026
Original website title
hammaad2002/ASRAdversarialAttacks · Official homepage title · retained in its source language