Menu

RuntimeError: new_Decoder returned -1

Help
2017-03-27
2018-07-15
  • danny banana

    danny banana - 2017-03-27

    Hey Im tryint to use cmusphinx to decode a sound file that since only numbers (numbers not digits) very monotnically but everytime i try a different acoustic model it gives me the error in the picture even if i didnt change the name just the files inside, ive tried so far an adapted version of the en-us and tidigits both fail with the same error.

     

    Last edit: danny banana 2017-03-27
    • Nickolay V. Shmyrev

      You need to provide the code you tried. You also need to enable verbose logging in order to see more information about the issue, remove the line

        config.set_string("-logfn", os.devnull)  # disable logging (logging causes unwanted output in terminal)
      

      in speech_recognition module sources.

       
      • danny banana

        danny banana - 2017-03-28

        Removed the line, verbosed image added, and that is the main part of the code, the rest is just determining the file and a bit of error correction but nothing that manipulates the sound detection itself, just a part that appends the audio files to a list so it can be recognised and something that takes the outputed text and corrects it.

        r = sr.Recognizer()
            with sr.AudioFile(f) as source:
                af = r.record(source)
                try:
                    out = r.recognize_sphinx(af)
                    #print(out)
                except sr.UnknownValueError:
                    print("Sphinx could not understand audio")
                    out = "and"
                except sr.RequestError as e:
                    print("Sphinx error; {0}".format(e))
        
         

        Last edit: danny banana 2017-03-28
        • Nickolay V. Shmyrev

          You need to remove feature_transform file from the model folder. Try to make sure that only the files of the model on device are matching the files of the model on desktop and it should help you.

           
          • danny banana

            danny banana - 2017-03-28

            i will remove the file once i get home i just didnt understand what you ment by keeping the files on device the same as those on desktop

             

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.