title: Why is python pocketsphinx giving TypeError?
body: <p>I am using the Python pocket sphinx tutorial, according to</p>
  
  <p><a href="https://metakermit.com/2011/python-speech-recognition-helloworld/" rel="nofollow noreferrer">https://metakermit.com/2011/python-speech-recognition-helloworld/</a></p>
  
  <p>(complete code here):</p>
  
  <pre><code>import sys,os
  
  def decodeSpeech(hmmd,lmdir,dictp,wavfile):
  """
  Decodes a speech file
  """
  
  try:
      import pocketsphinx as ps
      import sphinxbase
  
  except:
      print """Pocket sphinx and sphixbase is not installed
      in your system. Please install it with package manager.
      """
  
  speechRec = ps.Decoder(hmm = hmmd, lm = lmdir, dict = dictp)
  wavFile = file(wavfile,'rb')
  wavFile.seek(44)
  speechRec.decode_raw(wavFile)
  result = speechRec.get_hyp()
  
  return result[0]
  
  if __name__ == "__main__":
  hmdir = "/usr/share/pocketsphinx/model/hmm/en_US/"
  lmd = "/usr/share/pocketsphinx/model/lm/en_US/hub4.5000.DMP"
  dictd = "/usr/share/pocketsphinx/model/lm/en_US/cmu07a.dic"
  wavfile = sys.argv[1]
  recognised = decodeSpeech(hmdir,lmd,dictd,wavfile)
  
  print "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
  print recognised
  print "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
  </code></pre>
  
  <p>and when I run it I get the following error message:</p>
  
  <pre><code>Traceback (most recent call last):
  File "hello.py", line 30, in &lt;module&gt;
  recognised = decodeSpeech(hmdir,lmd,dictd,wavfile)
  File "hello.py", line 17, in decodeSpeech
  speechRec = ps.Decoder(hmm = hmmd, lm = lmdir, dict = dictp)
  TypeError: __init__() got an unexpected keyword argument 'hmm'
  </code></pre>
  
  <p>Could you help me?</p>