summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Johannes Schoepfer <slackbuilds@schoepfer.info>2024-05-03 08:55:04 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-05-04 21:45:17 +0700
commit1c6287ca2ae0362966adab127d9ad33299c76454 (patch)
tree24eadc6351872c7a38ab159761a7c03f8ed21b0e
parent487894c144b4d2d4db2122f2cf005236bd0871d9 (diff)
downloadslackbuilds-1c6287ca2ae0362966adab127d9ad33299c76454.tar.gz
slackbuilds-1c6287ca2ae0362966adab127d9ad33299c76454.tar.xz
audio/openvino-plugins-ai-audacity: Added (AI-enabled effects, generators, and analyzers for Audacity).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--audio/openvino-plugins-ai-audacity/README16
-rw-r--r--audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.SlackBuild158
-rw-r--r--audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.info20
-rw-r--r--audio/openvino-plugins-ai-audacity/slack-desc19
4 files changed, 213 insertions, 0 deletions
diff --git a/audio/openvino-plugins-ai-audacity/README b/audio/openvino-plugins-ai-audacity/README
new file mode 100644
index 0000000000..d4111dc4cf
--- /dev/null
+++ b/audio/openvino-plugins-ai-audacity/README
@@ -0,0 +1,16 @@
+A set of AI-enabled effects, generators, and analyzers for Audacity.
+
+These AI features run 100% locally on your PC -- no internet connection
+necessary!
+OpenVINO is used to run AI models on supported accelerators found on
+the user's system such as CPU, GPU, and NPU.
+
+Due to the size of the openvino models, currently only two of the
+effects are provided with this build:
+ -Music Separation -- Separate a mono or stereo track into individual
+ stems -- Drums, Bass, Vocals, & Other Instruments.
+ -Noise Suppression -- Removes background noise from an audio sample.
+
+
+whisper.cpp needs to be build against openvino to pick it up as
+dependency.
diff --git a/audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.SlackBuild b/audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.SlackBuild
new file mode 100644
index 0000000000..84ec8619dd
--- /dev/null
+++ b/audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.SlackBuild
@@ -0,0 +1,158 @@
+#!/bin/bash
+
+# Slackware build script for openvino-plugins-ai-audacity
+
+# Copyright 2024 Johannes Schoepfer, Germany
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=openvino-plugins-ai-audacity
+VERSION=${VERSION:-3.5.1}
+VERSION_SRC="${VERSION}-R2"
+VERSION_AUDACITY=3.5.1
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION_SRC
+tar xvf $CWD/$PRGNAM-$VERSION_SRC.tar.gz
+cd $PRGNAM-$VERSION_SRC
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} + -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} +
+
+tar vxf $CWD/audacity-sources-$VERSION_AUDACITY.tar.gz
+
+cat << EOF >> audacity-sources-$VERSION_AUDACITY/modules/CMakeLists.txt
+add_subdirectory(mod-openvino)
+EOF
+mv mod-openvino audacity-sources-$VERSION_AUDACITY/modules/
+
+source /usr/share/openvino/setupvars.sh
+
+cd audacity-sources-$VERSION_AUDACITY
+ sed -i 's|^#include "allegro.h"|#include "portsmf/allegro.h"|' libraries/lib-note-track/WrapAllegro.h
+ mkdir build
+ cd build
+ unshare -n cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS $RPATH $LDPATH" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS $RPATH $LDPATH" \
+ -DAUDACITY_BUILD_LEVEL=2 \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -DHAVE_VISIBILITY=1" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS -DHAVE_VISIBILITY=1" \
+ -DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
+ -Daudacity_use_twolame="off" \
+ -Daudacity_use_ladspa="off" \
+ -Daudacity_use_soundtouch="off" \
+ -Daudacity_use_vamp="off" \
+ -Daudacity_has_vst3="off" \
+ -Daudacity_use_expat="system" \
+ -Daudacity_use_lame="off" \
+ -Daudacity_use_ffmpeg="off" \
+ -Daudacity_conan_enabled="off" \
+ -Daudacity_has_networking="off" \
+ -Daudacity_has_crashreports="off" \
+ -Daudacity_has_updates_check="off" \
+ -Daudacity_has_sentry_reporting="off" \
+ -Daudacity_obey_system_dependencies="on" \
+ -Daudacity_lib_preference="system" \
+ -Daudacity_use_wxwidgets="system" \
+ -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \
+ -DwxWidgets_wxrc_EXECUTABLE=/usr/bin/wxrc \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make mod-openvino
+ make install/strip DESTDIR=$PKG/tmpxxx
+ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/audacity/modules
+ mv $PKG/tmpxxx/usr/lib$LIBDIRSUFFIX/audacity/modules/mod-openvino.so $PKG/usr/lib$LIBDIRSUFFIX/audacity/modules/mod-openvino.so
+ patchelf --add-rpath "$INTEL_OPENVINO_DIR/runtime/lib/intel64/" $PKG/usr/lib$LIBDIRSUFFIX/audacity/modules/mod-openvino.so
+ rm -rf $PKG/tmpxxx
+ cd ..
+cd ..
+
+# Provide openvino models
+mkdir -p $PKG/usr/lib/openvino-models
+unzip $CWD/deepfilternet2.zip -d $PKG/usr/lib/openvino-models
+unzip $CWD/deepfilternet3.zip -d $PKG/usr/lib/openvino-models
+cp $CWD/htdemucs_v4.bin $PKG/usr/lib/openvino-models
+cp $CWD/htdemucs_v4.xml $PKG/usr/lib/openvino-models
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE.txt README.md doc/feature_doc $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.info b/audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.info
new file mode 100644
index 0000000000..007adbf4e1
--- /dev/null
+++ b/audio/openvino-plugins-ai-audacity/openvino-plugins-ai-audacity.info
@@ -0,0 +1,20 @@
+PRGNAM="openvino-plugins-ai-audacity"
+VERSION="3.5.1"
+HOMEPAGE="https://github.com/intel/openvino-plugins-ai-audacity/"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/intel/openvino-plugins-ai-audacity/archive/v3.5.1-R2/openvino-plugins-ai-audacity-3.5.1-R2.tar.gz \
+ https://github.com/audacity/audacity/releases/download/Audacity-3.5.1/audacity-sources-3.5.1.tar.gz \
+ https://huggingface.co/Intel/demucs-openvino/resolve/main/htdemucs_v4.xml \
+ https://huggingface.co/Intel/demucs-openvino/resolve/main/htdemucs_v4.bin \
+ https://huggingface.co/Intel/deepfilternet-openvino/resolve/main/deepfilternet2.zip \
+ https://huggingface.co/Intel/deepfilternet-openvino/resolve/main/deepfilternet3.zip"
+MD5SUM_x86_64="3a8159867cf264afc280ab836ef848f9 \
+ 42d866855b2563dc0ec50b9c38476a0d \
+ aa7fcbb6980d83683902ac48c53116be \
+ 1d1fbf4673bd956b3c13879555fa0ad2 \
+ c17382730bdef35c325df210a1ff3d4b \
+ dfaca36bb422a37a299e4f328e1b6843"
+REQUIRES="audacity pytorch whisper.cpp"
+MAINTAINER="Johannes Schoepfer"
+EMAIL="slackbuilds@schoepfer.info"
diff --git a/audio/openvino-plugins-ai-audacity/slack-desc b/audio/openvino-plugins-ai-audacity/slack-desc
new file mode 100644
index 0000000000..a5be7b7654
--- /dev/null
+++ b/audio/openvino-plugins-ai-audacity/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+openvino-plugins-ai-audacity: openvino-plugins-ai-audacity (AI Plugins for Audacity)
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity: A set of AI-enabled effects, generators, and analyzers for Audacity
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity:
+openvino-plugins-ai-audacity: https://github.com/intel/openvino-plugins-ai-audacity/
+openvino-plugins-ai-audacity: