diff options
-rw-r--r-- | src/3rdparty/compiling_pocketsphinx.txt | 16 | ||||
-rwxr-xr-x | src/plugins/asr/asr.pro | 4 | ||||
-rwxr-xr-x | src/plugins/asr/pocketsphinx/pocketsphinx.pro | 12 |
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 |