Giter VIP home page Giter VIP logo

node-pocketsphinx's People

Contributors

calebegg avatar moneppo avatar notheotherben 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  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

node-pocketsphinx's Issues

make: *** No rule to make target '/swig/sphinxbase.i', needed by 'sb.cpp'. Stop.

While trying to install I get the following error:

[pi@ashiya:~/conduit/pocketsphinx/pocketsphinx-node $ npm install pocketsphinx --save

> [email protected] install /home/pi/conduit/pocketsphinx/pocketsphinx-node/node_modules/pocketsphinx
> node-gyp rebuild

make: Entering directory '/home/pi/conduit/pocketsphinx/pocketsphinx-node/node_modules/pocketsphinx/build'
  ACTION Checking for sphinxbase and pocketsphinx version 5prealpha with pkg-config .
make: *** No rule to make target '/swig/sphinxbase.i', needed by 'sb.cpp'.  Stop.
make: Leaving directory '/home/pi/conduit/pocketsphinx/pocketsphinx-node/node_modules/pocketsphinx/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.13-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/conduit/pocketsphinx/pocketsphinx-node/node_modules/pocketsphinx
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 4.1.13-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx" "--save"
npm ERR! node v5.3.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

The following are compiled and installed correctly:

  1. sphinxbase version 5prealpha
  2. pocketshinx version 5prealpha (Tested this works well: pocketsphinx_continuous -inmic yes)
  3. swig3.0: Version 3.0.2
  4. node: version 5.3.0
  5. node-gyp: version 3.2.1
  6. pkg-config: version 0.28

I see that the source code of sphinxbase contains the reported /swig/sphinxbase.i file here: https://github.com/cmusphinx/sphinxbase/blob/master/swig/sphinxbase.i

Do I need to be storing the source code in a relative path? Currently my directory structure looks as follows:

projectName
├── package.json
└── sphinxbase

Reduce Sample Rate of a video

Is it a correct method that reduce sample rate of a high quality video that we are going to convert to text ? Specially when we are doing a research type project ?

Raspberry Pi : unrecognized option -javascript

I am trying to get the node version working on a Raspberry Pi, I have pocketSpinx installed etc (followed https://wolfpaulus.com/journal/embedded/raspberrypi2-sr/).

When I try to do npm install I get

[email protected] install /home/pi/node-pocketsphinx-master

node-gyp rebuild

make: Entering directory '/home/pi/node-pocketsphinx-master/build'
ACTION Checking for sphinxbase and pocketsphinx version 5prealpha with pkg-config .
ACTION Creating sphinxbase wrapper sb.cpp
swig error : Unrecognized option -javascript
swig error : Unrecognized option -node
Use 'swig -help' for available options.
SphinxBase.target.mk:26: recipe for target 'sb.cpp' failed
make: *** [sb.cpp] Error 1
make: Leaving directory '/home/pi/node-pocketsphinx-master/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.18-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node-pocketsphinx-master
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

npm ERR! Linux 4.1.18-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/node-pocketsphinx-master/npm-debug.log
pi@raspberrypi:~/node-pocketsphinx-master $

npm install fails with "no matching function for call to 'ngram_model_write'" and "no known conversion from 'int' to 'ngram_file_type_t'"

Node: 6.2.1
CMake: 3.7.2
CMake-js: 3.4.0
Sphinxbase: 5prealalpha
Pocketsphinx: 5prealalpha
Swig: 3.0.11
PkgConfig: 0.29.1

As mentioned in the title, npm install fails with the error:

/Users/george.rowe/Desktop/Sandbox/node/node-pocketsphinx/build/sphinxbase/sb.cpp:1934:20: error:
no matching function for call to 'ngram_model_write'
*errcode = ngram_model_write(self, path, ftype);
^~~~~~~~~~~~~~~~~
/usr/local/include/sphinxbase/ngram_model.h:116:5: note: candidate function not
viable: no known conversion from 'int' to 'ngram_file_type_t'
(aka 'ngram_file_type_e') for 3rd argument
int ngram_model_write(ngram_model_t *model, const char *file_name,

Full log.txt attached.

log.txt

New version of pocketsphinx generates error for demo example

Hi -

When I check out the latest sphinxbase/pocketsphinx/node-pocketsphinx libraries and try to run the demo example on an Ubuntu laptop I get the following warning:
WARN: "pocketsphinx.c", line 1045: Data size is too large, word timings might be wrong, process audio in smaller chunks
I see in the pocketsphinx project that this was added a few days ago. When I run pocketsphinx_continuous from the command line everything works so I'm hoping that I just need to be explicit (somewhere) about setting the data size.

Thanks

error install

-- Configuring incomplete, errors occurred!
See also "/root/ships/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".
ERR! OMG Process terminated: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No repository field.
npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "pocketsphinx"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js compile
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pocketsphinx
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/ships/npm-debug.log

error: too few arguments to function

What the version of pocketsphinx was the demo used? It seems the prototype not matching..

../src/Recognizer.cpp:308:58: error: too few arguments to function ‘const char* ps_get_hyp(ps_decoder_t_, int32_, const char)’
const char* hyp = ps_get_hyp(data->instance->ps, &score);**

full log as below
Vostro-5470:~/homework/speech_recognition/node-pocketsphinx$ sudo node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/lester/homework/speech_recognition/node-pocketsphinx/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/lester/.node-gyp/0.10.32/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/lester/.node-gyp/0.10.32',
gyp info spawn args '-Dmodule_root_dir=/home/lester/homework/speech_recognition/node-pocketsphinx',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory /home/lester/homework/speech_recognition/node-pocketsphinx/build' CXX(target) Release/obj.target/PocketSphinx/src/Factory.o CXX(target) Release/obj.target/PocketSphinx/src/Recognizer.o ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddKeyphraseSearch(const v8::Arguments&)’: ../src/Recognizer.cpp:109:64: error: ‘ps_set_keyphrase’ was not declared in this scope int result = ps_set_keyphrase(instance->ps, *name, *keyphrase); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddKeywordsSearch(const v8::Arguments&)’: ../src/Recognizer.cpp:133:53: error: ‘ps_set_kws’ was not declared in this scope int result = ps_set_kws(instance->ps, *name, *file); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddGrammarSearch(const v8::Arguments&)’: ../src/Recognizer.cpp:157:59: error: ‘ps_set_jsgf_file’ was not declared in this scope int result = ps_set_jsgf_file(instance->ps, *name, *file); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddNgramSearch(const v8::Arguments&)’: ../src/Recognizer.cpp:181:57: error: ‘ps_set_lm_file’ was not declared in this scope int result = ps_set_lm_file(instance->ps, *name, *file); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::GetSearch(v8::Local<v8::String>, const v8::AccessorInfo&)’: ../src/Recognizer.cpp:191:69: error: ‘ps_get_search’ was not declared in this scope Local<Value> search = String::NewSymbol(ps_get_search(instance->ps)); ^ ../src/Recognizer.cpp: In static member function ‘static void Recognizer::SetSearch(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&)’: ../src/Recognizer.cpp:201:38: error: ‘ps_set_search’ was not declared in this scope ps_set_search(instance->ps, *search); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::Start(const v8::Arguments&)’: ../src/Recognizer.cpp:207:41: error: too few arguments to function ‘int ps_start_utt(ps_decoder_t*, const char*)’ int result = ps_start_utt(instance->ps); ^ In file included from ../src/Recognizer.h:7:0, from ../src/Recognizer.cpp:2: /usr/include/pocketsphinx/pocketsphinx.h:363:5: note: declared here int ps_start_utt(ps_decoder_t *ps, char const *uttid); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::Restart(const v8::Arguments&)’: ../src/Recognizer.cpp:227:41: error: too few arguments to function ‘int ps_start_utt(ps_decoder_t*, const char*)’ int result = ps_start_utt(instance->ps); ^ In file included from ../src/Recognizer.h:7:0, from ../src/Recognizer.cpp:2: /usr/include/pocketsphinx/pocketsphinx.h:363:5: note: declared here int ps_start_utt(ps_decoder_t *ps, char const *uttid); ^ ../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::WriteSync(const v8::Arguments&)’: ../src/Recognizer.cpp:290:52: error: too few arguments to function ‘const char* ps_get_hyp(ps_decoder_t*, int32*, const char**)’ const char* hyp = ps_get_hyp(instance->ps, &score); ^ In file included from ../src/Recognizer.h:7:0, from ../src/Recognizer.cpp:2: /usr/include/pocketsphinx/pocketsphinx.h:449:13: note: declared here char const *ps_get_hyp(ps_decoder_t *ps, int32 *out_best_score, ^ ../src/Recognizer.cpp: In static member function ‘static void Recognizer::AsyncWorker(uv_work_t*)’: ../src/Recognizer.cpp:308:58: error: too few arguments to function ‘const char* ps_get_hyp(ps_decoder_t*, int32*, const char**)’ const char* hyp = ps_get_hyp(data->instance->ps, &score); ^ In file included from ../src/Recognizer.h:7:0, from ../src/Recognizer.cpp:2: /usr/include/pocketsphinx/pocketsphinx.h:449:13: note: declared here char const *ps_get_hyp(ps_decoder_t *ps, int32 *out_best_score, ^ make: *** [Release/obj.target/PocketSphinx/src/Recognizer.o] Error 1 make: Leaving directory/home/lester/homework/speech_recognition/node-pocketsphinx/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/lester/homework/speech_recognition/node-pocketsphinx
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

module.js:471 throw err;

Hi,
I have installed all required libraries for node-pocketsphinx,
But when I try to execute example code I got following error
module.js:471
throw err;
^

Error: Cannot find module 'pocketsphinx'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/jjadhad/nodejs/test.js:3:33)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

please help

Installation process in ubuntu

sudo git clone https://github.com/cmusphinx/node-pocketsphinx.git
cd node-pocketsphinx
npm install
node index.js

this error show me:

module.js:340
    throw err;
          ^
Error: Cannot find module './build/Release/PocketSphinx.node'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/felipe/node-pocketsphinx/index.js:1:82)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

Can't install node-pocketsphinx with node 7.10.0

I've compiled and installed this branch of SWIG that provides support for Node 7.x.

Node verison: 7.10.0
Npm version: 4.2.0
SWIG version: 4.0.0 -- Note: The branch of SWIG provides support for Node 7.x.

Installation of the module fails with this console output.
This is the log file.

Despite me using this branch of SWIG, I still get the errors above when trying to install pocketsphinx.

npm install error

Hi,

when I try to install pocketsphinx with npm I get the following error on my raspberry:

gyp verb download contents checksum {"node-v4.2.1-headers.tar.gz":"b242fd0fa83748d95cc3e68d14579b629960b0436d65da9d86907eef27b96fc1"}
gyp verb validating download checksum for node-v4.2.1-headers.tar.gz (b242fd0fa83748d95cc3e68d14579b629960b0436d65da9d86907eef27b96fc1 == b242fd0fa83748d95cc3e68d14579b629960b0436d65da9d86907eef27b96fc1)
gyp verb get node dir target node version installed: 4.2.1
gyp verb build dir attempting to create "build" dir: /usr/local/src/node/node_modules/pocketsphinx/build
gyp verb build dir "build" dir needed to be created? /usr/local/src/node/node_modules/pocketsphinx/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /usr/local/src/node/node_modules/pocketsphinx/build/config.gypi
gyp verb config.gypi checking for gypi file: /usr/local/src/node/node_modules/pocketsphinx/config.gypi
gyp verb common.gypi checking for gypi file: /usr/local/src/node/node_modules/pocketsphinx/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/src/node/node_modules/pocketsphinx/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/src/node/node_modules/pocketsphinx/.node-gyp/4.2.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/usr/local/src/node/node_modules/pocketsphinx/.node-gyp/4.2.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/usr/local/src/node/node_modules/pocketsphinx',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture arm
gyp verb node dev dir /usr/local/src/node/node_modules/pocketsphinx/.node-gyp/4.2.1
gyp verb which succeeded for make /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/usr/local/src/node/node_modules/pocketsphinx/build'
make: *** No rule to make target '/swig/pocketsphinx.i', needed by 'ps.cpp'. Stop.
make: Leaving directory '/usr/local/src/node/node_modules/pocketsphinx/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.13-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "-v" "rebuild"
gyp ERR! cwd /usr/local/src/node/node_modules/pocketsphinx
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 4.1.13-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp -v rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp -v rebuild'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp -v rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/src/node/npm-debug.log

Do you maybe have any idea how to fix it, Pocketsphinx on my raspberry is running fine so far I just can't install the node part.

Thanks!

npm install fails on Raspberry Pi

SphinxBase.target.mk:118: recipe for target 'Release/obj.target/SphinxBase/wrap_sb.o' failed
build error log: http://pastebin.com/Hv3L8TmL
node: 5.7.0
npm: 3.6.0
gcc: 4.9.2 (Raspbian 4.9.2-10)
pkg-config --modversion pocketsphinx = 5prealpha
both sphinxbase and pocketsphinx compiled from source
sphinxbase commit: becdd6d41dc2095d8313eff1343d8ab26cdec427
pocketsphinx commit: f15834917294966c604cd709aa1c0255533c677b
pocketsphinx_continuous works fine (albeit slow with the default dictionary)

Checking for module 'sphinxbase>=5prealpha'

yes, I installed all the dependencies...

-- Checking for module 'sphinxbase>=5prealpha'
--   
CMake Error at /usr/share/cmake-3.6/Modules/FindPkgConfig.cmake:424 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.6/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal)
  CMakeLists.txt:6 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
See also "/home/magicinventor/.nvm/versions/node/v6.8.0/lib/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".

npm install fails with node 7.2 and 8.0

Hi,

I have the latest sphinxbase and pocketsphinx installed from github, also PKG_CONFIG_PATH is set to /usr/local/lib/pkgconfig.

I have cmake of version 3.7.1 and SWIG of Version 3.0.10.

When I tried to do npm install pocketsphinx it gave the following error:

log.txt

Seemed to be a problem with "cmake-js compile" ?

Error with node-gyp on building

I can't seem to get it to build with sphinxbase5prerel and the latest version of pocketsphinx from github. I just reran make on both and those installs have no errors under make check. However when npm tries to run the node-gyp I get:

../src/Recognizer.cpp:23:67: error: use of undeclared identifier 'MODELDIR'
tpl->Set(String::NewSymbol("modelDirectory"), String::NewSymbol(MODELDIR));
^
../src/Recognizer.cpp:73:97: error: use of undeclared identifier 'MODELDIR'
String::AsciiValue hmmValue(Default(options->Get(String::NewSymbol("hmm")), String::NewSymbol(MODELDIR "/hmm/en_US/hub4wsj_sc_8k")));
^
../src/Recognizer.cpp:74:95: error: use of undeclared identifier 'MODELDIR'
String::AsciiValue lmValue(Default(options->Get(String::NewSymbol("lm")), String::NewSymbol(MODELDIR "/lm/en_US/hub4.5000.DMP")));
^
../src/Recognizer.cpp:75:99: error: use of undeclared identifier 'MODELDIR'
String::AsciiValue dictValue(Default(options->Get(String::NewSymbol("dict")), String::NewSymbol(MODELDIR "/lm/en_US/cmu07a.dic")));
^
../src/Recognizer.cpp:215:16: error: no matching function for call to 'ps_start_utt'
int result = ps_start_utt(instance->ps, NULL);
^~~~~~~~~~~~
/usr/local/include/pocketsphinx/pocketsphinx.h:332:5: note: candidate function not viable: requires single argument 'ps', but 2 arguments were provided
int ps_start_utt(ps_decoder_t ps);
^
../src/Recognizer.cpp:235:16: error: no matching function for call to 'ps_start_utt'
int result = ps_start_utt(instance->ps, NULL);
^~~~~~~~~~~~
/usr/local/include/pocketsphinx/pocketsphinx.h:332:5: note: candidate function not viable: requires single argument 'ps', but 2 arguments were provided
int ps_start_utt(ps_decoder_t *ps);
^
../src/Recognizer.cpp:299:21: error: no matching function for call to 'ps_get_hyp'
const char
hyp = ps_get_hyp(instance->ps, &score, &uttid);
^~~~~~~~~~
/usr/local/include/pocketsphinx/pocketsphinx.h:408:13: note: candidate function not viable: requires 2 arguments, but 3 were provided
char const ps_get_hyp(ps_decoder_t *ps, int32 *out_best_score);
^
../src/Recognizer.cpp:318:21: error: no matching function for call to 'ps_get_hyp'
const char
hyp = ps_get_hyp(data->instance->ps, &score, &uttid);
^~~~~~~~~~
/usr/local/include/pocketsphinx/pocketsphinx.h:408:13: note: candidate function not viable: requires 2 arguments, but 3 were provided
char const ps_get_hyp(ps_decoder_t *ps, int32 *out_best_score);
^
8 errors generated.
make: *
* [Release/obj.target/PocketSphinx/src/Recognizer.o] Error 1

Install issue

Hi,

The build always failed and have no idea on how to fix it.
It looks like a version issue between node and node-gyp.
I tried to downgrade the node version but no success, any ides on how to solve it?

Thanks,

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "-v" "rebuild"
gyp ERR! cwd /Users/XXXXXX/Downloads/cmu/node-pocketsphinx
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.3.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! pocketsphinx@5.0.3 install: `node-gyp -v rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pocketsphinx@5.0.3 install script 'node-gyp -v rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp -v rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

Still problem to install on MAC OS X 10.11.2 and node v5.3.0

PKG_CONFIG_PATH is set to /usr/local/lib/pkginfo

running npm install results in:

> [email protected] install /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx
> node-gyp -v rebuild

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/Cellar/node/5.3.0/bin/node',
gyp verb cli   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   '-v',
gyp verb cli   'rebuild' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:78:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:82:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:93:16
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python2 [Error: not found: python2]
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `python -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 5.3.0
gyp verb command install [ '5.3.0' ]
gyp verb install input version string "5.3.0"
gyp verb install installing version: 5.3.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 5.3.0
gyp verb build dir attempting to create "build" dir: /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx/build
gyp verb build dir "build" dir needed to be created? /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx/config.gypi
gyp verb common.gypi checking for gypi file: /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/mk/.node-gyp/5.3.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/mk/.node-gyp/5.3.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /Users/mk/.node-gyp/5.3.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No rule to make target `Release/obj.target/PocketSphinx/wrap_ps.o', needed by `Release/PocketSphinx.node'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.2.0
gyp ERR! command "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "-v" "rebuild"
gyp ERR! cwd /Users/mk/PhpstormProjects/pocketsphinx-test/node_modules/pocketsphinx
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN EPACKAGEJSON [email protected] No repository field.
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.3.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp -v rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp -v rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp -v rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mk/PhpstormProjects/pocketsphinx-test/npm-debug.log

Pocketsphinx and sphinxbase are present in /usr/local/lib/pkginfo (installed with brew).
Don't really know what else I could do to make the install work?

npm installation failing on Raspberry Pi 3.

I am trying to install npm install on raspberry pi model 3 version but it is failing at my end.

Following are the specifications,
node- v4.4.5
npm- 2.15.5
SWIG Version 3.0.10.

Following error message received

[email protected] install /home/pi/node-pocket/node_modules/pocketsphinx
cmake-js compile

info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info DIST Downloading distribution files.
ERR! OMG EACCES: permission denied, mkdir '/root/.cmake-js/node-arm/v4.4.5'
ERR! OMG EACCES: permission denied, mkdir '/root/.cmake-js/node-arm/v4.4.5'
npm ERR! Linux 4.1.19-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js compile
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pocketsphinx
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/node-pocket/npm-debug.log

I couldn't do npm install on windows

D:\web\node-pocketsphinx>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp: Call to 'pkg-config --variable=datadir sphinxbase' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\web\node-pocketsphinx
gyp ERR! node -v v4.3.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v4.3.1
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\web\node-pocketsphinx\npm-debug.log

can anyone help me on this

npm install pocketsphinx fails

Hello,

pocketsphinx installation gives Error that indicating recipe for target 'Release/obj.target/SphinxBase/wrap_sb.o' failed.
Here, I have copied my npm debug log.

Thanks in Advance.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'install', 'pocketsphinx' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /home/anuradha/.npmrc. (matches userconfig)
5 verbose cache add [ 'pocketsphinx', null ]
6 verbose cache add name=undefined spec="pocketsphinx" args=["pocketsphinx",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url   slashes: null,
7 verbose parsed url   auth: null,
7 verbose parsed url   host: null,
7 verbose parsed url   port: null,
7 verbose parsed url   hostname: null,
7 verbose parsed url   hash: null,
7 verbose parsed url   search: null,
7 verbose parsed url   query: null,
7 verbose parsed url   pathname: 'pocketsphinx',
7 verbose parsed url   path: 'pocketsphinx',
7 verbose parsed url   href: 'pocketsphinx' }
8 silly lockFile a075f906-pocketsphinx pocketsphinx
9 verbose lock pocketsphinx /home/anuradha/.npm/a075f906-pocketsphinx.lock
10 silly lockFile a075f906-pocketsphinx pocketsphinx
11 silly lockFile a075f906-pocketsphinx pocketsphinx
12 verbose addNamed [ 'pocketsphinx', '' ]
13 verbose addNamed [ null, '*' ]
14 silly lockFile 2dd57e8a-pocketsphinx pocketsphinx@
15 verbose lock pocketsphinx@ /home/anuradha/.npm/2dd57e8a-pocketsphinx.lock
16 silly addNameRange { name: 'pocketsphinx', range: '*', hasData: false }
17 verbose request where is /pocketsphinx
18 verbose request registry https://registry.npmjs.org/
19 verbose request id 45e2458ac581ef5e
20 verbose url raw /pocketsphinx
21 verbose url resolving [ 'https://registry.npmjs.org/', './pocketsphinx' ]
22 verbose url resolved https://registry.npmjs.org/pocketsphinx
23 verbose request where is https://registry.npmjs.org/pocketsphinx
24 info trying registry request attempt 1 at 23:14:37
25 verbose etag "AID2VZTI23XDS8QF9D76MIC9X"
26 http GET https://registry.npmjs.org/pocketsphinx
27 http 304 https://registry.npmjs.org/pocketsphinx
28 silly registry.get cb [ 304,
28 silly registry.get   { date: 'Thu, 07 Jan 2016 17:44:37 GMT',
28 silly registry.get     via: '1.1 varnish',
28 silly registry.get     'cache-control': 'max-age=300',
28 silly registry.get     etag: '"AID2VZTI23XDS8QF9D76MIC9X"',
28 silly registry.get     age: '158',
28 silly registry.get     connection: 'keep-alive',
28 silly registry.get     'x-served-by': 'cache-sin6926-SIN',
28 silly registry.get     'x-cache': 'HIT',
28 silly registry.get     'x-cache-hits': '1',
28 silly registry.get     'x-timer': 'S1452188677.969680,VS0,VE8',
28 silly registry.get     vary: 'Accept' } ]
29 verbose etag https://registry.npmjs.org/pocketsphinx from cache
30 silly addNameRange number 2 { name: 'pocketsphinx', range: '*', hasData: true }
31 silly addNameRange versions [ 'pocketsphinx', [ '1.0.0', '5.0.1', '5.0.2', '5.0.3' ] ]
32 verbose addNamed [ 'pocketsphinx', '5.0.3' ]
33 verbose addNamed [ '5.0.3', '5.0.3' ]
34 silly lockFile 1d3f2c9d-pocketsphinx-5-0-3 [email protected]
35 verbose lock [email protected] /home/anuradha/.npm/1d3f2c9d-pocketsphinx-5-0-3.lock
36 silly lockFile 1d3f2c9d-pocketsphinx-5-0-3 [email protected]
37 silly lockFile 1d3f2c9d-pocketsphinx-5-0-3 [email protected]
38 silly lockFile 2dd57e8a-pocketsphinx pocketsphinx@
39 silly lockFile 2dd57e8a-pocketsphinx pocketsphinx@
40 silly resolved [ { name: 'pocketsphinx',
40 silly resolved     version: '5.0.3',
40 silly resolved     description: 'Node binding for continuous voice recoginition through pocketsphinx.',
40 silly resolved     repository:
40 silly resolved      { type: 'git',
40 silly resolved        url: 'git://github.com/cmusphinx/node-pocketsphinx.git' },
40 silly resolved     main: 'index.js',
40 silly resolved     scripts:
40 silly resolved      { test: 'echo "Error: no test specified" && exit 1',
40 silly resolved        install: 'node-gyp -v rebuild' },
40 silly resolved     keywords:
40 silly resolved      [ 'pocketsphinx',
40 silly resolved        'cmusphinx',
40 silly resolved        'speech',
40 silly resolved        'speech recognition',
40 silly resolved        'voice' ],
40 silly resolved     author: { name: 'Alpha Cephei Inc.' },
40 silly resolved     license: 'BSD-2-Clause',
40 silly resolved     gypfile: true,
40 silly resolved     gitHead: '55ae3bc1e5423dfc3992b8400ed515c4c55df68f',
40 silly resolved     bugs: { url: 'https://github.com/cmusphinx/node-pocketsphinx/issues' },
40 silly resolved     homepage: 'https://github.com/cmusphinx/node-pocketsphinx#readme',
40 silly resolved     _id: '[email protected]',
40 silly resolved     _shasum: 'ad033183ffb1637b019826e9b3bb296cb39fcc5d',
40 silly resolved     _from: 'pocketsphinx@',
40 silly resolved     _npmVersion: '3.3.12',
40 silly resolved     _nodeVersion: '5.2.0',
40 silly resolved     _npmUser: { name: 'nshmyrev', email: '[email protected]' },
40 silly resolved     dist:
40 silly resolved      { shasum: 'ad033183ffb1637b019826e9b3bb296cb39fcc5d',
40 silly resolved        tarball: 'http://registry.npmjs.org/pocketsphinx/-/pocketsphinx-5.0.3.tgz' },
40 silly resolved     maintainers: [ [Object], [Object] ],
40 silly resolved     directories: {},
40 silly resolved     _resolved: 'https://registry.npmjs.org/pocketsphinx/-/pocketsphinx-5.0.3.tgz',
40 silly resolved     readme: 'ERROR: No README data found!' } ]
41 info install [email protected] into /home/anuradha
42 info installOne [email protected]
43 verbose node_modules/pocketsphinx unbuild
44 verbose tar unpack /home/anuradha/.npm/pocketsphinx/5.0.3/package.tgz
45 silly lockFile 31f86d19-uradha-node-modules-pocketsphinx tar:///home/anuradha/node_modules/pocketsphinx
46 verbose lock tar:///home/anuradha/node_modules/pocketsphinx /home/anuradha/.npm/31f86d19-uradha-node-modules-pocketsphinx.lock
47 silly lockFile f97b3131-m-pocketsphinx-5-0-3-package-tgz tar:///home/anuradha/.npm/pocketsphinx/5.0.3/package.tgz
48 verbose lock tar:///home/anuradha/.npm/pocketsphinx/5.0.3/package.tgz /home/anuradha/.npm/f97b3131-m-pocketsphinx-5-0-3-package-tgz.lock
49 silly gunzTarPerm modes [ '775', '664' ]
50 silly gunzTarPerm extractEntry package.json
51 silly gunzTarPerm extractEntry .npmignore
52 silly gunzTarPerm extractEntry README.md
53 silly gunzTarPerm extractEntry LICENSE
54 silly gunzTarPerm extractEntry index.js
55 silly gunzTarPerm extractEntry binding.gyp
56 silly gunzTarPerm extractEntry demo/test.js
57 silly gunzTarPerm extractEntry wrap_ps.cpp
58 silly gunzTarPerm extractEntry wrap_sb.cpp
59 silly lockFile 31f86d19-uradha-node-modules-pocketsphinx tar:///home/anuradha/node_modules/pocketsphinx
60 silly lockFile 31f86d19-uradha-node-modules-pocketsphinx tar:///home/anuradha/node_modules/pocketsphinx
61 silly lockFile f97b3131-m-pocketsphinx-5-0-3-package-tgz tar:///home/anuradha/.npm/pocketsphinx/5.0.3/package.tgz
62 silly lockFile f97b3131-m-pocketsphinx-5-0-3-package-tgz tar:///home/anuradha/.npm/pocketsphinx/5.0.3/package.tgz
63 info preinstall [email protected]
64 verbose readDependencies using package.json deps
65 verbose readDependencies using package.json deps
66 silly resolved []
67 verbose about to build /home/anuradha/node_modules/pocketsphinx
68 info build /home/anuradha/node_modules/pocketsphinx
69 verbose linkStuff [ false, false, false, '/home/anuradha/node_modules' ]
70 info linkStuff [email protected]
71 verbose linkBins [email protected]
72 verbose linkMans [email protected]
73 verbose rebuildBundles [email protected]
74 info install [email protected]
75 verbose unsafe-perm in lifecycle true
76 info [email protected] Failed to exec install script
77 verbose node_modules/pocketsphinx unbuild
78 warn This failure might be due to the use of legacy binary "node"
79 warn For further explanations, please read
/usr/share/doc/nodejs/README.Debian
80 info preuninstall [email protected]
81 info uninstall [email protected]
82 verbose true,/home/anuradha/node_modules,/home/anuradha/node_modules unbuild [email protected]
83 info postuninstall [email protected]
84 error [email protected] install: `node-gyp -v rebuild`
84 error Exit status 1
85 error Failed at the [email protected] install script.
85 error This is most likely a problem with the pocketsphinx package,
85 error not with npm itself.
85 error Tell the author that this fails on your system:
85 error     node-gyp -v rebuild
85 error You can get their info via:
85 error     npm owner ls pocketsphinx
85 error There is likely additional logging output above.
86 error System Linux 3.19.0-31-generic
87 error command "/usr/bin/nodejs" "/usr/bin/npm" "install" "pocketsphinx"
88 error cwd /home/anuradha/WORK/RESEARCH/new
89 error node -v v0.10.25
90 error npm -v 1.4.21
91 error code ELIFECYCLE
92 verbose exit [ 1, true ]

Assertion `val->IsUint8Array()' failed.

/usr/bin/nodejs[2396]: ../src/node_buffer.cc:197:char* node::Buffer::Data(v8::Local<v8::Value>): Assertion val->IsUint8Array()' failed.
1: node::Abort() [node]
2: node::Assert(char const* const () [4]) [node]
3: 0x556e0f2d54ac [node]
4: 0x7fee85c94ed3 [/home/dennis/discord-bot/node_modules/pocketsphinx/build/Release/PocketSphinx.node]
5: v8::internal::FunctionCallbackArguments::Call(void (
)(v8::FunctionCallbackInfov8::Value const&)) [node]
6: 0x556e0eba094e [node]
7: 0x556e0eba11df [node]
8: 0x256f353092a7
Aborted (core dumped)`

i get this error. while using this peace of code:

` var readable = receiver.createPCMStream(user)

            decoder.startUtt();
            decoder.processRaw(readable, false, false);
            decoder.endUtt();
            console.log(decoder.hyp())`

the createPCMStream returns a readable stream.

im running node v6.9.5

Installation Fails on Raspberry Pi2 / Pi3

Here's what is installed

CMAKE

pi@raspberrypi:~ $ cmake --version
cmake version 3.5.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

SWIG

pi@raspberrypi:~ $ swig -version

SWIG Version 3.0.8
Compiled with g++ [armv7l-unknown-linux-gnueabihf]
Configured options: +pcre
Please see http://www.swig.org for reporting bugs and further information

Then I installed cmake-js

pi@raspberrypi:~ $ npm install cmake-js -g
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
/usr/local/bin/cmake-js -> /usr/local/lib/node_modules/cmake-js/bin/cmake-js
/usr/local/lib
└── [email protected]

Now I tried installing this package using NPM and it still doesn't find right SWIG and it gives error

Could NOT find SWIG: Found unsuitable version "2.0.12", but required is at
least "3.0.7" (found /usr/bin/swig2.0)

pi@raspberrypi:~ $ npm install pocketsphinx -g

> [email protected] install /usr/local/lib/node_modules/pocketsphinx
> cmake-js compile

(node:3499) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info CMD CONFIGURE
info RUN cmake "/usr/local/lib/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.2.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/usr/local/lib/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v6.1.0/include/node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="6.1.0" -DNODE_ARCH="arm" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
CMake Error at /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find SWIG: Found unsuitable version "2.0.12", but required is at
  least "3.0.7" (found /usr/bin/swig2.0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.5/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/usr/local/lib/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/usr/local/lib/node_modules/pocketsphinx/build"
info CMD CONFIGURE
info RUN cmake "/usr/local/lib/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.2.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/usr/local/lib/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v6.1.0/include/node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="6.1.0" -DNODE_ARCH="arm" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
CMake Error at /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
 Could NOT find SWIG: Found unsuitable version "2.0.12", but required is at
  least "3.0.7" (found /usr/bin/swig2.0)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.5/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "/usr/local/lib/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".
ERR! OMG Process terminated: 1
npm ERR! Linux 4.4.9-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx" "-g"
npm ERR! node v6.1.0
npm ERR! npm  v3.9.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `cmake-js compile`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cmake-js compile
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pocketsphinx
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/npm-debug.log

I don't have the nodejs package swig installed. What's the issue here?

Install fails also with node 6.10

When i try to install i get an issue with swig not getting the right path.
It looks like that "pkg-config --variable datadir sphinxbase OUTPUT_VARIABLE SB_DATADIR OUTPUT_STRIP_TRAILING_WHITESPACE" does not set the right variable anymore.


[email protected] install /home/pi/node_modules/pocketsphinx
cmake-js compile

info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info CMD CONFIGURE
WARN invalid config loglevel="notice"
info RUN cmake "/home/pi/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.4.1" -DCMAKE_BUILD_TYPE="Release
" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v6.10.3/include/
node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="6.10.3" -DNODE_ARCH="arm" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.0.0", minimum required is "3.0.7")
-- Checking for module 'sphinxbase>=5prealpha'
-- Found sphinxbase, version 5prealpha
-- Checking for module 'pocketsphinx>=5prealpha'
-- Found pocketsphinx, version 5prealpha
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/node_modules/pocketsphinx/build
info CMD BUILD
info RUN cmake --build "/home/pi/node_modules/pocketsphinx/build" --config Release
[ 16%] Generating swig bindings
Unable to find file '/swig/sphinxbase.i'.
sphinxbase/CMakeFiles/SphinxBase.dir/build.make:61: recept voor doel 'sphinxbase/sb.cpp' is mislukt
make[2]: *** [sphinxbase/sb.cpp] Fout 1
CMakeFiles/Makefile2:85: recept voor doel 'sphinxbase/CMakeFiles/SphinxBase.dir/all' is mislukt
make[1]: *** [sphinxbase/CMakeFiles/SphinxBase.dir/all] Fout 2
Makefile:83: recept voor doel 'all' is mislukt
make: *** [all] Fout 2
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/home/pi/node_modules/pocketsphinx/build"
info CMD CONFIGURE
info RUN cmake "/home/pi/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_JS_VERSION="3.4.1" -DCMAKE_BUILD_TYPE="Release
" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v6.10.3/include/
node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="6.10.3" -DNODE_ARCH="arm" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.0.0", minimum required is "3.0.7")
-- Checking for module 'sphinxbase>=5prealpha'
-- Found sphinxbase, version 5prealpha
-- Checking for module 'pocketsphinx>=5prealpha'
-- Found pocketsphinx, version 5prealpha
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/node_modules/pocketsphinx/build
info CMD BUILD
info RUN cmake --build "/home/pi/node_modules/pocketsphinx/build" --config Release
[ 16%] Generating swig bindings
Unable to find file '/swig/sphinxbase.i'.
sphinxbase/CMakeFiles/SphinxBase.dir/build.make:61: recept voor doel 'sphinxbase/sb.cpp' is mislukt
make[2]: *** [sphinxbase/sb.cpp] Fout 1
CMakeFiles/Makefile2:85: recept voor doel 'sphinxbase/CMakeFiles/SphinxBase.dir/all' is mislukt
make[1]: *** [sphinxbase/CMakeFiles/SphinxBase.dir/all] Fout 2
Makefile:83: recept voor doel 'all' is mislukt
make: *** [all] Fout 2
ERR! OMG Process terminated: 2
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2017-06-03T10_52_23_959Z-debug.log

npm install fails on raspberry pi 2

Versions installed
cmake version 3.5.2
SWIG Version 3.0.7
$PKG_CONFIG_PATH = /usr/local/lib/pkgconfig
pkg-config --modversion pocketsphinx = 5prealpha

When I run >npm install pocketsphinx I get the following error

$ npm install pocketsphinx
|

[email protected] install /home/pi/node_modules/pocketsphinx
cmake-js compile

info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info CMD CONFIGURE
info RUN cmake "/home/pi/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v4.3.2/include/node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="4.3.2" -DNODE_ARCH="arm" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
CMake Error at /usr/local/share/cmake-3.5/Modules/FindSWIG.cmake:50 (message):
Command "/home/pi/node_modules/.bin/swig -swiglib" failed with output:

Usage:
/usr/local/bin/node ../../.bin/swig compile [files] [options]
/usr/local/bin/node ../../.bin/swig run [files] [options]
/usr/local/bin/node ../../.bin/swig render [files] [options]

Options:

-v, --version  Show the Swig version number.
-o, --output   Output location.                                                                     [default: "stdout"]
-h, --help     Show this help screen.
-j, --json     Variable context as a JSON file.
-c, --context  Variable context as a CommonJS-style file. Used only if option `j` is not provided.
-m, --minify   Minify compiled functions with uglify-js
--filters      Custom filters as a CommonJS-style file
--tags         Custom tags as a CommonJS-style file
--options      Customize Swig's Options from a CommonJS-style file
--wrap-start   Template wrapper beginning for "compile".                                            [default: "var tpl = "]
--wrap-end     Template wrapper end for "compile".                                                  [default: ";"]
--method-name  Method name to set template to and run from.                                         [default: "tpl"]

[Error]

Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)

CMake Error at /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find SWIG (missing: SWIG_DIR) (Required is at least version
"3.0.7")
Call Stack (most recent call first):
/usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.5/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/pi/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/home/pi/node_modules/pocketsphinx/build"
info CMD CONFIGURE
info RUN cmake "/home/pi/node_modules/pocketsphinx" --no-warn-unused-cli -G"Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/home/pi/node_modules/pocketsphinx/build/Release" -DCMAKE_JS_INC="/home/pi/.cmake-js/node-arm/v4.3.2/include/node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="4.3.2" -DNODE_ARCH="arm" -DCMAKE_CXX_FLAGS="-std=c++11"
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
CMake Error at /usr/local/share/cmake-3.5/Modules/FindSWIG.cmake:50 (message):
Command "/home/pi/node_modules/.bin/swig -swiglib" failed with output:

Usage:
/usr/local/bin/node ../../.bin/swig compile [files] [options]
/usr/local/bin/node ../../.bin/swig run [files] [options]
/usr/local/bin/node ../../.bin/swig render [files] [options]

Options:

-v, --version  Show the Swig version number.
-o, --output   Output location.                                                                     [default: "stdout"]
-h, --help     Show this help screen.
-j, --json     Variable context as a JSON file.
-c, --context  Variable context as a CommonJS-style file. Used only if option `j` is not provided.
-m, --minify   Minify compiled functions with uglify-js
--filters      Custom filters as a CommonJS-style file
--tags         Custom tags as a CommonJS-style file
--options      Customize Swig's Options from a CommonJS-style file
--wrap-start   Template wrapper beginning for "compile".                                            [default: "var tpl = "]
--wrap-end     Template wrapper end for "compile".                                                  [default: ";"]
--method-name  Method name to set template to and run from.                                         [default: "tpl"]

[Error]

Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)

CMake Error at /usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find SWIG (missing: SWIG_DIR) (Required is at least version
"3.0.7")
Call Stack (most recent call first):
/usr/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.5/Modules/FindSWIG.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/pi/node_modules/pocketsphinx/build/CMakeFiles/CMakeOutput.log".
ERR! OMG Process terminated: 1
npm ERR! Linux 4.1.19-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js compile
npm ERR! You can get their info via:
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log

Raspberry Pi throws "error: expected class-name before ‘{’ token" on build

I started fresh on a Pi running Raspian with a new git pull / build of both sphinxbase and pocketsphinx. I made sure to export PKG_CONFIG_PATH before building. What works fine in OSX is hitting this error when I node-gyp rebuild:

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn python2
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/joshua.birk/sphinx/node-pocketsphinx/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/joshua.birk/.node-gyp/0.12.0/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/joshua.birk/.node-gyp/0.12.0',
gyp info spawn args '-Dmodule_root_dir=/home/joshua.birk/sphinx/node-pocketsphinx',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp infomake: Entering directory '/home/joshua.birk/sphinx/node-pocketsphinx/build'
CXX(target) Release/obj.target/PocketSphinx/src/Factory.o
spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
In file included from ../src/Factory.cpp:2:0:
../src/Recognizer.h:12:1: error: expected class-name before ‘{’ token
../src/Recognizer.h:20:41: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:20:56: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:22:43: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:22:58: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:23:42: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:23:57: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:24:45: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:24:60: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:26:43: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:26:58: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:27:47: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:27:62: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:29:56: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:29:71: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:30:55: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:30:70: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:31:54: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:31:69: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:32:52: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:32:67: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:34:85: error: ‘AccessorInfo’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:34:103: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
../src/Recognizer.h:35:90: error: ‘AccessorInfo’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:35:108: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
../src/Recognizer.h:37:47: error: ‘Arguments’ in namespace ‘v8’ does not name a type
../src/Recognizer.h:37:62: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/Recognizer.h:40:26: error: ‘uv_work_t’ has not been declared
../src/Recognizer.h:41:25: error: ‘uv_work_t’ has not been declared
PocketSphinx.target.mk:88: recipe for target 'Release/obj.target/PocketSphinx/src/Factory.o' failed
make: *** [Release/obj.target/PocketSphinx/src/Factory.o] Error 1
make: Leaving directory '/home/joshua.birk/sphinx/node-pocketsphinx/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.18.7-v7+
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/joshua.birk/sphinx/node-pocketsphinx
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok

Problem compiling in OS X

Hi,
I've installed sphinxbase (5prealpha) and pocketsphinx (5prealpha) from git, set the PKG_CONFIG_PATH environment var to /usr/local/lib/pkgconfig and get the following errors when trying to compile node-pocketsphinx:

$ npm install
npm WARN package.json [email protected] license should be a valid SPDX license expression

> [email protected] install /Users/mm/Documents/development/node-pocketsphinx/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node

> [email protected] install /Users/mm/Documents/development/node-pocketsphinx/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

> [email protected] install /Users/mm/Documents/development/node-pocketsphinx
> node-gyp rebuild

  CXX(target) Release/obj.target/PocketSphinx/src/Factory.o
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:11:33: error: expected class name
class Recognizer : public node::ObjectWrap
                                ^
../src/Recognizer.h:20:41: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> New(const v8::Arguments& args);
                                               ^~~~~~~~~~~~~
                                               v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:22:43: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Start(const v8::Arguments& args);
                                                 ^~~~~~~~~~~~~
                                                 v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:23:42: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Stop(const v8::Arguments& args);
                                                ^~~~~~~~~~~~~
                                                v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:24:45: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Restart(const v8::Arguments& args);
                                                   ^~~~~~~~~~~~~
                                                   v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:26:43: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> Write(const v8::Arguments& args);
                                                 ^~~~~~~~~~~~~
                                                 v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:27:47: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> WriteSync(const v8::Arguments& args);
                                                     ^~~~~~~~~~~~~
                                                     v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:29:56: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> AddKeyphraseSearch(const v8::Arguments& args);
                                                              ^~~~~~~~~~~~~
                                                              v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:30:55: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> AddKeywordsSearch(const v8::Arguments& args);
                                                             ^~~~~~~~~~~~~
                                                             v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:31:54: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> AddGrammarSearch(const v8::Arguments& args);
                                                            ^~~~~~~~~~~~~
                                                            v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:32:52: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> AddNgramSearch(const v8::Arguments& args);
                                                          ^~~~~~~~~~~~~
                                                          v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:34:89: error: no type named 'AccessorInfo' in namespace 'v8'
        static v8::Handle<v8::Value> GetSearch(const v8::Local<v8::String> property, const v8::AccessorInfo& info);
                                                                                           ~~~~^
../src/Recognizer.h:35:94: error: no type named 'AccessorInfo' in namespace 'v8'
        static void SetSearch(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
                                                                                                ~~~~^
../src/Recognizer.h:37:47: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> FromFloat(const v8::Arguments& args);
                                                     ^~~~~~~~~~~~~
                                                     v8::internal::Arguments
/Users/mm/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Factory.cpp:2:
../src/Recognizer.h:40:26: error: unknown type name 'uv_work_t'
        static void AsyncWorker(uv_work_t* request);
                                ^
../src/Recognizer.h:41:25: error: unknown type name 'uv_work_t'
        static void AsyncAfter(uv_work_t* request);
                               ^
16 errors generated.
make: *** [Release/obj.target/PocketSphinx/src/Factory.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mm/Documents/development/node-pocketsphinx
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 

npm ERR! Darwin 15.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mm/Documents/development/node-pocketsphinx/npm-debug.log

Problem compilig in ubuntu 15.04

Hi
I'm getting

node-pocketsphinx$ npm install

> [email protected] install /home/artem/build/ps/node-pocketsphinx
> node-gyp rebuild

make: вход в каталог «/home/artem/build/ps/node-pocketsphinx/build»
  CXX(target) Release/obj.target/PocketSphinx/src/Factory.o
  CXX(target) Release/obj.target/PocketSphinx/src/Recognizer.o
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddKeyphraseSearch(const v8::Arguments&)’:
../src/Recognizer.cpp:109:64: error: ‘ps_set_keyphrase’ was not declared in this scope
   int result = ps_set_keyphrase(instance->ps, *name, *keyphrase);
                                                                ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddKeywordsSearch(const v8::Arguments&)’:
../src/Recognizer.cpp:133:53: error: ‘ps_set_kws’ was not declared in this scope
   int result = ps_set_kws(instance->ps, *name, *file);
                                                     ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddGrammarSearch(const v8::Arguments&)’:
../src/Recognizer.cpp:157:59: error: ‘ps_set_jsgf_file’ was not declared in this scope
   int result = ps_set_jsgf_file(instance->ps, *name, *file);
                                                           ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::AddNgramSearch(const v8::Arguments&)’:
../src/Recognizer.cpp:181:57: error: ‘ps_set_lm_file’ was not declared in this scope
   int result = ps_set_lm_file(instance->ps, *name, *file);
                                                         ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::GetSearch(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../src/Recognizer.cpp:191:69: error: ‘ps_get_search’ was not declared in this scope
   Local<Value> search = String::NewSymbol(ps_get_search(instance->ps));
                                                                     ^
../src/Recognizer.cpp: In static member function ‘static void Recognizer::SetSearch(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&)’:
../src/Recognizer.cpp:201:38: error: ‘ps_set_search’ was not declared in this scope
   ps_set_search(instance->ps, *search);
                                      ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::Start(const v8::Arguments&)’:
../src/Recognizer.cpp:207:41: error: too few arguments to function ‘int ps_start_utt(ps_decoder_t*, const char*)’
   int result = ps_start_utt(instance->ps);
                                         ^
In file included from ../src/Recognizer.h:7:0,
                 from ../src/Recognizer.cpp:2:
/usr/local/include/pocketsphinx/pocketsphinx.h:363:5: note: declared here
 int ps_start_utt(ps_decoder_t *ps, char const *uttid);
     ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::Restart(const v8::Arguments&)’:
../src/Recognizer.cpp:227:41: error: too few arguments to function ‘int ps_start_utt(ps_decoder_t*, const char*)’
   int result = ps_start_utt(instance->ps);
                                         ^
In file included from ../src/Recognizer.h:7:0,
                 from ../src/Recognizer.cpp:2:
/usr/local/include/pocketsphinx/pocketsphinx.h:363:5: note: declared here
 int ps_start_utt(ps_decoder_t *ps, char const *uttid);
     ^
../src/Recognizer.cpp: In static member function ‘static v8::Handle<v8::Value> Recognizer::WriteSync(const v8::Arguments&)’:
../src/Recognizer.cpp:290:52: error: too few arguments to function ‘const char* ps_get_hyp(ps_decoder_t*, int32*, const char**)’
   const char* hyp = ps_get_hyp(instance->ps, &score);
                                                    ^
In file included from ../src/Recognizer.h:7:0,
                 from ../src/Recognizer.cpp:2:
/usr/local/include/pocketsphinx/pocketsphinx.h:449:13: note: declared here
 char const *ps_get_hyp(ps_decoder_t *ps, int32 *out_best_score,
             ^
../src/Recognizer.cpp: In static member function ‘static void Recognizer::AsyncWorker(uv_work_t*)’:
../src/Recognizer.cpp:308:58: error: too few arguments to function ‘const char* ps_get_hyp(ps_decoder_t*, int32*, const char**)’
   const char* hyp = ps_get_hyp(data->instance->ps, &score);
                                                          ^
In file included from ../src/Recognizer.h:7:0,
                 from ../src/Recognizer.cpp:2:
/usr/local/include/pocketsphinx/pocketsphinx.h:449:13: note: declared here
 char const *ps_get_hyp(ps_decoder_t *ps, int32 *out_best_score,
             ^
PocketSphinx.target.mk:87: ошибка выполнения рецепта для цели «Release/obj.target/PocketSphinx/src/Recognizer.o»
make: *** [Release/obj.target/PocketSphinx/src/Recognizer.o] Ошибка 1
make: выход из каталога «/home/artem/build/ps/node-pocketsphinx/build»
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-21-lowlatency
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/artem/build/ps/node-pocketsphinx
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.19.0-21-lowlatency
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/artem/build/ps/node-pocketsphinx
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/artem/build/ps/node-pocketsphinx/npm-debug.log
npm ERR! not ok code 0

Methods

Hello
Which methods does supported by this library?
only Decoder or anything else? where can I get this info?
And how can I use JSGF rules?
thank you

Error: Module version mismatch. Expected 49, got 48.

Hello,

I've installed sphinxbase and pocketphinx from the github repository as per the README on my OSX El Capitan.

I managed to compile node-pocketsphinx properly with cmake-js, and tried the commands on the Readme to test that pocketsphinx is indeed working. However, i'm getting the Module version mismatch error whenever I try to call the module on npm start.

My node version is v6.2.2 and npm is 3.9.5.

I tried reinstalling the entire node_modules by deleting it and reinstalling, and even re-downloaded node and npm, but to no avail.

Any ideas?

does not contain acoustic

ERROR: "acmod.c", line 79: Folder '/home/ubuntu/voice/www/static/en-us/en-us' does not contain acoustic model definition 'mdef'
Segmentation fault (core dumped)

How I run on node v6.2.2 with npm 3.10.6?

This is my error, I tried with sudo, -g, withou --save-dev and downloading the project, but without success.
Could you help me?

`_ npm install pocketsphinx --save-dev

[email protected] install /node_modules/pocketsphinx
cmake-js compile

(node:5545) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5545) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info REP Build has been failed, trying to do a full rebuild.
ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! Linux 4.6.0-040600-lowlatency
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx" "--save-dev"
npm ERR! node v6.2.2
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js compile
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pocketsphinx
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.`

Generate Time Stamps in Logs

Currently I am using pocketsphinx in kws mode connected up to my microphone. Its working well, but randomly stops working after many hours of use. My microphone data is still streaming and working, but pocketsphinx seems to have stopped. Is it possible to get time stamps in the logs? Also what are all the logging options available to me?

An example would be awesome...here is what I have been using:

var config = new ps.Decoder.defaultConfig();
config.setString("-hmm", modeldir + "en-us");
config.setString("-dict", ashiyaModelDir + "4932.dic");
config.setString("-kws", "keyphrase.txt");
config.setString("-logfn", "pocketsphinx-logs.txt");
var decoder = new ps.Decoder(config);

Error: libpocketsphinx.so.3: cannot open shared object file: No such file or directory

I just don't understand why I am getting this error.

When I try to load node-pocketshinx I get the above error on this line:

var PocketSphinx = require('./build/Release/PocketSphinx.node');

This is my LD path

:/usr/local/lib $ echo $LD_LIBRARY_PATH
/usr/local/lib:~/.c9/local/lib

And here is what it contains.

:/usr/local/lib $ ls
libpocketsphinx.a    libpocketsphinx.so.3@      libsphinxad.la*    libsphinxad.so.3.0.0*   libsphinxbase.so@        pkgconfig/  site_ruby/
libpocketsphinx.la*  libpocketsphinx.so.3.0.0*  libsphinxad.so@    libsphinxbase.a        libsphinxbase.so.3@      python2.7/
libpocketsphinx.so@  libsphinxad.a              libsphinxad.so.3@  libsphinxbase.la*      libsphinxbase.so.3.0.0*  python3.4/

Not sure if this is an issue or me just being stupid but I've spent quite a while trying everything I could think of already.

Using Mic on Raspberry PI

For those who would like to use the audio directly from mic. They can use npm microphone. (NOTE: I was having issue installing Lame v1.0.2, therefore, I installed latest (v1.2.4) and copied the source)

Usage would look something like.

var fs = require('fs');
var ps = require('./build/Release/PocketSphinx.node');
var sb = require('./build/Release/SphinxBase.node');
var mic = require('./microphone'); // OR require('microphone');
modeldir = "../pocketsphinx-5prealpha/model/en-us/";

var config = new ps.Decoder.defaultConfig();
config.setString("-hmm", modeldir + "en-us");
config.setString("-dict", modeldir + "cmudict-en-us.dict");
config.setString("-lm", modeldir + "en-us.lm.bin");

var decoder = new ps.Decoder(config);

mic.startCapture();
mic.audioStream.on('data', function(data) {
        decoder.startUtt();
        decoder.processRaw(data, false, false);
        decoder.endUtt();
        console.log(decoder.hyp())
});
//mic.stopCapture();

Error while installing Pocketsphinx in nodejs

I try to use the Pocketsphinx in my nodejs project while installing this I am getting this error

pm ERR! Linux 3.16.0-77-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pocketsphinx"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! This is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js compile
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pocketsphinx
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

Please,help me to solve this error.

Thanks in advance.

Error with npm install on Intel Edison

I'm trying to get this on the Intel Edison. However, when I type npm install pocketsphinx it gives me the following errors:

ERR! OMG Process terminated: 1

npm ERR! [email protected] install: cmake-js compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the pocket sphinx package
npm ERR! not with nam itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cmake-js compile
npm ERR! You can get their info via:
npm ERR! npm owner ls pocket sphinx
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.10.17-poky-edison+
npm ERR! command "node" "/usr/bin/npm" "install" "pocket sphinx
npm ERR! cwd /home/root/Sphinx
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

The module PocketSphinx.node was compiled against a different Node.js version using NODE_MODULE_VERSION 48

Hello,

When I call node-pocketsphinx's decoder, I get the following error:

Uncaught Error: The module '/Users/3id0/dev/muthex-test/node_modules/pocketsphinx/build/Release/PocketSphinx.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using npm rebuild ornpm install).", source: ELECTRON_ASAR.js

Here is my javascript file just in case:

var fs = require('fs');

var ps = require('pocketsphinx').ps;

modeldir = "../../pocketsphinx/model/en-us/"

var config = new ps.Decoder.defaultConfig();
config.setString("-hmm", modeldir + "en-us");
config.setString("-dict", modeldir + "cmudict-en-us.dict");
config.setString("-lm", modeldir + "en-us.lm.bin");
var decoder = new ps.Decoder(config);

const {desktopCapturer} = require('electron')

desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => {
  if (error) throw error
  for (let i = 0; i < sources.length; ++i) {
    if (sources[i].name === 'Electron') {
      navigator.mediaDevices.getUserMedia({
        audio: false,
        video: {
          mandatory: {
            chromeMediaSource: 'desktop',
            chromeMediaSourceId: sources[i].id,
            minWidth: 1280,
            maxWidth: 1280,
            minHeight: 720,
            maxHeight: 720
          }
        }
      }, handleStream, handleError)
      return
    }
  }
})

function handleStream (stream) {
  decoder.startUtt();
  decoder.processRaw(stream, false, false);
  decoder.endUtt();
  console.log(decoder.hyp())
}

function handleError (e) {
  console.log(e)
}

Is this a bug or am I doing something wrong?

I tried:
./node_modules/.bin/electron-rebuild
./node_modules/.bin/electron-rebuild -w pocketsphinx
npm install --abi=54
npm install --abi=48
npm rebuild
npm rebuild pocketsphinx
npm rebuild pocketsphinx --abi=54
npm rebuild pocketsphinx --abi=48
node-gyp rebuild

All without success.

How can I disable INFO output

Hi there,

First of all thanks! Great Job!

Second. I'd like to disable info output, is this considered in node-pocketsphinx?

Thanks!

npm install failed - CMake executable is not found

Hi there! Thanks for developing this great project, but right now I cannot successfully install via npm. I already did a npm install -g cmake-js and npm install -g pocketsphinx failed. Terminal output:

$ npm install -g pocketsphinx

> [email protected] install /usr/local/lib/node_modules/pocketsphinx
> cmake-js compile

info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info DIST Downloading distribution files.
http DIST   - http://nodejs.org/dist/v5.4.1/SHASUMS256.txt
http DIST   - http://nodejs.org/dist/v5.4.1/node-v5.4.1-headers.tar.gz
info REP Build has been failed, trying to do a full rebuild.
ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "pocketsphinx"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `cmake-js compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'cmake-js compile'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pocketsphinx package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cmake-js compile
npm ERR! You can get their info via:
npm ERR!     npm owner ls pocketsphinx
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/admin/npm-debug.log

Using MacOS X Yosemite
Node v5.4.1
npm v3.3.12

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.