rnnoise for Debian
==================

Repacked upstream (+ds): vendored neural-network model
------------------------------------------------------

Upstream does not commit the pre-trained model to git because it is too large.
Instead, ``autogen.sh`` runs ``download_model.sh``, which reads the model hash
from the ``model_version`` file and downloads

    https://media.xiph.org/rnnoise/models/rnnoise_data-<hash>.tar.gz

extracting ``src/rnnoise_data.{c,h}`` -- the generated network weights that are
required to compile ``librnnoise``.

Debian builds have no network access, so the model must be part of the source
package. We repack the upstream tarball (``+ds``): ``debian/watch`` runs uscan
with ``Repack``/``Update-Script``, and ``debian/repack.sh`` downloads the model
and bakes ``src/rnnoise_data.*`` into the orig tarball.

Regenerating the orig tarball
-----------------------------

    gbp import-orig --uscan --pristine-tar

or, step by step:

    uscan --verbose --download-current-version   # produces ../rnnoise_<v>+ds.orig.tar.xz
    gbp import-orig --pristine-tar ../rnnoise_<v>+ds.orig.tar.xz

The model version baked in corresponds to the ``model_version`` file of the
upstream tag being packaged.

Notes for review (NEW queue)
----------------------------

Since v0.2 the model is trained only on publicly available datasets, and the
training/dumping tooling (``train_rnnoise.py``, ``dump_rnnoise_weights.py``,
``dump_weights_blob``, ``torch/``) ships in the source, so the "preferred form
for modification" of the weights is present. See debian/copyright.
