Name: rnnoise %global forgeurl https://gitlab.xiph.org/xiph/%{name} %global commit 7f449bf8bd3b933891d12c30112268c4090e4d59 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global libversion 0.4.1 Version: %{libversion}^20210312git%{shortcommit} Release: 0%{?dist} Summary: Recurrent neural network for audio noise reduction # Main code is BSD-3-Clause # Kiss_fft.c and kiss_fft.h are BSD-2-Clause License: BSD-3-Clause AND BSD-2-Clause URL: %{forgeurl} Source0: %{url}/-/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: make # Modified kissfft is included Provides: bundled(kiss-fft) %description RNNoise is a noise suppression library based on a recurrent neural network. A description of the algorithm is provided in the following paper: J.-M. Valin, A Hybrid DSP/Deep Learning Approach to Real-Time Full-Band Speech Enhancement, Proceedings of IEEE Multimedia Signal Processing (MMSP) Workshop, arXiv:1709.08243, 2018. https://arxiv.org/pdf/1709.08243.pdf An interactive demo is available at: https://jmvalin.ca/demo/rnnoise/ %package devel Summary: Recurrent neural network for audio noise reduction Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development headers and libraries for rnnoise %package example Summary: Recurrent neural network for audio noise reduction Requires: %{name}%{?_isa} = %{version}-%{release} %description example Commandline application rnnoise_demo that operates on RAW 16-bit (machine endian) mono PCM files sampled at 48 kHz. It can be used as: ./examples/rnnoise_demo The output is also a 16-bit raw PCM file. %prep %autosetup -n %{name}-%{commit} %build # Documentation is just the header file, do not package it libtoolize ./autogen.sh %configure --enable-shared --disable-static --disable-doc --enable-assertions %make_build %install %make_install mkdir -p %{buildroot}%{_bindir} cp -p examples/rnnoise_demo %{buildroot}%{_bindir} %check # Smoke check for noise demo, should get a message about how to # use it, and return an error code of 1. Check for error message # in build log and ignore the error code so build continues. ./examples/rnnoise_demo | echo $? %files %{_libdir}/librnnoise.so.%{libversion} %{_libdir}/librnnoise.so.0 %license COPYING %doc README %doc AUTHORS %exclude %{_docdir}/rnnoise/COPYING %files devel %{_includedir}/rnnoise.h %{_libdir}/librnnoise.so %{_libdir}/pkgconfig/%{name}.pc %files example %{_bindir}/rnnoise_demo %changelog * Mon Jun 19 2023 Benson Muite 0.4.1^20210312git7f449bf-0 - Initial packaging