diff --git a/recipes-extended/cmusphinx/cmusphinx.inc b/recipes-extended/cmusphinx/cmusphinx.inc new file mode 100644 index 0000000..0c46b66 --- /dev/null +++ b/recipes-extended/cmusphinx/cmusphinx.inc @@ -0,0 +1,9 @@ +SRC_URI = "http://sourceforge.net/projects/cmusphinx/files/${PN}/${PV}/${P}.tar.gz;downloadfilename=${P}.tar.gz" + +inherit autotools pythonnative python-dir + +# required for python binding +export HOST_SYS +export BUILD_SYS +export STAGING_LIBDIR +export STAGING_INCDIR diff --git a/recipes-extended/cmusphinx/pocketsphinx_0.8.bb b/recipes-extended/cmusphinx/pocketsphinx_0.8.bb new file mode 100644 index 0000000..ced1a1a --- /dev/null +++ b/recipes-extended/cmusphinx/pocketsphinx_0.8.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "This is PocketSphinx, one of Carnegie Mellon University's open source \ +large vocabulary, speaker-independent continuous speech recognition engine." +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=6601be289d6bcad899b6e71623ce2862" + +DEPENDS = "sphinxbase gst-plugins-good" + +SRC_URI[md5sum] = "9f6fb6277d57fb33d2c49d4184587d26" +SRC_URI[sha256sum] = "874c4c083d91c8ff26a2aec250b689e537912ff728923c141c4dac48662cce7a" + +require cmusphinx.inc + +do_configure_prepend () { + #force build of gstreamer plugin + sed -i 's:AM_CONDITIONAL(BUILD_GST, test x$cross_compiling != xyes && test "x$HAVE_GST" = "xyes"):AM_CONDITIONAL(BUILD_GST, test "x$HAVE_GST" = "xyes"):g' ${S}/configure.in +} + +do_install_append () { + #remove egg-info + rm -rf ${D}/${PYTHON_SITEPACKAGES_DIR}/*.egg-info +} + +FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/pocketsphinx.so" +FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/*" + +PACKAGES += "gstreamer0.10-${PN} gstreamer0.10-${PN}-dbg gstreamer0.10-${PN}-staticdev" +FILES_gstreamer0.10-${PN} += "${libdir}/gstreamer-0.10/libgstpocketsphinx.so" +FILES_gstreamer0.10-${PN}-staticdev += "${libdir}/gstreamer-0.10/libgstpocketsphinx.a \ + ${libdir}/gstreamer-0.10/libgstpocketsphinx.la" +FILES_gstreamer0.10-${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" diff --git a/recipes-extended/cmusphinx/sphinxbase/0001-TESTS-srcdir-remove.patch b/recipes-extended/cmusphinx/sphinxbase/0001-TESTS-srcdir-remove.patch new file mode 100644 index 0000000..3df5736 --- /dev/null +++ b/recipes-extended/cmusphinx/sphinxbase/0001-TESTS-srcdir-remove.patch @@ -0,0 +1,16 @@ +diff --git a/test/regression/Makefile.am b/test/regression/Makefile.am +index d13d2a7..3bdb18a 100644 +--- a/test/regression/Makefile.am ++++ b/test/regression/Makefile.am +@@ -33,9 +33,9 @@ CLEANFILES = test*.err test*.out \ + + # Disable sphinx_fe tests for now if fixed-point due to imprecision + if FIXED_POINT +-TESTS = $(srcdir)/test-cepview.sh $(srcdir)/test-sphinx_pitch.sh ++TESTS = test-cepview.sh test-sphinx_pitch.sh + else +-TESTS = $(srcdir)/test-*.sh ++TESTS = test-*.sh + endif + + EXTRA_DIST += $(TESTS) diff --git a/recipes-extended/cmusphinx/sphinxbase_0.8.bb b/recipes-extended/cmusphinx/sphinxbase_0.8.bb new file mode 100644 index 0000000..63becb0 --- /dev/null +++ b/recipes-extended/cmusphinx/sphinxbase_0.8.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "This package contains the basic libraries shared by the CMU Sphinx \ +trainer and all the Sphinx decoders (Sphinx-II, Sphinx-III, and \ +PocketSphinx), as well as some common utilities for manipulating \ +acoustic feature and audio files." +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=c550e8ca1106e5eeaf4e2b4cbf960fcf" + +SRC_URI[md5sum] = "7335d233f7ad4ecc4b508aec7b5dc101" +SRC_URI[sha256sum] = "55708944872bab1015b8ae07b379bf463764f469163a8fd114cbb16c5e486ca8" + +require cmusphinx.inc + +SRC_URI += "file://0001-TESTS-srcdir-remove.patch" + +do_install_append () { + #remove egg-info + rm -rf ${D}/${PYTHON_SITEPACKAGES_DIR}/*.egg-info +} + +FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/sphinxbase.so" +FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/*" diff --git a/recipes-ros/ros-pocketsphinx/ros-pocketsphinx_0.3.0.bb b/recipes-ros/ros-pocketsphinx/ros-pocketsphinx_0.3.0.bb new file mode 100644 index 0000000..102f081 --- /dev/null +++ b/recipes-ros/ros-pocketsphinx/ros-pocketsphinx_0.3.0.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "This package is a simple wrapper around the pocketsphinx speech recognizer, \ +using gstreamer and a Python-based interface." +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=10;endline=10;md5=d566ef916e9dedc494f5f793a6690ba5" + +SRC_URI = "https://github.com/mikeferguson/pocketsphinx/archive/${PV}.tar.gz;downloadfilename=${PN}.tar.gz" +SRC_URI[md5sum] = "814912c0fa4e28dee0e7abc2576f1ad2" +SRC_URI[sha256sum] = "79aed79079d1ca4ac470ea55a82c1de13473df29187b7e8ecec86969c253284a" + +S = "${WORKDIR}/pocketsphinx-${PV}" + +inherit catkin + +do_configure_prepend () { + #rename pocketsphinx to ros_pocketsphinx, to avoid collision with original pocketsphinx + sed -i 's:project(pocketsphinx):project(${ROS_SPN}):g' ${S}/CMakeLists.txt + sed -i 's:pocketsphinx:${ROS_SPN}:g' ${S}/package.xml + sed -i "s:load_manifest('pocketsphinx'):load_manifest('${ROS_SPN}'):g" ${S}/nodes/*py + sed -i 's:pkg="pocketsphinx:pkg="${ROS_SPN}:g' ${S}/demo/*launch + sed -i 's:find pocketsphinx:find ${ROS_SPN}:g' ${S}/demo/*launch +} + +RDEPENDS_${PN} = "std-srvs rospy gstreamer0.10-pocketsphinx" + +#provides gconfaudiosrc, used to find name of microphone +RRECOMMENDS_${PN} += "gst-plugins-good-gconfelements" + +ROS_SPN = "ros_pocketsphinx"