new package: librnnoise
This commit is contained in:
parent
f0cf15b1e5
commit
9395dff138
28
packages/librnnoise/build.sh
Normal file
28
packages/librnnoise/build.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://jmvalin.ca/demo/rnnoise/
|
||||||
|
TERMUX_PKG_DESCRIPTION="RNN-based noise suppression"
|
||||||
|
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||||
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
|
_COMMIT=7f449bf8bd3b933891d12c30112268c4090e4d59
|
||||||
|
TERMUX_PKG_VERSION=2021.03.12
|
||||||
|
TERMUX_PKG_SRCURL=https://gitlab.xiph.org/xiph/rnnoise.git
|
||||||
|
TERMUX_PKG_GIT_BRANCH=master
|
||||||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||||
|
--disable-examples
|
||||||
|
--disable-doc
|
||||||
|
"
|
||||||
|
|
||||||
|
termux_step_post_get_source() {
|
||||||
|
git fetch --unshallow
|
||||||
|
git checkout $_COMMIT
|
||||||
|
|
||||||
|
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
|
||||||
|
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
|
||||||
|
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
|
||||||
|
echo " is different from what is expected to be: \"$version\""
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_pre_configure() {
|
||||||
|
autoreconf -fi
|
||||||
|
}
|
20
packages/librnnoise/src-rnn.c.patch
Normal file
20
packages/librnnoise/src-rnn.c.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/src/rnn.c
|
||||||
|
+++ b/src/rnn.c
|
||||||
|
@@ -102,7 +102,7 @@
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
output[i] = relu(output[i]);
|
||||||
|
} else {
|
||||||
|
- *(int*)0=0;
|
||||||
|
+ __builtin_trap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@
|
||||||
|
if (gru->activation == ACTIVATION_SIGMOID) sum = sigmoid_approx(WEIGHTS_SCALE*sum);
|
||||||
|
else if (gru->activation == ACTIVATION_TANH) sum = tansig_approx(WEIGHTS_SCALE*sum);
|
||||||
|
else if (gru->activation == ACTIVATION_RELU) sum = relu(WEIGHTS_SCALE*sum);
|
||||||
|
- else *(int*)0=0;
|
||||||
|
+ else __builtin_trap();
|
||||||
|
h[i] = z[i]*state[i] + (1-z[i])*sum;
|
||||||
|
}
|
||||||
|
for (i=0;i<N;i++)
|
Loading…
Reference in New Issue
Block a user