Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9320529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:39:23+00:00 2026-06-19T03:39:23+00:00

I recently installed pocketsphinx modules on my mac running Lion and Python 2.7.3(Not Apple’s

  • 0

I recently installed pocketsphinx modules on my mac running Lion and Python 2.7.3(Not Apple’s built in python, but brewed). I tried to run the following code:

import pocketsphinx as p
decoder = p.Decoder(jsgf='/path_to_jsgf_file/grammar.jsgf',samprate='8000')
fh = open('myrecording.wav', 'rb')
nsamp = decoder.decode_raw(fh)
print 'You said,', hyp
print 'Your score was', score

But here’s the error I get on running import pocketsphinx as p :

Traceback (most recent call last):
File "speech_reco.py", line 4, in <module>
import pocketsphinx as p
File "sphinxbase.pxd", line 150, in init pocketsphinx (pocketsphinx.c:7935)
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object

However, it runs correctly when the import command is run the second time. Therefore, presently, I’m running a try-catch there and getting past the error. But I don’t know whether this still works.

This issue seems to have come up before,as discussed on this link: http://sourceforge.net/p/cmusphinx/bugs/284/

Has anyone fixed this issue yet? If not, would try- catch be the right way to get around this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T03:39:25+00:00Added an answer on June 19, 2026 at 3:39 am

    Has anyone fixed this issue yet? If not, would try- catch be the right way to get around this error?

    This Cython issue is fixed in later Cython

    If not, would try- catch be the right way to get around this error?

    The right way to get around this error is to recreate glue code with Cython. The last message in the bug report says that:

    http://sourceforge.net/p/cmusphinx/bugs/284/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently installed APC on my production server but It's not working as expected.
Recently installed Perl 5.16 and was able to install modules fine until today. Other
I recently installed KDevelop 4 for C++ development on my Macbook Pro running Ubuntu
I recently installed PHP on IIS/Windows 7, but it isn't working. I am getting
I recently installed the open-jdk 7 in my ubuntu server. But the version is
I recently installed a local version of an in-progress wordpress.org blog on my Mac
I recently installed CouchDB, but haven't gotten past the test suite yet. It seems
I recently installed MAMP version 1.6 on my MAC OS 10.5.7. Now I am
I recently installed mono for Android and today I tried to get started. In
I recently installed Mac OS X on my system. This is probably a very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.