{"id":13546543,"url":"https://github.com/cmusphinx/pocketsphinx","last_synced_at":"2025-05-13T19:08:22.155Z","repository":{"id":15774424,"uuid":"18513454","full_name":"cmusphinx/pocketsphinx","owner":"cmusphinx","description":"A small speech recognizer","archived":false,"fork":false,"pushed_at":"2024-10-14T15:15:27.000Z","size":210809,"stargazers_count":3936,"open_issues_count":38,"forks_count":717,"subscribers_count":160,"default_branch":"master","last_synced_at":"2024-10-29T11:48:33.202Z","etag":null,"topics":["c","python","speech-recognition"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"QuentinTorg/EncoderMod","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmusphinx.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-07T10:28:32.000Z","updated_at":"2024-10-29T01:50:00.000Z","dependencies_parsed_at":"2024-11-25T16:07:58.018Z","dependency_job_id":"edde91a0-010f-4dfa-b722-fb9a800c4b58","html_url":"https://github.com/cmusphinx/pocketsphinx","commit_stats":{"total_commits":2197,"total_committers":32,"mean_commits":68.65625,"dds":0.5543923532089212,"last_synced_commit":"7d375e136d2c6fa4f4c024f19526b3cbc056e8f6"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fpocketsphinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fpocketsphinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fpocketsphinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmusphinx%2Fpocketsphinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmusphinx","download_url":"https://codeload.github.com/cmusphinx/pocketsphinx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250291864,"owners_count":21406458,"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":["c","python","speech-recognition"],"created_at":"2024-08-01T12:00:39.869Z","updated_at":"2025-04-22T17:51:53.334Z","avatar_url":"https://github.com/cmusphinx.png","language":"C","readme":"PocketSphinx 5.0.3\n==================\n\nThis is PocketSphinx, one of Carnegie Mellon University's open source large\nvocabulary, speaker-independent continuous speech recognition engines.\n\nAlthough this was at one point a research system, active development\nhas largely ceased and it has become very, very far from the state of\nthe art.  I am making a release, because people are nonetheless using\nit, and there are a number of historical errors in the build system\nand API which needed to be corrected.\n\nThe version number is strangely large because there was a \"release\"\nthat people are using called 5prealpha, and we will use proper\n[semantic versioning](https://semver.org/) from now on.\n\n**Please see the LICENSE file for terms of use.**\n\nInstallation\n------------\n\nWe now use CMake for building, which should give reasonable results\nacross Linux and Windows.  Not certain about Mac OS X because I don't\nhave one of those.  In addition, the audio library, which never really\nbuilt or worked correctly on any platform at all, has simply been\nremoved.\n\nThere is no longer any dependency on SphinxBase.  There is no\nSphinxBase anymore.  This is not the SphinxBase you're looking for.\nAll your SphinxBase are belong to us.\n\nTo install the Python module in a virtual environment (replace\n`~/ve_pocketsphinx` with the virtual environment you wish to create),\nfrom the top level directory:\n\n```\npython3 -m venv ~/ve_pocketsphinx\n. ~/ve_pocketsphinx/bin/activate\npip install .\n```\n\nTo install the C library and bindings (assuming you have access to\n/usr/local - if not, use `-DCMAKE_INSTALL_PREFIX` to set a different\nprefix in the first `cmake` command below):\n\n```\ncmake -S . -B build\ncmake --build build\ncmake --build build --target install\n```\n\nUsage\n-----\n\nThe `pocketsphinx` command-line program reads single-channel 16-bit\nPCM audio from standard input or one or more files, and attempts to\nrecognize speech in it using the default acoustic and language model.\nIt accepts a large number of options which you probably don't care\nabout, a *command* which defaults to `live`, and one or more inputs\n(except in `align` mode), or `-` to read from standard input.\n\nIf you have a single-channel WAV file called \"speech.wav\" and you want\nto recognize speech in it, you can try doing this (the results may not\nbe wonderful):\n\n    pocketsphinx single speech.wav\n    \nIf your input is in some other format I suggest converting it with\n`sox` as described below.\n\nThe commands are as follows:\n\n  - `help`: Print a long list of those options you don't care about.\n  \n  - `config`: Dump configuration as JSON to standard output (can be\n    loaded with the `-config` option).\n\n  - `live`: Detect speech segments in each input, run recognition\n    on them (using those options you don't care about), and write the\n    results to standard output in line-delimited JSON.  I realize this\n    isn't the prettiest format, but it sure beats XML.  Each line\n    contains a JSON object with these fields, which have short names\n    to make the lines more readable:\n    \n    - `b`: Start time in seconds, from the beginning of the stream\n    - `d`: Duration in seconds\n    - `p`: Estimated probability of the recognition result, i.e. a\n      number between 0 and 1 representing the likelihood of the input\n      according to the model\n    - `t`: Full text of recognition result\n    - `w`: List of segments (usually words), each of which in turn\n      contains the `b`, `d`, `p`, and `t` fields, for start, end,\n      probability, and the text of the word.  If `-phone_align yes`\n      has been passed, then a `w` field will be present containing\n      phone segmentations, in the same format.\n\n  - `single`: Recognize each input as a single utterance, and write a\n    JSON object in the same format described above.\n    \n  - `align`: Align a single input file (or `-` for standard input) to\n    a word sequence, and write a JSON object in the same format\n    described above.  The first positional argument is the input, and\n    all subsequent ones are concatenated to make the text, to avoid\n    surprises if you forget to quote it.  You are responsible for\n    normalizing the text to remove punctuation, uppercase, centipedes,\n    etc. For example:\n    \n        pocketsphinx align goforward.wav \"go forward ten meters\"\n        \n    By default, only word-level alignment is done.  To get phone\n    alignments, pass `-phone_align yes` in the flags, e.g.:\n    \n        pocketsphinx -phone_align yes align audio.wav $text\n        \n    This will make not particularly readable output, but you can use\n    [jq](https://stedolan.github.io/jq/) to clean it up.  For example,\n    you can get just the word names and start times like this:\n    \n        pocketsphinx align audio.wav $text | jq '.w[]|[.t,.b]'\n        \n    Or you could get the phone names and durations like this:\n    \n        pocketsphinx -phone_align yes align audio.wav $text | jq '.w[]|.w[]|[.t,.d]'\n        \n    There are many, many other possibilities, of course.\n\n  - `soxflags`: Return arguments to `sox` which will create the\n    appropriate input format.  Note that because the `sox`\n    command-line is slightly quirky these must always come *after* the\n    filename or `-d` (which tells `sox` to read from the microphone).\n    You can run live recognition like this:\n    \n        sox -d $(pocketsphinx soxflags) | pocketsphinx -\n\n    or decode from a file named \"audio.mp3\" like this:\n    \n        sox audio.mp3 $(pocketsphinx soxflags) | pocketsphinx -\n        \nBy default only errors are printed to standard error, but if you want\nmore information you can pass `-loglevel INFO`.  Partial results are\nnot printed, maybe they will be in the future, but don't hold your\nbreath.\n\nProgramming\n-----------\n\nFor programming, see the [examples directory](./examples/) for a\nnumber of examples of using the library from C and Python.  You can\nalso read the [documentation for the Python\nAPI](https://pocketsphinx.readthedocs.io) or [the C\nAPI](https://cmusphinx.github.io/doc/pocketsphinx/)\n\nAuthors\n-------\n\nPocketSphinx is ultimately based on `Sphinx-II` which in turn was\nbased on some older systems at Carnegie Mellon University, which were\nreleased as free software under a BSD-like license thanks to the\nefforts of Kevin Lenzo.  Much of the decoder in particular was written\nby Ravishankar Mosur (look for \"rkm\" in the comments), but various\nother people contributed as well, see [the AUTHORS file](./AUTHORS)\nfor more details.\n\nDavid Huggins-Daines (the author of this document) is\nresponsible for creating `PocketSphinx` which added\nvarious speed and memory optimizations, fixed-point computation, JSGF\nsupport, portability to various platforms, and a somewhat coherent\nAPI.  He then disappeared for a while.\n\nNickolay Shmyrev took over maintenance for quite a long time\nafterwards, and a lot of code was contributed by Alexander Solovets,\nVyacheslav Klimkov, and others.\n\nCurrently this is maintained by David Huggins-Daines again.\n","funding_links":[],"categories":["Audio","C","Multimedia","Software"],"sub_categories":["Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmusphinx%2Fpocketsphinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmusphinx%2Fpocketsphinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmusphinx%2Fpocketsphinx/lists"}