/ Модель

Характеристики

Лицензия
MIT
Библиотека
pytorch
Опубликована
5 ноя 2026

before-the-implant-causal-enhancer

Обработка аудиоАудио → аудио3 профессии

Компактная причинная модель очищает речь от шума и перекрывающихся голосов с низкой задержкой, для исследовательской оценки перед кохлеарным имплантом.

95скачиваний за 30 дней1лайквеса обновлены5 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Before the Implant: causal speech enhancer — компактная нейросетевая модель для очистки речи от фонового шума и нескольких одновременно говорящих голосов. Она разработана для исследования возможности улучшать разборчивость речи перед передачей звука в кохлеарный имплант; модель ещё не испытывали с реальными пользователями или имплантами.

Модель построена на причинной архитектуре в стиле Conv-TasNet и содержит 602 510 параметров. Она обрабатывает монофонический звук с частотой 16 кГц без заглядывания вперёд; заявленная алгоритмическая задержка составляет 5,88 мс без учёта вычислений. В синтетических смесях LibriSpeech с незнакомыми модели голосами получены улучшения SI-SDR и STOI, а также корреляции с моделируемым электродограммом. Лицензия модели — MIT.

Результаты пока ограничены компьютерными испытаниями на синтетических смесях. README сообщает об ошибках в выходном сигнале весов: инвертированной полярности у весов по умолчанию и seed 19, а также постоянном смещении постоянной составляющей у всех описанных наборов весов. Исправление в опубликованных весах и коде отсутствует; обработка речи на других языках и в реальных акустических условиях не проверялась.

Сценарии применения

  • подавление фонового шума в речи
  • выделение целевого голоса среди нескольких говорящих
  • предварительная очистка аудио для изучения кохлеарных имплантов

Ограничения

Проверена только на синтетических смесях; на людях и с кохлеарными имплантами не испытывалась, а обработка других языков и реальных помещений не оценивалась. В README отмечены инверсия полярности у части весов и постоянное смещение сигнала; исправление не опубликовано.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Before the Implant: causal speech enhancer

A small neural network that takes noisy speech and gives back cleaner speech, one sample at a time, without ever looking ahead. It is built for the moment that is hardest for cochlear-implant users: one voice you want to hear inside a room full of other voices.

Erratum (2026-11-05): output sign and DC offset

A later audit on real recordings found two defects in what the model outputs. Neither changes any score in the results below, because those scores ignore sign and DC. Both can matter if you play or mix the output.

  • Sign (polarity). The default model.safetensors (seed 17) and seed19.safetensors output an inverted (upside-down) waveform. seed18.safetensors does not. Training used a loss that cannot see sign, so the sign was set by chance early in training.
  • DC offset. The last layer adds a constant to every output sample: +0.110 for seed 17, −0.165 for seed 18 and −0.146 for seed 19. enhance.py then restores the output's RMS with that offset included. The file keeps the input's RMS, but the speech itself comes out quieter, with a DC offset. In our check it was 2.3 dB quieter for the default model, 3.9 dB for seed 18 and 3.1 dB for seed 19.

The weights are unchanged, and no code fix has been published yet. A candidate output fix has been tested:

  • correct the sign;
  • remove the offset;
  • restore the speech to the input's level;
  • keep peaks below −1 dBFS.

It passed every registered check on fresh audio that fits within full scale. It did not pass the registered rule as a whole, because inputs beyond full scale trade level against peak safety. See Gen 34–36 in the research record: https://github.com/bmarti44/meta-hackathon-deaf-hard-of-hearing/tree/main/research

Until a fix is published, you can correct the output of enhance() for mono input like this. These are the same steps as the tested candidate, applied after the fact. In our check they matched it to within 1e-7:

import numpy as np
POLARITY = {"model.safetensors": -1, "seed18.safetensors": 1, "seed19.safetensors": -1}
y = enhance(noisy, sr, model=model)                              # as before
y = POLARITY["model.safetensors"] * (y - y.mean())               # fix the sign, remove the DC offset
level = np.sqrt(np.mean((noisy - noisy.mean()) ** 2))
y = y * level / (np.sqrt(np.mean(y ** 2)) + 1e-12)               # speech back to the input's level
y = y * min(1.0, 10 ** (-1 / 20) / (np.max(np.abs(y)) + 1e-12))  # keep peaks below -1 dBFS

Why

This was built by Graham's dad. Graham has bilateral cochlear implants, and like many implant users he hears well in quiet but struggles when a crowd is talking around him. This project asks whether a tiny, fast, strictly causal model could clean up speech before it reaches an implant's sound processor, and tests that question carefully on a computer first, before any implant is involved.

The research loop that produced this model, from the first generation through Gen 21 (including the test bench, the 14-check scorecard and this Gen 19 model), was run by Muse Wonder Full, Meta's AI model, under Graham's dad's direction, with Codex Astra as an independent reviewer. Claude (Anthropic) ran the final experiments and packaged this release.

Quick start

pip install torch numpy scipy soundfile safetensors huggingface_hub
hf download bmarti44/before-the-implant-causal-enhancer --local-dir before-the-implant
cd before-the-implant
python enhance.py noisy.wav enhanced.wav            # default weights: model.safetensors
python enhance.py noisy.wav enhanced.wav --weights seed18.safetensors --device cpu

Any wav works: it is mixed to mono, resampled to 16 kHz and back, and the output has the same length and sample rate as the input. Its RMS matches the input's, but see the erratum above: that RMS includes a DC offset.

Python:

import sys, soundfile as sf
from huggingface_hub import snapshot_download

d = snapshot_download("bmarti44/before-the-implant-causal-enhancer")
sys.path.insert(0, d)
from enhance import load_model, enhance

model = load_model(f"{d}/model.safetensors")
audio, sr = sf.read("noisy.wav")
sf.write("enhanced.wav", enhance(audio, sr, model=model), sr)

Raw model use: model(x) takes a (batch, samples) float tensor at 16 kHz and returns the enhanced waveform delayed by DELAY = 63 samples (out[63 + n] estimates clean [n]). enhance.py scales the file to RMS 0.14 (the level of a 0 dB training mixture), removes the delay, and restores the input level. Those two level steps use the whole file's RMS; the network itself is causal (verified by a suffix-invariance test in model_causal.py).

Files

FileWhat
model.safetensorsGen 19 final weights, seed 20261117 (default)
seed18.safetensors, seed19.safetensorsThe other two training seeds
model_causal.pyModel code (PyTorch only)
enhance.pyCLI and Python API
config.jsonSample rate, delay, latency, sizes

Results (synthetic in-silico bench)

Mean of 3 training seeds, measured against the unprocessed mixture, on synthetic LibriSpeech mixtures with speakers not seen in training. "Crowd" is 8-12 overlapping talkers.

RowResult
Crowd ΔSI-SDR+3.51 dB
Crowd ΔSTOI+0.035
Simulated 8-of-22 ACE electrodogram correlation+0.072
Crowd @ 0 dB+4.65 dB
Crowd @ −5 dB+1.19 dB (target +1.5, the one failing row)
Speech-shaped noise+6.45 dB
Held-out white noise+0.73 dB
Quiet, absolute SI-SDR36.3 dB

13 of 14 required scorecard rows pass. The full scorecard and how each row is computed are in the GitHub repo (research/bench-n6/).

Training

24,000 steps on mixtures built from LibriSpeech train-clean-100: one target talker plus crowd babble (2-12 other talkers), speech-shaped noise, or quiet, at −5 to +10 dB SNR. Loss: negative SI-SDR against the delay-shifted clean speech.

Training data: LibriSpeech (Panayotov et al., 2015), CC BY 4.0.

Limitations

  • It has only been tested by computer, on synthetic mixtures.
  • No listener has tried it, and it has never been used with any implant.
  • It has not been compared with the Nucleus 6 processor's own noise processing.
  • The hardest case, a crowd louder than the voice (−5 dB), still misses its target.
  • Streaming speed (real-time factor) has not been measured yet.
  • It was trained on read English audiobook speech at 16 kHz; other voices, languages and rooms are untested.

Citation

@misc{martin2026beforetheimplant,
  title        = {Before the Implant: a strictly causal speech enhancer for cochlear-implant listening research},
  author       = {Martin, Brian},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/bmarti44/before-the-implant-causal-enhancer}},
  note         = {Code: https://github.com/bmarti44/meta-hackathon-deaf-hard-of-hearing}
}

@inproceedings{panayotov2015librispeech,
  title     = {Librispeech: an {ASR} corpus based on public domain audio books},
  author    = {Panayotov, Vassil and Chen, Guoguo and Povey, Daniel and Khudanpur, Sanjeev},
  booktitle = {ICASSP},
  year      = {2015}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch

Нельзя запустить

Обработка «аудио → аудио» пока не поддерживается рантаймом.

Ревизия весов
0f9a8a7

0 моделей