Code Monkey home page Code Monkey logo

pocketsphinx-ios-demo's People

Contributors

cshung avatar danoli3 avatar nshmyrev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pocketsphinx-ios-demo's Issues

Cross-compiling with libsndfile and libsamplerate

Hi Nikolay,

I think that the current autoconf script doesn't distinguish between OSX x86_64 and simulator x86_64. That means that if you try ./build_iphone.sh x86_64 on an x86_64 machine which has access to libsamplerate and libsndfile, you'll get a nice linker error.

Thanks,
Sean

What is build script?

It says in README.md to "copy build script in sphinxbase folder and in pocketsphinx folder".

What is build script?

build_iphone.sh: line 52: /Users/.../pocketsphinx-master/configure: No such file or directory

I am getting an error that says no such file or directory for the directory ".../pocketsphinx-master/configure".

Here is what my terminal on my Mac mini looks like:

Daniels-Mac-mini:pocketsphinx-master shinehah$ sh build_iphone.sh
building arm64...
build_iphone.sh: line 52: /Users/shinehah/cmusphinx/pocketsphinx-master/configure: No such file or directory

I created that directory, but I still get the same error message. What do I need to put in that directory?

In build_iphone.sh, line 52, it says:

--host="${HOST_TYPE}" \

Here is the code segment it is from:

$CWD/configure
--host="${HOST_TYPE}"
--prefix="$DEST/$ARCH"
--without-lapack
--without-python
--with-sphinxbase="$SPHINXBASE_DIR"
|| exit 1

ld: library not found for -lblas

Hello,

Is there anyone know about this "ld: library not found for -lblas"?. Here is my log:

.libs/fsg_history.o .libs/fsg_lextree.o .libs/fsg_search.o .libs/allphone_search.o .libs/kws_search.o .libs/kws_detections.o .libs/hmm.o .libs/mdef.o .libs/ms_gauden.o .libs/ms_mgau.o .libs/ms_senone.o .libs/ngram_search.o .libs/ngram_search_fwdtree.o .libs/ngram_search_fwdflat.o .libs/phone_loop_search.o .libs/ps_alignment.o .libs/ps_lattice.o .libs/ps_mllr.o .libs/ptm_mgau.o .libs/s2_semi_mgau.o .libs/state_align_search.o .libs/tmat.o .libs/vector.o .libs/pocketsphinx.o -L/usr/local/lib /usr/local/lib/libsphinxad.dylib /usr/local/lib/libsphinxbase.dylib -lpthread -lm -lblas -llapack -O3 -arch armv7s -mios-version-min=6.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -arch armv7s -mios-version-min=6.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -framework OpenAL -install_name /Volumes/DATA_1/sample_source/voice_recognition/pocketsphinx/bin/armv7s/lib/libpocketsphinx.3.dylib -compatibility_version 4 -current_version 4.0 -Wl,-single_module
ld: library not found for -lblas
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libpocketsphinx.la] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

Thanks

sphinxbase/prim_type.h missing

These are the steps that I performed based on the readme.

Clone latest copy of sphinxbase and pocketsphinx.
Run autogen.sh on both directories starting sphinxbase
Copy build_iphone.sh into both directory.
Run build_iphone.sh in sphinxbase first
Run build_iphone.sh in pocketsphinx

However when I run the script in the pocketsphinx in blkarray_list.c i get <sphinxbase/prim_type.h> is not found. I verified the header is in /usr/local/include/

Before I tried the build_iphone.sh I was able to successfully make and install both sphinxbase and pocketsphinx

I am running Mac OS 10.11

libblas.a

Hello nshmyrev,

I have an issue linking to libblas.a when compiling pocketsphinx-5prealpha and was wondering if you had this same issue? If so, how you got around it? Here is the error message

ld: library not found for -lblas

also, you are supposed to run the script on both sphinxbase-5prealpha and pocketsphinx-5prealpha right?

Build issues

Hey,

I've cloned the latest from sphinxbase and pocketsphinx and built for armv7 using this build script. While sphinxbase configures and builds fine, pocketsphinx does not.

During configuration it complains as such:

checking for sphinxbase in /Users/topher/Dev/pocketsphinx/scratch/armv7//Users/topher/Dev/pocketsphinx/../sphinxbase... no
checking for sphinxbase in /Users/topher/Dev/pocketsphinx/scratch/armv7//Users/topher/Dev/pocketsphinx/../sphinxbase*... no
checking for SPHINXBASE... no

These paths obviously look a bit messed up. My current directory layout is:
./
/pocketsphinx/
/sphinxbase/

Have I missed a step somewhere?

Thanks.

Autogen can't find SphinxBase (sphinx_config.h), while its really there

I have seen lots and lots of issues about missing 'sphinx_config.h', most of them because of wrong folder names like 'sphinxbase-master'. But my folder structure is exactly how its supposed to be, and it really includes 'sphinx_config.h' as well, so what could it be?

I downloaded the two repos and put them in the folders:

  • sphinxbase
  • pocketsphinx

I run "./autogen.sh" in sphinxbase and it works fine
I run "./autogen.sh" in pocketsphinx and I get the error that it can't find sphinxbase

checking SWIG version... 4.0.2
checking for SWIG library... /usr/local/Cellar/swig/4.0.2/share/swig/4.0.2
checking for GStreamer... checking for sphinxbase in /Users/toinedeboer/pocketsphinx/../sphinxbase... no
checking for sphinxbase in /Users/toinedeboer/pocketsphinx/../sphinxbase... no
./configure: line 13321: SPHINXBASE_CFLAGS: command not found
./configure: line 13322: SPHINXBASE_LIBS: command not found
checking sphinx_config.h usability... no
checking sphinx_config.h presence... no
checking for sphinx_config.h... no
configure: error: in /Users/toinedeboer/pocketsphinx': configure: error: SphinxBase was not found on your system. See config.log' for more details

Some other stuff I tried besides above:

  • runing "./autogen.sh" in pocketsphinx with the following doesn't work either
    • with sphinxbase include folder on different locations (the folder that has sphinx_config.h)
    • with sphinxbase in pocketsphinx folder
    • building sphinxbase (./build_iphone.sh arm64) and using the /bin folders
    • etc etc.

I added the terminal output and the logs to see what happens in detail.
autogen-terminal-output.txt
config.log (pocketsphinx)
config.log (sphinxbase)

Missing Header Files

Hi,
I see several header files from PocketSphinx source files are missing in the included headers. For example, ps_alignment.h is missing. But, I believe this header is required. Any clues?

build question

I'm stuck on the build script and was hoping you might be able to help. when I run ./build_iphone.sh, it gets stuck on line 55 because configure does not exist in that directory.

Desktop/sphinx/pocketsphinx-ios-demo/configure: No such file or directory

i have pocketsphinx-ios-demo and sphinxbase in the same directory and am running ./build_iphone.sh from pocketsphinx-ios-demo . any help is appreciated.

Unable to run autogen in pocketsphinx folder

The README says to run autogen in the pocketsphinx folder, but that is not working. Autogen cannot be run if sphinxbase is not found on the system

configure: error: in '.../pocketsphinx-master':
configure: error: SphinxBase was not found on your system.

Pocketsphinx ps_set_lm take a long time in iOS

Hi guys, I need help!
I try to replicate the Pocketsphinx-android library in swift language on iOS, everything works well except about adding the language model.
For example, I have about 10 new words already added with "ngram_model_add_word" and then I tried to set the language model with "ps_set_lm", but its take a long time and take 99% CPU usage. But in Android, its only take less than a second. My question is, how to set language model faster and reduce the CPU usage?

fileprivate func generateNGramModel(words: [String])  {
        let arpaFile = Utilities.getAssetPath()!.appending("\(SEARCH_ID).arpa")
        nGramModel = NGramModel(config: config, logMath: recognizer.getDecoder().getLogMath(), lmFile: arpaFile)
        for word in words {
            nGramModel?.addWord(word: word.lowercased(), weight: 1.7)
        }
        recognizer.getDecoder().setLanguageModel(name: SEARCH_ID, nGramModel: nGramModel!)
}

And the method to set the language model:

open func setLanguageModel(name: String, nGramModel: NGramModel) {
        if ps_set_lm(pointer, name, nGramModel.getPointer())  < 0 {
            print("Set language model failed!")
        }
}

Build failure: No rule to make target `install'

Hi,

If I type from the sphinxbase directory (git 949eb63bf456c576a3f880ec20ba397a11dbc9c1) ../pocketsphinx-ios-demo/build_iphone.sh simulator on Yosemite.

I get the following error:

building simulator...
/Users/jamie/Documents/sphinxbase/configure --host=simulator-apple-darwin --prefix=/Users/jamie/Documents/sphinxbase/bin/simulator
make: *** No rule to make target `install'.  Stop.

Am I doing something wrong here?

problem with integration

nshmyrev,

do you have a sample xcode project where you use the pocketsphinx-ios-demo? I built the project with your scripts, and then tried importing the x86_64 directory for a test on the simulator. After removing the reference to the the share folder, I put

#include <pocketsphinx.h>

in the bridging header, trying to follow the instructions here - http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx Unfortunately, I realized there was not pocketsphinx.h header generated. Anyways, do you have any advice or a sample xcode project with the libraries added? I'm having a hard time matching the build to the docs on teh cmusphinx website.

What is autotools?

It says in the README.md that "You have to have autotools installed for that."

What is autotools?

build error : E_DEBUG too many arguments provided

/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1037:34: error: too many arguments provided to function-like macro invocation
acmod->senscr_frame, acmod->n_senone_active);
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase/err.h:144:9: note: macro 'E_DEBUG' defined here
#define E_DEBUG(level,x)
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1036:5: error: use of undeclared identifier 'E_DEBUG'; did you mean 'ERR_DEBUG'?
E_DEBUG("Frame %d has %d active states\n",
^~~~~~~
ERR_DEBUG
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase/err.h:149:5: note: 'ERR_DEBUG' declared here
ERR_DEBUG,
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1036:5: warning: expression result unused [-Wunused-value]
E_DEBUG("Frame %d has %d active states\n",
^~~~~~~
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1161:17: error: too many arguments provided to function-like macro invocation
acmod->n_senone_active);
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase/err.h:144:9: note: macro 'E_DEBUG' defined here
#define E_DEBUG(level,x)
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1160:9: error: use of undeclared identifier 'E_DEBUG'; did you mean 'ERR_DEBUG'?
E_DEBUG("Frame %d has %d active states\n", frame_idx,
^~~~~~~
ERR_DEBUG
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase/err.h:149:5: note: 'ERR_DEBUG' declared here
ERR_DEBUG,
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1160:9: warning: expression result unused [-Wunused-value]
E_DEBUG("Frame %d has %d active states\n", frame_idx,
^~~~~~~
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1303:37: error: too many arguments provided to function-like macro invocation
acmod->n_senone_active, acmod->output_frame);
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase/err.h:144:9: note: macro 'E_DEBUG' defined here
#define E_DEBUG(level,x)
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1302:5: error: use of undeclared identifier 'E_DEBUG'; did you mean 'ERR_DEBUG'?
E_DEBUG("acmod_flags2list: %d active in frame %d\n",
^~~~~~~
ERR_DEBUG
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase/err.h:149:5: note: 'ERR_DEBUG' declared here
ERR_DEBUG,
^
/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/acmod.c:1302:5: warning: expression result unused [-Wunused-value]
E_DEBUG("acmod_flags2list: %d active in frame %d\n",
^~~~~~~
3 warnings and 6 errors generated.
make[2]: *** [acmod.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/blkarray_list.Tpo .deps/blkarray_list.Plo
libtool: compile: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DHAVE_CONFIG_H -I. -I/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx -I../../include -O3 -arch arm64 -mios-version-min=7.0 -fembed-bitcode -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -I/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include -I/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/../sphinxbase/bin/arm64/include/sphinxbase -I/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/include -I../../include -DMODELDIR="/Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/bin/arm64/share/pocketsphinx/model" -O3 -arch arm64 -mios-version-min=7.0 -fembed-bitcode -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -MT bin_mdef.lo -MD -MP -MF .deps/bin_mdef.Tpo -c /Volumes/kidyn03/Users/hexiangling/Documents/kidyndata/huangyong/studySource/cmusphinx/pocketsphinx/src/libpocketsphinx/bin_mdef.c -o bin_mdef.o >/dev/null 2>&1
mv -f .deps/bin_mdef.Tpo .deps/bin_mdef.Plo
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

ld: library not found for -lblas Still here.

#2 is Not fixed.

ld: library not found for -lblas
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libpocketsphinx.la] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

Traced it to this:
configure: WARNING: unrecognized options: --without-lapack

Also an additional note, could you detail the process / where to locate the build script. This happened with the following assumptions: (Maybe a good idea to add this to the repo README.md)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.