{"id":13741501,"url":"https://github.com/cmusphinx/node-pocketsphinx","last_synced_at":"2025-05-08T21:33:58.738Z","repository":{"id":17683321,"uuid":"20489198","full_name":"cmusphinx/node-pocketsphinx","owner":"cmusphinx","description":"Pocketsphinx bindings for Node.JS","archived":false,"fork":true,"pushed_at":"2019-03-12T07:04:18.000Z","size":73,"stargazers_count":243,"open_issues_count":7,"forks_count":47,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-02T04:03:18.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"moneppo/node-pocketsphinx","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmusphinx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-04T15:32:47.000Z","updated_at":"2024-11-03T23:41:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cmusphinx/node-pocketsphinx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fnode-pocketsphinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fnode-pocketsphinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fnode-pocketsphinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fnode-pocketsphinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmusphinx","download_url":"https://codeload.github.com/cmusphinx/node-pocketsphinx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253153163,"owners_count":21862318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T04:00:59.763Z","updated_at":"2025-05-08T21:33:58.492Z","avatar_url":"https://github.com/cmusphinx.png","language":"CMake","readme":"# PocketSphinx for Node.js\n\nThis module aims to allow basic speech recognition on portable devices\nthrough the use of PocketSphinx.\n\n## Installation\n\nWindows installation is not supported yet.\n\nTo build this module you need to have following dependencies:\n  \n  * node at least 4.2\n  * cmake at least version 3.1\n  * cmake-js https://github.com/cmake-js/cmake-js (install with `npm install -g cmake-js`) \n  * sphinxbase latest from github\n  * pocketsphinx latest from github\n  * swig at least 3.0.7\n  * pkg-config\n\nMake sure that pocketsphinx is installed properly, adjust LD_LIBRARY_PATH if libraries are not found. You can test pocketsphinx with\n\n     pocketsphinx_continuous -infile goforward.raw // Recognize goforward.raw file\n\nMake sure that PKG_CONFIG_PATH includes the folder where you installed pocketsphinx, for example, if you installed with default prefix, export PKG_CONFIG_PATH:\n\n     export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig\n\nYou can test installation with \n\n     pkg-config --modversion pocketsphinx // This should print the version\n\nTo build simply use npm install, it should detect everything automatically. Carefully read\nbuild logs in order to see if there are any issues.\n\n## Example\n\n```javascript\nvar fs = require('fs');\n\nvar ps = require('pocketsphinx').ps;\n\nmodeldir = \"../../pocketsphinx/model/en-us/\"\n\nvar config = new ps.Decoder.defaultConfig();\nconfig.setString(\"-hmm\", modeldir + \"en-us\");\nconfig.setString(\"-dict\", modeldir + \"cmudict-en-us.dict\");\nconfig.setString(\"-lm\", modeldir + \"en-us.lm.bin\");\nvar decoder = new ps.Decoder(config);\n\nfs.readFile(\"../../pocketsphinx/test/data/goforward.raw\", function(err, data) {\n    if (err) throw err;\n    decoder.startUtt();\n    decoder.processRaw(data, false, false);\n    decoder.endUtt();\n    console.log(decoder.hyp())\n});\n```\n","funding_links":[],"categories":["Software"],"sub_categories":["Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmusphinx%2Fnode-pocketsphinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmusphinx%2Fnode-pocketsphinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmusphinx%2Fnode-pocketsphinx/lists"}