Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

New_Decoder returned -1 on Mac OS X 10.10.4 #3

Description

@gdbassett
from os import environ, path

from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *

MODELDIR = "/usr/local/share/pocketsphinx/model"
DATADIR = "/tmp/"

# Create a decoder with certain model
config = Decoder.default_config()
config.set_string('-hmm', path.join(MODELDIR, 'en-us/en-us'))
config.set_string('-lm', path.join(MODELDIR, 'en-us/en-us.lm.dmp'))
config.set_string('-dict', path.join(MODELDIR, 'en-us/cmudict-en-us.dict'))
decoder = Decoder(config)

Yields error:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-2-2bb98e99123c> in <module>()
      7 config.set_string('-lm', path.join(MODELDIR, 'en-us/en-us.lm.dmp'))
      8 config.set_string('-dict', path.join(MODELDIR, 'en-us/cmudict-en-us.dict'))
----> 9 decoder = Decoder(config)
     10 

/usr/local/lib/python2.7/site-packages/pocketsphinx/pocketsphinx.pyc in __init__(self, *args)
    268         __init__(Decoder self, Config config) -> Decoder
    269         """
--> 270         this = _pocketsphinx.new_Decoder(*args)
    271         try:
    272             self.this.append(this)

RuntimeError: new_Decoder returned -1

Not sure how to collect more debug information on this.

This occurs whether installing from source (pip install pocketsphinx) or homebrew (https://github.com/watsonbox/homebrew-cmu-sphinx)

$ pocketsphinx_continuous -inmic yes at the command line runs fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions