sphinxbase/pocketsphinx: Sync with AUR, remove libtool
This commit is contained in:
parent
8223027fdc
commit
0965f9448e
|
@ -1,31 +0,0 @@
|
|||
Copyright (c) 1999-2016 Carnegie Mellon University. All rights
|
||||
reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
This work was supported in part by funding from the Defense Advanced
|
||||
Research Projects Agency and the National Science Foundation of the
|
||||
United States of America, and the CMU Sphinx Speech Consortium.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
|
||||
ANY EXPRESSED 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 CARNEGIE MELLON UNIVERSITY
|
||||
NOR ITS EMPLOYEES 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.
|
||||
|
|
@ -4,17 +4,15 @@
|
|||
|
||||
pkgname=pocketsphinx
|
||||
pkgver=5prealpha
|
||||
pkgrel=5
|
||||
pkgdesc='Lightweight speech recognition engine'
|
||||
pkgrel=10
|
||||
pkgdesc='Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://cmusphinx.sourceforge.net'
|
||||
license=('BSD')
|
||||
makedepends=('swig' 'python2' 'python')
|
||||
depends=('sphinxbase=5prealpha' 'gstreamer0.10-base' 'gst-plugins-base-libs')
|
||||
source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz"
|
||||
"https://raw.githubusercontent.com/cmusphinx/pocketsphinx/master/LICENSE")
|
||||
sha256sums=('ad9f5f5c5ce79ff87b63d527f8f4d3e2f54c0c1da53793895991a8849ca47701'
|
||||
'49181202f2b991d25f6cac8cd1705994494b9600d4311794ecbb9fcf8b188aef')
|
||||
depends=('sphinxbase=5prealpha' 'gst-plugins-base-libs')
|
||||
source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz")
|
||||
sha256sums=('ef5bb5547e2712bdf571f256490ef42a47962033892efd9d7df8eed7fe573ed9')
|
||||
options=('!libtool')
|
||||
|
||||
prepare() {
|
||||
|
@ -24,17 +22,20 @@ prepare() {
|
|||
autoreconf -ivf > /dev/null
|
||||
|
||||
cd ..
|
||||
|
||||
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
|
||||
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
msg2 "Building python3 environment"
|
||||
export PYTHON=/usr/bin/python
|
||||
cd "$pkgname-$pkgver-py3"
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
|
||||
|
||||
msg2 "Building python2 environment"
|
||||
cd "../$pkgname-$pkgver-py2"
|
||||
export PYTHON=/usr/bin/python2
|
||||
|
@ -50,11 +51,6 @@ package() {
|
|||
cd "../$pkgname-$pkgver-py2/swig"
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
install -d -m755 "$pkgdir/usr/share/licenses/$pkgname"
|
||||
install -D -m644 "${srcdir}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
|
||||
libtool --finish "$pkgdir/usr/lib"
|
||||
libtool --finish "$pkgdir/usr/lib/gstreamer-1.0"
|
||||
libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/pocketsphinx"
|
||||
libtool --finish "$pkgdir/usr/lib/python3.5/site-packages/pocketsphinx"
|
||||
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -D -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
Copyright (c) 1999-2016 Carnegie Mellon University. All rights
|
||||
reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
This work was supported in part by funding from the Defense Advanced
|
||||
Research Projects Agency and the National Science Foundation of the
|
||||
United States of America, and the CMU Sphinx Speech Consortium.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
|
||||
ANY EXPRESSED 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 CARNEGIE MELLON UNIVERSITY
|
||||
NOR ITS EMPLOYEES 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.
|
|
@ -1,47 +1,43 @@
|
|||
# Maintainer: Marco Pompili < marcs (dot) pompili (at) gmail (dot) com >
|
||||
# Maintainer: Marco Pompili <aur AT emarcs DOT org>
|
||||
# Contributor: Giorgio Gilestro crocowhile@gmail.com
|
||||
# Contributor: Martchus <martchus@gmx.net>
|
||||
# Contributor: Mladen Milinkovic <maxrd2@smoothware.net>
|
||||
|
||||
pkgname=sphinxbase
|
||||
pkgver=5prealpha
|
||||
pkgrel=5
|
||||
pkgdesc='Common library for sphinx speech recognition'
|
||||
pkgrel=10
|
||||
pkgdesc='Common library for sphinx speech recognition.'
|
||||
url='http://cmusphinx.sourceforge.net/'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('BSD')
|
||||
makedepends=('bison' 'swig' 'python2' 'python')
|
||||
depends=('lapack' 'libpulse')
|
||||
source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/$pkgname-$pkgver.tar.gz"
|
||||
"https://raw.githubusercontent.com/cmusphinx/sphinxbase/master/LICENSE"
|
||||
'timing-fix.patch')
|
||||
sha256sums=('06971dbe272d2f73bde0ef7b3538c0c8f8ea885cb171fd6b17a5975bced66e64'
|
||||
'8b4bc30d2a57839cba678bb84472a9b0b4c84725ed04b37508e5ed3476f03c19'
|
||||
makedepends=('bison' 'swig')
|
||||
depends=('python2' 'python' 'lapack' 'libpulse') # not sure if libsamplerate is needed 'libsamplerate'
|
||||
source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
"timing-fix.patch")
|
||||
sha256sums=('f72bdb59e50b558bed47cc2105777200d2b246a0f328e913de16a9b22f9a246f'
|
||||
'5e8b2bac5d9f84a1c7b7fd774ef2b3f8f6cfc9dcb415b10a66ef439f91f3d4c5')
|
||||
options=('!libtool')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
patch -p1 < "$srcdir/timing-fix.patch"
|
||||
|
||||
msg2 "Reconfiguring project for Automake v1.15"
|
||||
msg2 "Reconfiguring project for current version of Automake"
|
||||
autoreconf -ivf > /dev/null
|
||||
|
||||
cd ..
|
||||
|
||||
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
|
||||
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
|
||||
cp -R "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-py2"
|
||||
cp -R "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-py3"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver-py2"
|
||||
cd "${pkgname}-${pkgver}-py2"
|
||||
|
||||
msg2 "Building Sphinxbase with Python 2 bindings..."
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
|
||||
cd "../$pkgname-$pkgver-py3"
|
||||
cd "../${pkgname}-${pkgver}-py3"
|
||||
msg2 "Building Sphinxbase with Python 3 bindings..."
|
||||
export PYTHON=/usr/bin/python2
|
||||
./configure --prefix=/usr
|
||||
|
@ -49,20 +45,16 @@ build() {
|
|||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver-py2"
|
||||
cd "${pkgname}-${pkgver}-py2"
|
||||
|
||||
msg2 "Installing Sphinxbase with Python 2 bindings"
|
||||
make DESTDIR="$pkgdir/" install
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
|
||||
msg2 "Installing Python 3 bindings"
|
||||
cd "../$pkgname-$pkgver-py3/swig"
|
||||
make DESTDIR="$pkgdir/" install
|
||||
cd "../${pkgname}-${pkgver}-py3/swig"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
|
||||
install -d "$pkgdir/usr/share/licenses/$pkgname"
|
||||
install -m644 "${srcdir}/LICENSE" \
|
||||
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
|
||||
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
|
||||
libtool --finish "$pkgdir/usr/lib"
|
||||
libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/sphinxbase"
|
||||
libtool --finish "$pkgdir/usr/lib/python3.5/site-packages/sphinxbase"
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
commit a1d18a46aeec2022e64fa1b11b08b5721bc9f98f
|
||||
Author: Mladen Milinkovic <max@smoothware.net>
|
||||
Date: Fri May 20 04:45:53 2016 +0200
|
||||
|
||||
fe_process_frames_ext() wasn't updating fe sample_counter in some cases
|
||||
|
||||
When there wasn't enough samples in buffer to fill one frame,
|
||||
sample_counter wasn't updated with samples that were stored in overflow
|
||||
buffer.
|
||||
|
||||
diff --git a/src/libsphinxbase/fe/fe_interface.c b/src/libsphinxbase/fe/fe_interface.c
|
||||
index 1cc3566..d090b6e 100644
|
||||
--- a/src/libsphinxbase/fe/fe_interface.c
|
||||
+++ b/src/libsphinxbase/fe/fe_interface.c
|
||||
@@ -471,6 +471,8 @@ fe_process_frames_ext(fe_t *fe,
|
||||
memcpy(fe->overflow_samps + fe->num_overflow_samps,
|
||||
*inout_spch, *inout_nsamps * (sizeof(int16)));
|
||||
fe->num_overflow_samps += *inout_nsamps;
|
||||
+ /* Update global sample counter with number of samples */
|
||||
+ fe->sample_counter += *inout_nsamps;
|
||||
/* Update input-output pointers and counters. */
|
||||
*inout_spch += *inout_nsamps;
|
||||
*inout_nsamps = 0;
|
Loading…
Reference in New Issue