Added patch to fix invalid times of detected words in sphinxbase

This commit is contained in:
Mladen Milinkovic 2016-05-28 06:43:33 +02:00
parent 40fe400a53
commit bac8d786a3
2 changed files with 26 additions and 1 deletions

View File

@ -4,7 +4,7 @@
pkgname=sphinxbase
pkgver=5prealpha
pkgrel=4
pkgrel=5
pkgdesc='Common library for sphinx speech recognition.'
url='http://cmusphinx.sourceforge.net/'
arch=('i686' 'x86_64')
@ -20,6 +20,8 @@ options=('!libtool')
prepare() {
cd "$pkgname-$pkgver"
patch -p1 < ../../timing-fix.patch
msg2 "Reconfiguring project for Automake v1.15"
autoreconf -ivf > /dev/null

View File

@ -0,0 +1,23 @@
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;