Menu

Out of memory error: Java Heap space

Help
gurucharan
2009-03-18
2012-09-22
  • gurucharan

    gurucharan - 2009-03-18

    Hi All,

    I am modifying wavfile program to recognize english grammer. For this I used WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar accoustic model. I have changed config.xml file of wavfile for this.
    I changed accoustic model, dictionary, grammer, linguistic part of config.xml. When I am trying to run this. I am getting Jave heap space Out of memory error.
    I have tried setting parameters to take 512 MB of heap space. even though it doesn't work.

    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOfRange(Unknown Source)
    at java.lang.String.<init>(Unknown Source)
    at java.io.BufferedReader.readLine(Unknown Source)
    at java.io.BufferedReader.readLine(Unknown Source)
    at edu.cmu.sphinx.linguist.dictionary.FastDictionary.loadDictionary(FastDictionary.java:205)
    at edu.cmu.sphinx.linguist.dictionary.FastDictionary.allocate(FastDictionary.java:163)
    at edu.cmu.sphinx.linguist.language.grammar.Grammar.allocate(Grammar.java:97)
    at edu.cmu.sphinx.linguist.flat.FlatLinguist.allocate(FlatLinguist.java:242)
    at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.allocate(SimpleBreadthFirstSearchManager.java:591)
    at edu.cmu.sphinx.decoder.AbstractDecoder.allocate(AbstractDecoder.java:67)
    at edu.cmu.sphinx.recognizer.Recognizer.allocate(Recognizer.java:157)
    at WavFile.main(WavFile.java:34)

    Please help me in resolving this error.
    Thanks in advance.

    Gurucharan

     
    • gurucharan

      gurucharan - 2009-03-18

      Hi All,
      I was able to figure out the problem. I gave 1024 memory as argument and few changes in config file.

      Thanks,
      Gurucharan

       
  • utkarsh

    utkarsh - 2012-01-02

    Hi gurucharan, could you please tell me what changes you made to the config
    file as I am facing the same problem.and possibly upload the config file.
    thanks in advance.

     

Log in to post a comment.