I'm trying to build the pocketsphinx aar file.
I read the instruction in https://github.com/cmusphinx/pocketsphinx-android and https://cmusphinx.github.io/wiki/tutorialandroid/.
I created a new project under Android Studio.
Then I cloned the pocketsphinx, sphinxbase and pocketsphinx-android folders into the new Project folder.
Swig is installed.
Now, there's no change in my project under Android Studio but nevertheless I used "gradlew" to build the project.
I got "BUILD SUCCESSFUL" affirmation but that's it.
There is no "output" folder in the "projectname"\app\build folder, only a "outputs" folder which has a logs folder.
Any suggestion what I'm doing wrong would be nice.
Last edit: Fabian Krippner 2018-11-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hm what exactly do you mean by that, use the pocket-sphinx-android-demo as base or clone which exactly?
Also, is it enough for the 3 other cloned repositories to be just physically in the project folder or are there other adjustments needed?
Ah and thanks for the fast reply, didn't expect that!
Last edit: Fabian Krippner 2018-11-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well Nickolay V.Shmyrev, I don't know what else to do.
Papa Google didn't give me any idea yet how to change the Cmake file or other in order to solve the issue.
So I'd be very thankful if you had some more input.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So I tried several things but I guess it comes down to, cloning pocketsphinx-android and opening this project in Android Studio while having pocketsphinx & sphinxbase in the same folder?
Anyway, when I tried this I got a Cmake error:
"CMake Error: CMake can not determine linker language for target: pocketsphinx_jni"
Now I'm wondering if I need to tackle error by error, installing/changing settings as needed or if there are some central settings or downloads missing?
Here is the full log output:
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\Projekte\pocketsphinx-android -BE:\Fabian\Projekte\pocketsphinx-android.externalNativeBuild\cmake\release\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\Projekte\pocketsphinx-android\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
I ran
gradlew clean && gradlew -i build >& build.log
in the Android Studio terminal.
I'll post the build.log and the terminal output below
Here is the build.log:
Initialized native services in: C:\Users\user.gradle\native
Found daemon DaemonInfo{pid=31068, address=[849f5363-d315-44bc-9048-d2de9f63aa19 port:3072, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1532078910379, context=DefaultDaemonContext[uid=1ed000ff-4c94-483a-8873-7881673e7d99,javaHome=C:\Program Files\Java\jre1.8.0_92,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31068,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_181,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31360,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=1ed000ff-4c94-483a-8873-7881673e7d99,javaHome=C:\Program Files\Java\jre1.8.0_92,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31068,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
Found daemon DaemonInfo{pid=20832, address=[8f3576e0-9dd4-4059-8ee0-af4d512bcf14 port:4687, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1542385166934, context=DefaultDaemonContext[uid=a312aa27-d9fc-4d2f-8e94-3a81fb94dc1d,javaHome=E:\Fabian\AndroidStudio\jre,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=20832,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_181,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31360,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=a312aa27-d9fc-4d2f-8e94-3a81fb94dc1d,javaHome=E:\Fabian\AndroidStudio\jre,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=20832,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 22072). The daemon log file: C:\Users\user.gradle\daemon\4.1\daemon-22072.out.log
Starting 7th build in daemon [uptime: 55 mins 41.875 secs, performance: 99%, no major garbage collections]
Using 4 worker leases.
Creating new cache for fileHashes, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@48eee248
Creating new cache for plugin-use-metadata, path C:\Users\user.gradle\caches\4.1\plugin-resolution\plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@697ca689
Creating new cache for client-status, path C:\Users\user.gradle\caches\4.1\plugin-resolution\client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@697ca689
Starting Build
Settings evaluated using settings file 'E:\master\settings.gradle'.
Projects loaded. Root project using build file 'E:\Fabian\Projekte\pocketsphinx-android\build.gradle'.
Included projects: [root project 'pocketsphinx-android']
Evaluating root project 'pocketsphinx-android' using build file 'E:\Fabian\Projekte\pocketsphinx-android\build.gradle'.
Creating new cache for metadata-1.1/results, path C:\Users\user.gradle\caches\transforms-1\metadata-1.1\results.bin, access org.gradle.cache.internal.DefaultCacheAccess@4c079f3
Creating new cache for metadata-2.23/module-metadata, path C:\Users\user.gradle\caches\modules-2\metadata-2.23\module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@72d0ee3d
Creating new cache for metadata-2.23/artifact-at-repository, path C:\Users\user.gradle\caches\modules-2\metadata-2.23\artifact-at-repository.bin, access org.gradle.cache.internal.DefaultCacheAccess@72d0ee3d
Creating configuration compile
Creating configuration publish
Creating configuration provided
Creating configuration wearApp
Creating configuration annotationProcessor
Creating configuration jackPlugin
Creating configuration androidTestCompile
Creating configuration androidTestPublish
Creating configuration androidTestProvided
Creating configuration androidTestWearApp
Creating configuration androidTestAnnotationProcessor
Creating configuration androidTestJackPlugin
Creating configuration testCompile
Creating configuration testPublish
Creating configuration testProvided
Creating configuration testWearApp
Creating configuration testAnnotationProcessor
Creating configuration testJackPlugin
Creating configuration debugCompile
Creating configuration debugPublish
Creating configuration debugProvided
Creating configuration debugWearApp
Creating configuration debugAnnotationProcessor
Creating configuration debugJackPlugin
Creating configuration testDebugCompile
Creating configuration testDebugPublish
Creating configuration testDebugProvided
Creating configuration testDebugWearApp
Creating configuration testDebugAnnotationProcessor
Creating configuration testDebugJackPlugin
Creating configuration releaseCompile
Creating configuration releasePublish
Creating configuration releaseProvided
Creating configuration releaseWearApp
Creating configuration releaseAnnotationProcessor
Creating configuration releaseJackPlugin
Creating configuration testReleaseCompile
Creating configuration testReleasePublish
Creating configuration testReleaseProvided
Creating configuration testReleaseWearApp
Creating configuration testReleaseAnnotationProcessor
Creating configuration testReleaseJackPlugin
Parsing the SDK, no caching allowed
SDK initialized in 42 ms
Incremental Java compilation disabled in variant debug as you are using 2 source folders : E:\Fabian\Projekte\pocketsphinx-android\src\main\java,E:\Fabian\Projekte\pocketsphinx-android\build\generated-src
Not using incremental javac compilation for : debug.
Not using incremental javac compilation for : debugUnitTest.
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
Incremental Java compilation disabled in variant release as you are using 2 source folders : E:\Fabian\Projekte\pocketsphinx-android\src\main\java,E:\Fabian\Projekte\pocketsphinx-android\build\generated-src
Not using incremental javac compilation for : release.
Not using incremental javac compilation for : releaseUnitTest.
Not using incremental javac compilation for : debugAndroidTest.
All projects evaluated.
Selected primary task 'build' from project :
Creating new cache for annotation-processors, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\fileContent\annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@1279a851
Tasks to be executed: [task ':mkdir', task ':swigPs', task ':swigSb', task ':preBuild', task ':preDebugBuild', task ':checkDebugManifest', task ':prepareDebugDependencies', task ':compileDebugAidl', task ':compileLint', task ':copyDebugLint', task ':mergeDebugShaders', task ':compileDebugShaders', task ':generateDebugAssets', task ':mergeDebugAssets', task ':mergeDebugProguardFiles', task ':packageDebugRenderscript', task ':compileDebugRenderscript', task ':generateDebugResValues', task ':generateDebugResources', task ':packageDebugResources', task ':processDebugManifest', task ':generateDebugBuildConfig', task ':processDebugResources', task ':generateDebugSources', task ':incrementalDebugJavaCompilationSafeguard', task ':javaPreCompileDebug', task ':compileDebugJavaWithJavac', task ':processDebugJavaRes', task ':transformResourcesWithMergeJavaResForDebug', task ':transformClassesAndResourcesWithSyncLibJarsForDebug', task ':generateJsonModelDebug', task ':externalNativeBuildDebug', task ':mergeDebugJniLibFolders', task ':transformNativeLibsWithMergeJniLibsForDebug', task ':transformNativeLibsWithStripDebugSymbolForDebug', task ':transformNativeLibsWithSyncJniLibsForDebug', task ':bundleDebug', task ':compileDebugSources', task ':assembleDebug', task ':preReleaseBuild', task ':checkReleaseManifest', task ':prepareReleaseDependencies', task ':compileReleaseAidl', task ':copyReleaseLint', task ':mergeReleaseShaders', task ':compileReleaseShaders', task ':generateReleaseAssets', task ':mergeReleaseAssets', task ':mergeReleaseProguardFiles', task ':packageReleaseRenderscript', task ':compileReleaseRenderscript', task ':generateReleaseResValues', task ':generateReleaseResources', task ':packageReleaseResources', task ':processReleaseManifest', task ':generateReleaseBuildConfig', task ':processReleaseResources', task ':generateReleaseSources', task ':incrementalReleaseJavaCompilationSafeguard', task ':javaPreCompileRelease', task ':compileReleaseJavaWithJavac', task ':processReleaseJavaRes', task ':transformResourcesWithMergeJavaResForRelease', task ':transformClassesAndResourcesWithSyncLibJarsForRelease', task ':generateJsonModelRelease', task ':externalNativeBuildRelease', task ':mergeReleaseJniLibFolders', task ':transformNativeLibsWithMergeJniLibsForRelease', task ':transformNativeLibsWithStripDebugSymbolForRelease', task ':transformNativeLibsWithSyncJniLibsForRelease', task ':bundleRelease', task ':compileReleaseSources', task ':assembleRelease', task ':assemble', task ':lint', task ':incrementalDebugUnitTestJavaCompilationSafeguard', task ':javaPreCompileDebugUnitTest', task ':preDebugUnitTestBuild', task ':prepareDebugUnitTestDependencies', task ':compileDebugUnitTestJavaWithJavac', task ':processDebugUnitTestJavaRes', task ':compileDebugUnitTestSources', task ':mockableAndroidJar', task ':assembleDebugUnitTest', task ':testDebugUnitTest', task ':incrementalReleaseUnitTestJavaCompilationSafeguard', task ':javaPreCompileReleaseUnitTest', task ':preReleaseUnitTestBuild', task ':prepareReleaseUnitTestDependencies', task ':compileReleaseUnitTestJavaWithJavac', task ':processReleaseUnitTestJavaRes', task ':compileReleaseUnitTestSources', task ':assembleReleaseUnitTest', task ':testReleaseUnitTest', task ':test', task ':check', task ':build']
Creating new cache for resourceHashesCache, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\fileHashes\resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@48eee248
Creating new cache for fileSnapshots, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\taskHistory\fileSnapshots.bin, access org.gradle.cache.internal.DefaultCacheAccess@23c6438c
Creating new cache for taskHistory, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\taskHistory\taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@23c6438c
:mkdir (Thread[Task worker for ':',5,main]) started.
:mkdir
Putting task artifact state for task ':mkdir' into context took 0.0 secs.
Executing task ':mkdir' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:mkdir (Thread[Task worker for ':',5,main]) completed. Took 0.001 secs.
:swigPs (Thread[Task worker for ':' Thread 3,5,main]) started.
:swigPs
Putting task artifact state for task ':swigPs' into context took 0.0 secs.
Executing task ':swigPs' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Starting process 'command 'swig''. Working directory: E:\Fabian\Projekte\pocketsphinx-android Command: swig -Inull/swig -Inull/include -Inull/swig -java -package edu.cmu.pocketsphinx -outdir build/generated-src/java -o build/generated-src/cpp/pocketsphinx_wrap.c null/swig/pocketsphinx.i
Successfully started process 'command 'swig''
:swigPs FAILED
:swigPs (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.122 secs.
2 actionable tasks: 2 executed
Here is the terminal output:
E:\Fabian\Projekte\pocketsphinx-android>gradlew clean && gradlew -i build > build.log
Configure project :
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
Task :externalNativeBuildCleanDebug
Clean pocketsphinx_jni armeabi-v7a
ninja: error: loading 'build.ninja': The system cannot find the file specified.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':externalNativeBuildCleanDebug'.
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {--build E:\Fabian\Projekte\pocketsphinx-android.externalNativeBuild\cmake\debug\armeabi-v7a --target clean}
ninja: error: loading 'build.ninja': The system cannot find the file specified.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
:P ;)
Yeah, after finding this tutorial: http://swathiep.blogspot.com/2011/02/offline-speech-recognition-with.html
I figured there's more to the whole package shebang than just cloning.
I'll try to use Cygwin first, even though missing macro here, error there, and then I'll check out the gravy inside of the gradle/cmake files if that doesn't lead me to nirvana.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Uh so step 3:
cd <sphinxbase path="" pocketsphinx="" or="">
./configure
make
make install
won't do me any good? hmmm, well I guess I'll have to read up on how cmake works exactly gradle etc.</sphinxbase>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I created the environment variables for sphinxbase_home, ah no wait I mean sPInxbase_home, and pocketsphinx_home, then I adjusted the paths' slashes to get rid of the "invalid character \F" but I still get errors, any ideas ?
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\github\pocketsphinx-android -BE:\Fabian\github\pocketsphinx-android.externalNativeBuild\cmake\debug\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\github\pocketsphinx-android\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Configuring done
CMake Error at CMakeLists.txt:106 (add_library):
build/generated-src/cpp/pocketsphinx_wrap.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
-- Generating done
-- Build files have been written to: E:/Fabian/github/pocketsphinx-android/.externalNativeBuild/cmake/debug/armeabi-v7a
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\github\pocketsphinx-android -BE:\Fabian\github\pocketsphinx-android.externalNativeBuild\cmake\release\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\github\pocketsphinx-android\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Configuring done
CMake Error at CMakeLists.txt:106 (add_library):
build/generated-src/cpp/pocketsphinx_wrap.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
-- Generating done
-- Build files have been written to: E:/Fabian/github/pocketsphinx-android/.externalNativeBuild/cmake/release/armeabi-v7a
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd use Linux in a heartbeat if the computer I'm using wasn't a friends, so I can't just willy-nilly repartition it.
So far I don't see why the errors persist, it shouldn't have to do with the paths now I think?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Update:
I tried the whole shebam under ubuntu linux at a friend's computer, exactly the same errors.
We even tried hardcoding the paths to sphinxbase/pocketsphinx in gradle/cmake instead of using system vars, no chance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I upgraded build gradle from
'com.android.tools.build:gradle:2.3.1 'to
'com.android.tools.build:gradle:3.2.1'
and
SDK Build Tools Version from 25.0.3 to 28.0.3
But the problem persists, now only with an additional warning due to ignoring the specified version of 25.0.3
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really dont understand why we have to go this far? I mean can we just download and run the demo or replace the dict and model with ours and run it may be ? can anyone explain why the above processes are necessary?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Nickolay
I was trying to develop mobile application using pocketsphinx for Amharic
language. and i already read the tutorial and it requires some resources.
unfortunately for the time being eventheir are many speaker of the language
their seems no acoustic model and for that i want to develop very simple
command and control application. The problem is for the resource the only
speaker around is me as am studing aboard so what i really want to know is
if i can record hrs of data by my own does it work or what seems to be an
option to use pocketsphinx for this language.
Last edit: Nickolay V. Shmyrev 2019-02-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there
I'm trying to build the pocketsphinx aar file.
I read the instruction in https://github.com/cmusphinx/pocketsphinx-android and https://cmusphinx.github.io/wiki/tutorialandroid/.
I created a new project under Android Studio.
Then I cloned the pocketsphinx, sphinxbase and pocketsphinx-android folders into the new Project folder.
Swig is installed.
Now, there's no change in my project under Android Studio but nevertheless I used "gradlew" to build the project.
I got "BUILD SUCCESSFUL" affirmation but that's it.
There is no "output" folder in the "projectname"\app\build folder, only a "outputs" folder which has a logs folder.
Any suggestion what I'm doing wrong would be nice.
Last edit: Fabian Krippner 2018-11-15
This step is wrong, you should not create the project, just clone existing one.
Hm what exactly do you mean by that, use the pocket-sphinx-android-demo as base or clone which exactly?
Also, is it enough for the 3 other cloned repositories to be just physically in the project folder or are there other adjustments needed?
Ah and thanks for the fast reply, didn't expect that!
Last edit: Fabian Krippner 2018-11-15
Well Nickolay V.Shmyrev, I don't know what else to do.
Papa Google didn't give me any idea yet how to change the Cmake file or other in order to solve the issue.
So I'd be very thankful if you had some more input.
Ah and I don't know if you got any notice for my prior posts but I searched and pasted some of my logs in here.
Hi again!
So I tried several things but I guess it comes down to, cloning pocketsphinx-android and opening this project in Android Studio while having pocketsphinx & sphinxbase in the same folder?
Anyway, when I tried this I got a Cmake error:
"CMake Error: CMake can not determine linker language for target: pocketsphinx_jni"
Now I'm wondering if I need to tackle error by error, installing/changing settings as needed or if there are some central settings or downloads missing?
Here is the full log output:
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\Projekte\pocketsphinx-android -BE:\Fabian\Projekte\pocketsphinx-android.externalNativeBuild\cmake\release\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\Projekte\pocketsphinx-android\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Configuring done
CMake Error at CMakeLists.txt:106 (add_library):
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
-- Generating done
-- Build files have been written to: E:/Fabian/Projekte/pocketsphinx-android/.externalNativeBuild/cmake/release/armeabi-v7a
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\Projekte\pocketsphinx-android -BE:\Fabian\Projekte\pocketsphinx-android.externalNativeBuild\cmake\debug\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\Projekte\pocketsphinx-android\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Configuring done
CMake Error at CMakeLists.txt:106 (add_library):
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
-- Generating done
-- Build files have been written to: E:/Fabian/Projekte/pocketsphinx-android/.externalNativeBuild/cmake/debug/armeabi-v7a
I ran
gradlew clean && gradlew -i build >& build.log
in the Android Studio terminal.
I'll post the build.log and the terminal output below
Here is the build.log:
Initialized native services in: C:\Users\user.gradle\native
Found daemon DaemonInfo{pid=31068, address=[849f5363-d315-44bc-9048-d2de9f63aa19 port:3072, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1532078910379, context=DefaultDaemonContext[uid=1ed000ff-4c94-483a-8873-7881673e7d99,javaHome=C:\Program Files\Java\jre1.8.0_92,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31068,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_181,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31360,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=1ed000ff-4c94-483a-8873-7881673e7d99,javaHome=C:\Program Files\Java\jre1.8.0_92,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31068,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
Found daemon DaemonInfo{pid=20832, address=[8f3576e0-9dd4-4059-8ee0-af4d512bcf14 port:4687, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1542385166934, context=DefaultDaemonContext[uid=a312aa27-d9fc-4d2f-8e94-3a81fb94dc1d,javaHome=E:\Fabian\AndroidStudio\jre,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=20832,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_181,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=31360,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=a312aa27-d9fc-4d2f-8e94-3a81fb94dc1d,javaHome=E:\Fabian\AndroidStudio\jre,daemonRegistryDir=C:\Users\user.gradle\daemon,pid=20832,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 22072). The daemon log file: C:\Users\user.gradle\daemon\4.1\daemon-22072.out.log
Starting 7th build in daemon [uptime: 55 mins 41.875 secs, performance: 99%, no major garbage collections]
Using 4 worker leases.
Creating new cache for fileHashes, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@48eee248
Creating new cache for plugin-use-metadata, path C:\Users\user.gradle\caches\4.1\plugin-resolution\plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@697ca689
Creating new cache for client-status, path C:\Users\user.gradle\caches\4.1\plugin-resolution\client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@697ca689
Starting Build
Settings evaluated using settings file 'E:\master\settings.gradle'.
Projects loaded. Root project using build file 'E:\Fabian\Projekte\pocketsphinx-android\build.gradle'.
Included projects: [root project 'pocketsphinx-android']
Evaluating root project 'pocketsphinx-android' using build file 'E:\Fabian\Projekte\pocketsphinx-android\build.gradle'.
Creating new cache for metadata-1.1/results, path C:\Users\user.gradle\caches\transforms-1\metadata-1.1\results.bin, access org.gradle.cache.internal.DefaultCacheAccess@4c079f3
Creating new cache for metadata-2.23/module-metadata, path C:\Users\user.gradle\caches\modules-2\metadata-2.23\module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@72d0ee3d
Creating new cache for metadata-2.23/artifact-at-repository, path C:\Users\user.gradle\caches\modules-2\metadata-2.23\artifact-at-repository.bin, access org.gradle.cache.internal.DefaultCacheAccess@72d0ee3d
Creating configuration compile
Creating configuration publish
Creating configuration provided
Creating configuration wearApp
Creating configuration annotationProcessor
Creating configuration jackPlugin
Creating configuration androidTestCompile
Creating configuration androidTestPublish
Creating configuration androidTestProvided
Creating configuration androidTestWearApp
Creating configuration androidTestAnnotationProcessor
Creating configuration androidTestJackPlugin
Creating configuration testCompile
Creating configuration testPublish
Creating configuration testProvided
Creating configuration testWearApp
Creating configuration testAnnotationProcessor
Creating configuration testJackPlugin
Creating configuration debugCompile
Creating configuration debugPublish
Creating configuration debugProvided
Creating configuration debugWearApp
Creating configuration debugAnnotationProcessor
Creating configuration debugJackPlugin
Creating configuration testDebugCompile
Creating configuration testDebugPublish
Creating configuration testDebugProvided
Creating configuration testDebugWearApp
Creating configuration testDebugAnnotationProcessor
Creating configuration testDebugJackPlugin
Creating configuration releaseCompile
Creating configuration releasePublish
Creating configuration releaseProvided
Creating configuration releaseWearApp
Creating configuration releaseAnnotationProcessor
Creating configuration releaseJackPlugin
Creating configuration testReleaseCompile
Creating configuration testReleasePublish
Creating configuration testReleaseProvided
Creating configuration testReleaseWearApp
Creating configuration testReleaseAnnotationProcessor
Creating configuration testReleaseJackPlugin
Parsing the SDK, no caching allowed
SDK initialized in 42 ms
Incremental Java compilation disabled in variant debug as you are using 2 source folders : E:\Fabian\Projekte\pocketsphinx-android\src\main\java,E:\Fabian\Projekte\pocketsphinx-android\build\generated-src
Not using incremental javac compilation for : debug.
Not using incremental javac compilation for : debugUnitTest.
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
Incremental Java compilation disabled in variant release as you are using 2 source folders : E:\Fabian\Projekte\pocketsphinx-android\src\main\java,E:\Fabian\Projekte\pocketsphinx-android\build\generated-src
Not using incremental javac compilation for : release.
Not using incremental javac compilation for : releaseUnitTest.
Not using incremental javac compilation for : debugAndroidTest.
All projects evaluated.
Selected primary task 'build' from project :
Creating new cache for annotation-processors, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\fileContent\annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@1279a851
Tasks to be executed: [task ':mkdir', task ':swigPs', task ':swigSb', task ':preBuild', task ':preDebugBuild', task ':checkDebugManifest', task ':prepareDebugDependencies', task ':compileDebugAidl', task ':compileLint', task ':copyDebugLint', task ':mergeDebugShaders', task ':compileDebugShaders', task ':generateDebugAssets', task ':mergeDebugAssets', task ':mergeDebugProguardFiles', task ':packageDebugRenderscript', task ':compileDebugRenderscript', task ':generateDebugResValues', task ':generateDebugResources', task ':packageDebugResources', task ':processDebugManifest', task ':generateDebugBuildConfig', task ':processDebugResources', task ':generateDebugSources', task ':incrementalDebugJavaCompilationSafeguard', task ':javaPreCompileDebug', task ':compileDebugJavaWithJavac', task ':processDebugJavaRes', task ':transformResourcesWithMergeJavaResForDebug', task ':transformClassesAndResourcesWithSyncLibJarsForDebug', task ':generateJsonModelDebug', task ':externalNativeBuildDebug', task ':mergeDebugJniLibFolders', task ':transformNativeLibsWithMergeJniLibsForDebug', task ':transformNativeLibsWithStripDebugSymbolForDebug', task ':transformNativeLibsWithSyncJniLibsForDebug', task ':bundleDebug', task ':compileDebugSources', task ':assembleDebug', task ':preReleaseBuild', task ':checkReleaseManifest', task ':prepareReleaseDependencies', task ':compileReleaseAidl', task ':copyReleaseLint', task ':mergeReleaseShaders', task ':compileReleaseShaders', task ':generateReleaseAssets', task ':mergeReleaseAssets', task ':mergeReleaseProguardFiles', task ':packageReleaseRenderscript', task ':compileReleaseRenderscript', task ':generateReleaseResValues', task ':generateReleaseResources', task ':packageReleaseResources', task ':processReleaseManifest', task ':generateReleaseBuildConfig', task ':processReleaseResources', task ':generateReleaseSources', task ':incrementalReleaseJavaCompilationSafeguard', task ':javaPreCompileRelease', task ':compileReleaseJavaWithJavac', task ':processReleaseJavaRes', task ':transformResourcesWithMergeJavaResForRelease', task ':transformClassesAndResourcesWithSyncLibJarsForRelease', task ':generateJsonModelRelease', task ':externalNativeBuildRelease', task ':mergeReleaseJniLibFolders', task ':transformNativeLibsWithMergeJniLibsForRelease', task ':transformNativeLibsWithStripDebugSymbolForRelease', task ':transformNativeLibsWithSyncJniLibsForRelease', task ':bundleRelease', task ':compileReleaseSources', task ':assembleRelease', task ':assemble', task ':lint', task ':incrementalDebugUnitTestJavaCompilationSafeguard', task ':javaPreCompileDebugUnitTest', task ':preDebugUnitTestBuild', task ':prepareDebugUnitTestDependencies', task ':compileDebugUnitTestJavaWithJavac', task ':processDebugUnitTestJavaRes', task ':compileDebugUnitTestSources', task ':mockableAndroidJar', task ':assembleDebugUnitTest', task ':testDebugUnitTest', task ':incrementalReleaseUnitTestJavaCompilationSafeguard', task ':javaPreCompileReleaseUnitTest', task ':preReleaseUnitTestBuild', task ':prepareReleaseUnitTestDependencies', task ':compileReleaseUnitTestJavaWithJavac', task ':processReleaseUnitTestJavaRes', task ':compileReleaseUnitTestSources', task ':assembleReleaseUnitTest', task ':testReleaseUnitTest', task ':test', task ':check', task ':build']
Creating new cache for resourceHashesCache, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\fileHashes\resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@48eee248
Creating new cache for fileSnapshots, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\taskHistory\fileSnapshots.bin, access org.gradle.cache.internal.DefaultCacheAccess@23c6438c
Creating new cache for taskHistory, path E:\Fabian\Projekte\pocketsphinx-android.gradle\4.1\taskHistory\taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@23c6438c
:mkdir (Thread[Task worker for ':',5,main]) started.
:mkdir
Putting task artifact state for task ':mkdir' into context took 0.0 secs.
Executing task ':mkdir' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:mkdir (Thread[Task worker for ':',5,main]) completed. Took 0.001 secs.
:swigPs (Thread[Task worker for ':' Thread 3,5,main]) started.
:swigPs
Putting task artifact state for task ':swigPs' into context took 0.0 secs.
Executing task ':swigPs' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Starting process 'command 'swig''. Working directory: E:\Fabian\Projekte\pocketsphinx-android Command: swig -Inull/swig -Inull/include -Inull/swig -java -package edu.cmu.pocketsphinx -outdir build/generated-src/java -o build/generated-src/cpp/pocketsphinx_wrap.c null/swig/pocketsphinx.i
Successfully started process 'command 'swig''
:swigPs FAILED
:swigPs (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 0.122 secs.
2 actionable tasks: 2 executed
Here is the terminal output:
E:\Fabian\Projekte\pocketsphinx-android>gradlew clean && gradlew -i build > build.log
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':externalNativeBuildCleanDebug'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
Unable to find file 'null\swig\pocketsphinx.i'.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':swigPs'.
Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
Windows users must feel the pain
Well, actually you need to export environment variables for location of pocketsphinx and sphinxbase sources, see inside gradle and cmake files.
:P ;)
Yeah, after finding this tutorial: http://swathiep.blogspot.com/2011/02/offline-speech-recognition-with.html
I figured there's more to the whole package shebang than just cloning.
I'll try to use Cygwin first, even though missing macro here, error there, and then I'll check out the gravy inside of the gradle/cmake files if that doesn't lead me to nirvana.
You probably didn't notice the date of the post.
This is much worse idea.
Last edit: Nickolay V. Shmyrev 2018-11-16
Uh so step 3:
cd <sphinxbase path="" pocketsphinx="" or="">
./configure
make
make install
won't do me any good? hmmm, well I guess I'll have to read up on how cmake works exactly gradle etc.</sphinxbase>
No
This is a good idea
I created the environment variables for sphinxbase_home, ah no wait I mean sPInxbase_home, and pocketsphinx_home, then I adjusted the paths' slashes to get rid of the "invalid character \F" but I still get errors, any ideas ?
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\github\pocketsphinx-android -BE:\Fabian\github\pocketsphinx-android.externalNativeBuild\cmake\debug\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\github\pocketsphinx-android\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Configuring done
CMake Error at CMakeLists.txt:106 (add_library):
build/generated-src/cpp/pocketsphinx_wrap.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
-- Generating done
-- Build files have been written to: E:/Fabian/github/pocketsphinx-android/.externalNativeBuild/cmake/debug/armeabi-v7a
Build command failed.
Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\github\pocketsphinx-android -BE:\Fabian\github\pocketsphinx-android.externalNativeBuild\cmake\release\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\github\pocketsphinx-android\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Configuring done
CMake Error at CMakeLists.txt:106 (add_library):
build/generated-src/cpp/pocketsphinx_wrap.c
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
-- Generating done
-- Build files have been written to: E:/Fabian/github/pocketsphinx-android/.externalNativeBuild/cmake/release/armeabi-v7a
I'd use Linux in a heartbeat if the computer I'm using wasn't a friends, so I can't just willy-nilly repartition it.
So far I don't see why the errors persist, it shouldn't have to do with the paths now I think?
Update:
I tried the whole shebam under ubuntu linux at a friend's computer, exactly the same errors.
We even tried hardcoding the paths to sphinxbase/pocketsphinx in gradle/cmake instead of using system vars, no chance.
Alright with the help of the CMake IRC chat I found the solution.
I upgraded build gradle from
'com.android.tools.build:gradle:2.3.1 'to
'com.android.tools.build:gradle:3.2.1'
and
SDK Build Tools Version from 25.0.3 to 28.0.3
But the problem persists, now only with an additional warning due to ignoring the specified version of 25.0.3
I really dont understand why we have to go this far? I mean can we just download and run the demo or replace the dict and model with ours and run it may be ? can anyone explain why the above processes are necessary?
In case you want to adjust some functionality inside the library you have to recompile it.
You are correct it is rarely needed.
Dear Nickolay
I was trying to develop mobile application using pocketsphinx for Amharic
language. and i already read the tutorial and it requires some resources.
unfortunately for the time being eventheir are many speaker of the language
their seems no acoustic model and for that i want to develop very simple
command and control application. The problem is for the resource the only
speaker around is me as am studing aboard so what i really want to know is
if i can record hrs of data by my own does it work or what seems to be an
option to use pocketsphinx for this language.
Last edit: Nickolay V. Shmyrev 2019-02-14
You can ask this question in a separate thread. It is irrelevant here.