Package Details: pocketsphinx 5prealpha-5

Git Clone URL: https://aur.archlinux.org/pocketsphinx.git (read-only)
Package Base: pocketsphinx
Description: Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.
Upstream URL: http://cmusphinx.sourceforge.net
Keywords: mobile recognition speech
Licenses: BSD
Submitter: None
Maintainer: marcs (Martchus)
Last Packager: marcs
Votes: 58
Popularity: 1.692879
First Submitted: 2008-08-08 21:47
Last Updated: 2016-06-01 10:33

Latest Comments

marcs commented on 2016-08-24 08:21

The includes paths are:
/usr/include/sphinxbase
/usr/include/pocketsphinx

If you didn't move those headers your installation is fine.

Blueman55 commented on 2016-08-19 18:03

Hello everyone. Newby here.

I installed this package along with sphinxbase and had to change some of the includes so that they looked inside the pocketsphinx and sphinxbase directories generated in /usr/include/. Is that normal or did I somehow botch my installation?

Also, thanks for the package guys.

Martchus commented on 2016-06-01 20:38

I had no particular reason to reconfigure it twice. Reconfiguring first and then doing the copies is better.

marcs commented on 2016-06-01 10:14

Hi martchus,

I agree with moving the depends, you are right, I changed only the fact that in your prepare function you are reconfiguring autotools twice, which I found unnecessary. Please let me know if you had any particular reason to do that, why exporting python on reconf ?

I've added you as a comantainer.

Thank you

Martchus commented on 2016-05-10 16:05

Needs to be reconfigured for use with current automake. Additionally, I think python dependencies are only required if one uses the python bindings. Hence it would make sense to make these make-only. If a python package actually uses this, Python would be installed as a dependency of this package anyways.

Here is an updated version: https://github.com/Martchus/PKGBUILDs/blob/master/pocketsphinx/default/PKGBUILD

FiyreWyrkz commented on 2016-03-14 14:44

Current md5 for pocketsphinx-5prealpha.tar.gz is - 2c4fb3a1318bb2470997ab7eb98ef69a

b3arar commented on 2016-02-07 07:31

#先清除pkg、src等等。remember to clear the environment.
prepare() {

cd "$pkgname-$pkgver"
msg2 "Reconfiguring project for Automake v1.15"
autoreconf -ivf > /dev/null
cd ..

cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
}

b3arar commented on 2016-02-07 06:51

WARNING: 'aclocal-1.13' is missing on your system.

maybe there should be autoreconf -fi in the "prepare" function/PKGBUILD
大概需要添加autoreconf -fi在PKGBUILD的"prepare"函数

marcs commented on 2016-02-02 20:23

md5 sum updated

underdoeg commented on 2016-02-01 09:56

Current md5 sum for pocketsphinx-5prealpha.tar.gz is dc4246dbeb577731432227ad33289326

marcs commented on 2015-12-03 15:27

Hey xan

I'm building the package twice now. From what I've seen only the two /usr/lib/python folders differ in the two builds, so yeah not the smartest solution but I didn't want to mess too much with autotools.

So the script it builds py3 than py2, then install the whole installation and then does a make install only of the swig folder that built the py2 bindings.

Should be fine, but do some testing.

I had to do this also on sphinxbase for consistency so do a system update, so now also sphinxbase has both py2 and py3 support

marcs

xantares commented on 2015-12-03 08:54

hi marcs,

- that would be great, have a look here:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-salib

- the package uses autotools, I guess you can cd in the bindings subdir and make install from there to install only python bindings from the new package_python-pocketsphinx() function.

- to build py3 as weel, I guess you could either copy the source dir twice and build each with different configure options, or reconfigure once with py3 in the same build dir. If the lib is not huge maybe option1 would be cleaner.

xan.

marcs commented on 2015-12-02 20:35

Hi xantares,

on the page:
https://github.com/cmusphinx/pocketsphinx-python

the travis script:
https://github.com/cmusphinx/pocketsphinx-python/blob/master/.travis.yml

The script tests also on python3, so I guess is doable.

To have both i would split this package in two different versions, in Arch style, like:

python2-pocketsphinx
python-pocketsphinx

xantares commented on 2015-12-02 20:09

hi, could we get python3 bindings instead of python2 ? or both ?
xan.

marcs commented on 2015-11-02 21:27

I've update the dependency array, hopefully the problem should be fixed.

surfhai commented on 2015-11-02 21:15

I solved the compiling issue by installing sphinxbase 0.8 and not 5prealpha

surfhai commented on 2015-11-02 19:26

I think that pocketsphinx 5prealpha depends on gstreamer1.0 not gstreamer0.10 maybe python3 is also needed.

This is the commit that changes from 0.10 to 1.0
https://github.com/cmusphinx/pocketsphinx/commit/e070acf205a8c1f72198a8e103253c0742848911

blather-git is not working with 5prealpha-1 because of this change. I want to compile the version 0.8 but without success with the initial commit on the aur git repo.

Makefile:532: recipe for target 'acmod.lo' failed
make[2]: *** [acmod.lo] Error 1
make[2]: Leaving directory '/home/tg/build/pocketsphinx/pocketsphinx/src/pocketsphinx-0.8/src/libpocketsphinx'
Makefile:366: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/tg/build/pocketsphinx/pocketsphinx/src/pocketsphinx-0.8/src'
Makefile:471: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build().
Aborting...

Mitsos101 commented on 2015-07-17 16:29

The newest release is 5prealpha, not 0.8

marcs commented on 2015-05-30 10:11

The oneliner sed command would be:

sed -i '/cython/s/$(CPPFLAGS) -I$(sphinxbase)\/python/$(SphinxBase_CFLAGS)/' python/Makefile.am

The old command just removes the CPPFLAGS.

To keep track of things I've added a patch, and left the sed command as a comment, that will be removed with the prealpha5.

Thanks 1124

1124 commented on 2015-05-11 06:41

in the PKGBUILD, under this:
sed -i '/cython/s/$(CPPFLAGS) //' python/Makefile.am
add this:
sed -i '/cython/s/-I$(sphinxbase)\/python/$(SphinxBase_CFLAGS)/' python/Makefile.am

Then it built for me. I have no idea if this is proper!

ryanvade commented on 2015-03-31 02:34

does NOT build with yaourt for me. :(

m01 commented on 2014-07-14 22:32

marcs is right. I can't build it with makepkg -cs, but using Yaourt works. I don't understand. Please can someone look into this?

Here's what I get:
'
cython2 -o pocketsphinx.c pocketsphinx.pyx -I/python

Error compiling Cython file:
------------------------------------------------------------
...
# notice is not removed.
#
# Author: David Huggins-Daines <dhuggins@cs.cmu.edu>

# Import SphinxBase C types
from sphinxbase cimport arg_t, cmd_ln_t, ngram_model_t, fsg_model_t, logmath_t
^
------------------------------------------------------------

pocketsphinx.pxd:11:0: 'sphinxbase.pxd' not found

<snip>


pocketsphinx.pyx:489:24: Cannot convert 'char **' to Python object

Error compiling Cython file:
------------------------------------------------------------
...
cdef ngram_model_t *clm
cdef logmath_t *lmath
cdef cmd_ln_t *config
cdef NGramModel lm

lm = NGramModel()
^
------------------------------------------------------------

pocketsphinx.pyx:656:23: undeclared name not builtin: NGramModel
Makefile:601: recipe for target 'pocketsphinx.c' failed
make[1]: *** [pocketsphinx.c] Error 1
make[1]: Leaving directory '/home/me/Downloads/Packages/pocketsphinx/src/pocketsphinx-0.8/python'
Makefile:461: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build().
Aborting...

marcs commented on 2014-06-15 22:00

I can compile from yaourt, try to launch the command:
yaourt -S pocketsphinx

venamresm commented on 2014-05-20 03:41

I'm not able to build this pkg.
I'm getting the following error:
pocketsphinx.pyx:656:23: undeclared name not builtin: NGramModel

marcs commented on 2014-01-02 16:33

Sorry for the delay guys.
Now building from yaourt is fine.

sysfu commented on 2013-11-08 01:38

@ackalker Followed yer "rant" and was able to successfully build pocketsphinx. Thanks in turn for your perseverance.

There was a small typo in this line

cp -a <path/to>/sphinxbase/sphinxbase-0.8 <path/to>/pocketsphinx/src/

should be

cp -a <path/to>/sphinxbase/src/sphinxbase-0.8 <path/to>/pocketsphinx/src/

autoconf/automake pacman query results on my system:

$ pacman -Qo $(which autoconf)
/usr/bin/autoconf is owned by autoconf 2.69-1
$ pacman -Qo $(which automake)
/usr/bin/automake is owned by automake 1.14-1

ackalker commented on 2013-11-07 22:00

This may be helpful in trying to figure out why pocketsphinx.c is/isn't rebuilt:

On my system:

$ pacman -Qo $(which autoconf)
/usr/bin/autoconf is owned by autoconf 2.69-1
$ pacman -Qo $(which automake)
/usr/bin/automake is owned by automake 1.14-1

ackalker commented on 2013-11-07 21:47

Thanks for the perseverance.

From looking at the logs, it appears that in all of your attempts, cython is run with "-I/python" option, which makes no sense, and which may be the reason why it errors out.
This means that `configure` never got the correct directory for the sphinxbase Make variable right (but that's a problem of the upstream build system, anyway).

What puzzles me is why in your case, `make` tries to remake pocketsphinx.c, while in my case it doesn't (unless I manually force it to, and then it errors out in exactly the same way). Perhaps this has to do with different versions of autotools we use.

Anyway, this is the way (upstream intended) to force pocketsphinx to build with an included sphinxbase:

- In a directory, let's call it sphinxbase
- download sphinxbase PKGBUILD
- $ makepkg -i
- In another directory, let's call it pocketsphinx
- download pocketsphinx patched PKGBUILD
- $ makepkg -o
- $ cp -a <path/to>/sphinxbase/sphinxbase-0.8 <path/to>/pocketsphinx/src/
- $ ls src # should now output "pocketsphinx-0.8 pocketsphinx-0.8.tar.gz sphinxbase-0.8"
- *important*: Edit the PKGBUILD, remove the line "--with-sphinxbase=auto \"
- $ mv src/pocketsphinx-0.8/python/pocketsphinx.c src/pocketsphinx-0.8/python/pocketsphinx.c.bak # optional, to make sure it gets rebuilt
- $ makepkg -e

Sorry for the very long rant, but I hope this helps. Tested on my end, cython runs with no errors here.

sysfu commented on 2013-11-07 06:54

3rd attempt.

* created a new directory in ~/Downloads called "sphinx"
* downloaded PKGBUILD for sphinxbase into that dir
* ran makepkg and makepkg -i successfully
* cd into ~/Downloads/sphinx/src/sphinxbase-0.8
* rm -rf pkg src
* downloaded PKGBILD from http://pastie.org/private/vh8dwy6gsldmmwr3bfmrka into dir ~/Downloads/sphinx/src/sphinxbase-0.8
* run makepkg.
* build fails with these errors http://www.privatepaste.com/916c95c2cb

sysfu commented on 2013-11-07 05:53

OK, here's what I did.

* created a directory called sphinx
* downloaded PKGBUILD for sphinxbase into that dir
* ran makepkg and makepkg -i successfully
* rm -rf pkg src
* downloaded PKGBILD from http://pastie.org/private/vh8dwy6gsldmmwr3bfmrka into dir "sphinx"
* run makepkg.
* build fails with these errors http://www.privatepaste.com/7d018e6fba

sysfu commented on 2013-11-07 05:24

@ackalker: I'm using packer-color to install. After that failed, I downloaded just yer updated PKGBUILD file, moved it into its own dir, and then tried building using "makepkg" but that failed with all the cythen errors.

Regarding the sphinxbase dependency, I never got any errors about it trying to build pocketsphinx, and I imagine pocketsphinx would not build if it wasn't present.

$ pacman -Qs sphinxbase yields; local/sphinxbase 0.8-4

I'll try removing sphinxbase, re-installing that manually, then building pocketsphinx again.

marcs commented on 2013-11-06 11:36

Ok guys let me know if it works.

ackalker commented on 2013-11-06 08:19

Also, please `rm -rf pkg src` before you try running `makepkg` again :-) .

ackalker commented on 2013-11-06 08:17

Ahh I meant EXTRA_DIST in Makefile.am, not configure.in.

ackalker commented on 2013-11-06 08:12

@srf21c
This is a tricky one, (I bet you tried to run `make` from within the python directory :-) )
I'll try to explain:

The Makefile rule for building pocketsphinx.c is:

$(srcdir)/pocketsphinx.c: $(srcdir)/pocketsphinx.pyx $(srcdir)/pocketsphinx.pxd
cython -o $@ $< -I$(sphinxbase)/python

Now, from your log, it appears that the Make variable sphinxbase isn't set,
It only gets set if the configure script finds an unpacked and built (but not necessarily installed) sphinxbase source tree alongside pocketsphinx.

From the README:

"First, you *must* have SphinxBase, which you can download from
http://cmusphinx.sourceforge.net/. You should download and unpack it to
the same parent directory as PocketSphinx, so that the configure script
and project files can find it. On Windows, you will need to rename
'sphinxbase-X.Y' (where X.Y is the SphinxBase version number) to simply
'sphinxbase' for this to work."

This is why the files pocketsphinx.c, pocketsphinx.pyx, and pocketsphinx.pxd are specifically included in EXTRA_DIST in configure.in (and pocketsphinx.c is newer than both others), so make will normally decide not to rebuild pocketsphinx.c .

So, either unpack (and build!) sphinxbase alongside pocketsphinx, or simply use the provided pocketsphinx.c (but then again, it may have been generated by an older cython :-) ).

sysfu commented on 2013-11-06 03:53

@ackalker. I tried the fixed PKGBUILD you were kind of to link to but it's still failing to build on my system. Getting an a**whack of cython errors, log file here http://www.privatepaste.com/eea930330b

marcs commented on 2013-11-05 19:06

Thank you ackalker.

I've Updated the package to rel 2 with your suggestion.

ackalker commented on 2013-11-05 18:17

@srf21c
There is an easy fix for that (As mentioned on the forums and the 'net, CPPFLAGS is the culprit): in the build() function, under the "find -type f" lines, add the line:

sed -i '/cython/s/$(CPPFLAGS) //' python/Makefile.am

Link to fixed PKGBUILD: http://pastie.org/private/vh8dwy6gsldmmwr3bfmrka

sysfu commented on 2013-09-24 06:06

Build failing with this error:

make[1]: Entering directory `/home/user/Downloads/pocketsphinx/src/pocketsphinx-0.8/python'
cython -o pocketsphinx.c pocketsphinx.pyx -D_FORTIFY_SOURCE=2 -I/usr/include/python2.7 -I/usr/include/python2.7 -I/usr/include/sphinxbase -I/python
Unknown compiler flag: -D_FORTIFY_SOURCE=2
make[1]: *** [pocketsphinx.c] Error 1
make[1]: Leaving directory `/home/user/Downloads/pocketsphinx/src/pocketsphinx-0.8/python'
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build().
Aborting...

marcs commented on 2013-01-02 02:08

Updated to the .8 version and checked with namcap.
I've added the dependency to sphinxbase >= .8 too for consistency, if there's a missing dependence is normal 'cause sphinxbase is still at version .7

chemist69 commented on 2011-03-30 19:11

Hi, I get the following error during the build process:
[...]
cython -o pocketsphinx.c pocketsphinx.pyx -I/usr/include/python2.7 -I/usr/include/python2.7 -I/usr/include/sphinxbase -I/python

Error compiling Cython file:
------------------------------------------------------------
...

cdef set_iter(NGramIter self, ngram_iter_t *itor)

cdef class HuffCode:
cdef huff_code_t *hc
cdef file fh
^
------------------------------------------------------------

sphinxbase.pxd:148:9: 'file' is not a type identifier

make[1]: *** [pocketsphinx.c] Error 1
make[1]: Leaving directory `/home/apl/builds/pocketsphinx/src/pocketsphinx-0.6.1/python'
make: *** [all-recursive] Error 1

chemist69 commented on 2011-03-30 17:55

Hi, I get the following error during the build process:
[...]
cython -o pocketsphinx.c pocketsphinx.pyx -I/usr/include/python2.7 -I/usr/include/python2.7 -I/usr/include/sphinxbase -I/python

Error compiling Cython file:
------------------------------------------------------------
...

cdef set_iter(NGramIter self, ngram_iter_t *itor)

cdef class HuffCode:
cdef huff_code_t *hc
cdef file fh
^
------------------------------------------------------------

sphinxbase.pxd:148:9: 'file' is not a type identifier

make[1]: *** [pocketsphinx.c] Error 1
make[1]: Leaving directory `/home/apl/builds/pocketsphinx/src/pocketsphinx-0.6.1/python'
make: *** [all-recursive] Error 1

td123 commented on 2010-11-26 03:50

I'll update this as soon as sphinxbase is fixed.

gee commented on 2010-11-26 02:26

0.6.1 was released a couple days after last update here.

kalio commented on 2010-06-14 20:43

Thank you, it works now! :)

td123 commented on 2010-06-14 18:34

updated pocketsphinx to 0.6

@linkmaster03
The sphinxbase PKGBUILD is broken.
I fixed it and posted it to the comments section of sphinxbase.
You can wait for the maintainer to update it or make it yourself in the mean time.

kalio commented on 2010-06-14 01:11

I cannot get this package to build. When ./configure is run, it says that it cannot find SphinxBase (even though I have it installed), and it errors out.