Package Details: pocketsphinx 5prealpha-13

Git Clone URL: https://aur.archlinux.org/pocketsphinx.git (read-only, click to copy)
Package Base: pocketsphinx
Description: Lightweight speech recognition engine
Upstream URL: http://cmusphinx.sourceforge.net
Keywords: mobile recognition speech
Licenses: BSD
Submitter: None
Maintainer: Martchus
Last Packager: Martchus
Votes: 75
Popularity: 0.69
First Submitted: 2008-08-08 21:47 (UTC)
Last Updated: 2021-12-13 17:49 (UTC)

Pinned Comments

Martchus commented on 2020-01-19 12:15 (UTC)

All my packages are managed at GitHub where you can also contribute directly: https://github.com/Martchus/PKGBUILDs
There also exist a binary repository: https://wiki.archlinux.org/index.php/Unofficial_user_repositories#ownstuff

Latest Comments

Martchus commented on 2021-12-13 17:52 (UTC)

I've pushed the version which is fixed for Python 3.10 now that it is in the normal official repos.

@adsun I'm aware of the problem, see my previous comment. I also saw the patch but simply use PYTHONWARNINGS=ignore for now.

adsun commented on 2021-12-13 15:15 (UTC)

The build fails with the recently released python version 3.10, due to the ax_python_devel.m4 not being refactored for the new version. A recently pushed .m4 file can be found here that fixes the issue:

https://github.com/cmusphinx/sphinxbase/blob/e0221880ccdd79ed9bf42937a56a4c319b013576/m4/ax_python_devel.m4

Martchus commented on 2021-12-03 18:55 (UTC)

See https://aur.archlinux.org/packages/sphinxbase/#comment-838981 regarding the Python 3.10 rebuild.

Martchus commented on 2020-09-21 14:52 (UTC)

@tbjta Your build error is produced by the sphinxbase package. So please look at the comment section of that package - there are already relevant comments.

Martchus commented on 2020-09-21 14:50 (UTC)

@idlusen pkgconf is in the group base-devel and must therefore not be added to makedepends (https://wiki.archlinux.org/index.php/PKGBUILD#makedepends).

idlusen commented on 2020-09-21 12:35 (UTC)

I had to install pkgconf in order to have it built, maybe add that to makedepends.

tbjta commented on 2020-02-01 09:52 (UTC) (edited on 2020-02-01 10:06 (UTC) by tbjta)

File "./doxy2swig.py", line 302, in do_memberdef

arg_type = n.getElementsByTagName('type')[0]

IndexError: list index out of range

make[1]: *** [Makefile:602: pydoc.i] Error 1

make[1]: Leaving directory '/home/tbjta/.cache/yay/sphinxbase/src/sphinxbase-5prealpha-py2/doc'

make: *** [Makefile:478: all-recursive] Error 1

==> ERROR: A failure occurred in build().

Aborting...

Error making: sphinxbase

Martchus commented on 2020-01-19 12:15 (UTC)

All my packages are managed at GitHub where you can also contribute directly: https://github.com/Martchus/PKGBUILDs
There also exist a binary repository: https://wiki.archlinux.org/index.php/Unofficial_user_repositories#ownstuff

Martchus commented on 2019-10-14 11:08 (UTC)

@user202729 autoconf and automake belong to the group base-devel. Packages in that group should not be explicitly mentioned. If you setup your build environment like described in the official wiki you should not run into problems.

xantares commented on 2018-08-30 11:47 (UTC)

please fix the python package wrt the 3.7 update!

petronny commented on 2018-08-14 04:19 (UTC)

Please fix it for python 3.7

xantares commented on 2018-08-07 21:05 (UTC)

I doubt the libtool commands are even useful

Martchus commented on 2018-08-07 13:22 (UTC)

@nipsky It is because the Python version is hardcoded into the PKGBUILD and Arch Linux recently updated to Python 3.7.

I think the Python version shouldn't be hardcoded. Better use something like pacman -Q python | sed 's/.* \(.*\)\..*-.*./\1/g'. Same for Python 2. Of course the package must still be rebuilt when updating Python.

nipsky commented on 2018-08-07 09:22 (UTC)

Hi, compiling the sources works fine, but I’m stuck with an error in the packaging stage:

libtool: error: invalid argument '/tmp/yaourt-tmp-andre/aur-pocketsphinx/pkg/pocketsphinx/usr/lib/python3.6/site-packages/pocketsphinx'

xantares commented on 2018-05-17 11:31 (UTC)

hi, this fix is needed for python3: https://github.com/cmusphinx/pocketsphinx/pull/127

abouvier commented on 2017-02-23 05:42 (UTC)

I use pacaur, but why do you think it's bad to have one directory for all AUR sources?

marcs commented on 2017-02-22 22:34 (UTC)

"SRCDEST variable could be the same directory for all packages", I didn't know that and is not my case but I strongly advise against it. Which aur manager are you using anyway ? You got my curious. Fixed now.

abouvier commented on 2017-02-22 18:36 (UTC)

@marcs The wiki doesn't agree with you :p "File names of downloaded sources should be globally unique, because the SRCDEST variable could be the same directory for all packages." => https://wiki.archlinux.org/index.php/PKGBUILD#Sources Even without an AUR helper, all the sources can be in one directory.

marcs commented on 2017-02-22 16:54 (UTC)

@doskoi sphinxbase and pocketsphinx install their LICENSE files in two different paths so no, there's no overwrite. If something goes wrong is a problem of the aur helper sw you are using.

abouvier commented on 2017-02-04 06:26 (UTC)

Yes sorry, in fact both pocketsphinx and sphinxbase downloads a LICENSE file, so the second overwrites the first when installed in batch with an AUR helper. Maybe the PKGBUILD could assign them a more unique name?

marcs commented on 2017-02-01 10:22 (UTC)

License checksum verified, it is fine, maybe a problem with your download. I expect to update the checksum when the copyright year will be updated to 2017.

abouvier commented on 2017-01-30 20:56 (UTC)

The checksum of the LICENSE file is wrong.

petronny commented on 2017-01-24 05:35 (UTC)

Hi, gstreamer0.10-base has disappeared from [community]... The package can be compiled without it, but I'm not sure if it is fully functional. Anyway, please fix it. Thank you.

petronny commented on 2017-01-23 08:49 (UTC)

Please change 'python3.5' to 'python3.6' in the last line. Thank you

marcs commented on 2016-08-24 08:21 (UTC)

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 (UTC)

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 (UTC)

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 (UTC) (edited on 2016-06-01 10:16 (UTC) by marcs)

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 (UTC)

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 (UTC)

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

b3arar commented on 2016-02-07 07:31 (UTC)

#先清除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 (UTC)

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 (UTC)

md5 sum updated

underdoeg commented on 2016-02-01 09:56 (UTC)

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

marcs commented on 2015-12-03 15:27 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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

marcs commented on 2015-11-02 21:27 (UTC)

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

surfhai commented on 2015-11-02 21:15 (UTC)

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

surfhai commented on 2015-11-02 19:26 (UTC)

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 (UTC)

The newest release is 5prealpha, not 0.8

marcs commented on 2015-05-30 10:11 (UTC)

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 (UTC)

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 (UTC)

does NOT build with yaourt for me. :(

m01 commented on 2014-07-14 22:32 (UTC)

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 (UTC)

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

venamresm commented on 2014-05-20 03:41 (UTC)

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 (UTC)

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

sysfu commented on 2013-11-08 01:38 (UTC)

@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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

@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 (UTC)

Ok guys let me know if it works.

ackalker commented on 2013-11-06 08:19 (UTC)

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

ackalker commented on 2013-11-06 08:17 (UTC)

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

ackalker commented on 2013-11-06 08:12 (UTC)

@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 (UTC)

@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 (UTC)

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

ackalker commented on 2013-11-05 18:17 (UTC)

@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 (UTC)

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 (UTC)

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 17:55 (UTC)

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 (UTC)

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

gee commented on 2010-11-26 02:26 (UTC)

0.6.1 was released a couple days after last update here.

kalio commented on 2010-06-14 20:43 (UTC)

Thank you, it works now! :)

td123 commented on 2010-06-14 18:34 (UTC)

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 (UTC)

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.