WhatAreYouSaying documentation#
WhatAreYouSaying (WAYS) is an attribution tool for speech-to-text models. For every token a model wrote, it reports which 100 ms of audio in which frequency band the token depended on, and whether that audio was clean or degraded. It runs on local Whisper and Moonshine weights and on any OpenAI-compatible speech server such as vLLM or llama.cpp. It needs no training and no labels, and the cost is one forward pass per erased patch.
The method combines representation erasure by Li, Monroe and Jurafsky, which measures what a network uses by deleting parts of its input, with AADD by Arina Gertel, which labels what is wrong with a recording and where, every 20 ms. The code is MIT licensed.
Start here#
Set up Python 3.12, run your first clip, and call WAYS from Python.
Every ways command and option, read from the source.
The erasure grid, the three scores per token, and the noise-focus ratio.
sound-token, aud-cam and cross-check, and how to add a tool.
Local Whisper and Moonshine weights, vLLM and llama.cpp servers.
100 VoxCeleb clips, controlled damage, real noise and the latent space.
What it answers#
A speech model turns a waveform into tokens. When it gets a word wrong, or gets a hard word right, I want to know which part of the sound that word depended on, and whether that part was speech or noise. Attention maps and gradients give only a loose answer. In an earlier study of mine, gradient x input on whisper-tiny kept 92 % of its ranking after the decoder was re-initialised, which means it mostly reflected input energy and not the model. Erasure tests the question directly by removing a piece of audio and measuring what changes in the output.
For each clip WAYS returns three things:
a map over time and frequency for every token,
the top patch of every token drawn on the spectrogram, with the transcript below it in the same colours,
a noise-focus ratio per token and per clip. It is the share of a token’s evidence in audio that AADD flags as degraded, divided by the share of the clip that is flagged. A ratio of 1 means no preference.
One clip through three models. The spectrogram and the AADD strip are the same in every row, and only the boxes and the transcript strip differ. A colour and number identify one token.