summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTuomas Tuononen <tuomas.tuononen@code-q.fi>2015-09-04 15:37:15 +0300
committerTuomas Tuononen <tuomas.tuononen@code-q.fi>2015-10-14 08:11:13 +0000
commitbbf4c960e0a04e6d86826e86802ac100cb4291a0 (patch)
tree5dfa5528b25c14e243ab1607990b939788a5b2e5
parentcbc60277e57ed07fa58872bb7d9221da2b677e8a (diff)
PocketSphinx: Use static libraries
- PocketSphinx needs to be compiled in src/3rdparty directory Change-Id: If4e50002eabe10cc6c456a6a3189656caa394937 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
-rw-r--r--src/3rdparty/compiling_pocketsphinx.txt16
-rwxr-xr-xsrc/plugins/asr/asr.pro4
-rwxr-xr-xsrc/plugins/asr/pocketsphinx/pocketsphinx.pro12
3 files changed, 29 insertions, 3 deletions
diff --git a/src/3rdparty/compiling_pocketsphinx.txt b/src/3rdparty/compiling_pocketsphinx.txt
new file mode 100644
index 0000000..e514b78
--- /dev/null
+++ b/src/3rdparty/compiling_pocketsphinx.txt
@@ -0,0 +1,16 @@
+## Run the following commands in this directory to set up the
+## required libraries for PocketSphinx speech recognition plug-in.
+## The "git checkout" commands are only to ensure a compatible
+## version and should be removed if the latest versions are needed.
+
+git clone https://github.com/cmusphinx/pocketsphinx.git
+git clone https://github.com/cmusphinx/sphinxbase.git
+cd sphinxbase
+git checkout c623063421a2f1a3
+./autogen.sh
+make CFLAGS="-O2 -fPIC"
+cd ../pocketsphinx
+git checkout 0c8104d4242e1bf0
+./autogen.sh
+make CFLAGS="-O2 -fPIC"
+
diff --git a/src/plugins/asr/asr.pro b/src/plugins/asr/asr.pro
index f636fbc..7de9394 100755
--- a/src/plugins/asr/asr.pro
+++ b/src/plugins/asr/asr.pro
@@ -1,5 +1,7 @@
TEMPLATE = subdirs
-packagesExist(pocketsphinx) {
+exists( ../../3rdparty/pocketsphinx/src/libpocketsphinx/.libs ): exists ( ../../3rdparty/sphinxbase/src/libsphinxbase/.libs ) {
SUBDIRS += pocketsphinx
+} else {
+ message( "PocketSphinx and/or SphinxBase not built, skipping PocketSphinx plug-in compilation" )
}
diff --git a/src/plugins/asr/pocketsphinx/pocketsphinx.pro b/src/plugins/asr/pocketsphinx/pocketsphinx.pro
index 001abb1..332ecf9 100755
--- a/src/plugins/asr/pocketsphinx/pocketsphinx.pro
+++ b/src/plugins/asr/pocketsphinx/pocketsphinx.pro
@@ -18,5 +18,13 @@ SOURCES += \
OTHER_FILES += \
pocketsphinx_plugin.json
-CONFIG += link_pkgconfig
-PKGCONFIG += pocketsphinx
+LIBS += $$PWD/../../../3rdparty/pocketsphinx/src/libpocketsphinx/.libs/libpocketsphinx.a
+LIBS += $$PWD/../../../3rdparty/sphinxbase/src/libsphinxbase/.libs/libsphinxbase.a
+
+INCLUDEPATH += $$PWD/../../../3rdparty/pocketsphinx/include
+INCLUDEPATH += $$PWD/../../../3rdparty/sphinxbase/include
+DEPENDPATH += $$PWD/../../../3rdparty/pocketsphinx/include
+DEPENDPATH += $$PWD/../../../3rdparty/sphinxbase/include
+
+PRE_TARGETDEPS += $$PWD/../../../3rdparty/pocketsphinx/src/libpocketsphinx/.libs/libpocketsphinx.a
+PRE_TARGETDEPS += $$PWD/../../../3rdparty/sphinxbase/src/libsphinxbase/.libs/libsphinxbase.a