Wednesday 15 June 2011

Python 3.3 can't seem to find the decoder module in pocketsphinx library -


I get the error AttributeError:. 'Module' object has no attribute 'decoder' I have the following code I am using because there was no setup.py file so I DLS in your own folders and libraries manually dragon moved 33 Directory Had done it. (Library files in Lib and DLL in DLL) I am able to import Pocketfinds and Spinxbase modules without error. Any help would be appreciated.

  import pocketsphinx import sphinxbase LMD = "C: \ Python33 \ Lib \ site-packages \ pocketsphinx \ models \ LM \ HUB4_trigram_lm \ language_model.arpaformat" HMD = "C: \ Python33 \ Lib \ site-packages \ Pocketsphinx \ models \ hm \ en_US "dictd =" C: \ Python33 \ Lib \ site-packages \ Pocketsphinx \ models \ lM \ HUB4_trigram_lm \ language_model.vocabulary "FH = open ( 'test1.wav' , 'rb') fh.seek (44) decoder = pocketsphinx.Decoder (hmmd, LMD, dictp) nsamp = Decoder.decode_raw (FH) Hyp, uttid, score = decoder.get_hyp () print ( "Got result + Hyp + 'score' + points)    

nsamp = Decoder.decode_raw ( FH)

This Issa must be decoder.decode_raw (fh) . You are trying to see the decoder in the default module instead of the method in the object.

No comments:

Post a Comment