Menu

Error while giving input from command prompt

Help
gurucharan
2009-04-29
2012-09-22
  • gurucharan

    gurucharan - 2009-04-29

    Hello,

    I am running wavFile demo with audio file as a parameter.
    java -jar bin/WavFile.jar ./edu/cmu/sphinx/demo/wavfile/65536.wav is my command.
    I have 65536.wav file in the same place as 12345.wav file(default one). But I am getting "File not found exception"
    as follows:

    audio url: file:/C:/sphinx4-1.0beta2-src/sphinx4-1.0beta2/./edu/cmu/sphinx/demo/
    wavfile/65536.wav
    Loading Recognizer as defined in 'jar:file:/C:/sphinx4-1.0beta2-src/sphinx4-1.0b
    eta2/bin/WavFile.jar!/edu/cmu/sphinx/demo/wavfile/config.xml'...

    java.io.FileNotFoundException: C:\sphinx4-1.0beta2-src\sphinx4-1.0beta2.\edu\cm
    u\sphinx\demo\wavfile\65536.wav (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown So
    urce)
    at java.net.URL.openStream(Unknown Source)
    at com.sun.media.sound.WaveFileReader.getAudioInputStream(Unknown Source
    )
    at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
    at edu.cmu.sphinx.frontend.util.AudioFileDataSource.setAudioFile(AudioFi
    leDataSource.java:145)
    at edu.cmu.sphinx.demo.wavfile.WavFile.main(WavFile.java:55)
    Exception in thread "main" java.lang.NullPointerException
    at edu.cmu.sphinx.frontend.util.AudioFileDataSource.setInputStream(Audio
    FileDataSource.java:173)
    at edu.cmu.sphinx.frontend.util.AudioFileDataSource.setAudioFile(AudioFi
    leDataSource.java:157)
    at edu.cmu.sphinx.demo.wavfile.WavFile.main(WavFile.java:55)

    When its default path of audio url is - audio url: jar:file:/C:/sphinx4-1.0beta2-src/sphinx4-1.0beta2/bin/WavFile.jar!/e
    du/cmu/sphinx/demo/wavfile/12345.wav

    Can you please tell me the right way to give the input?
    Thanks for the help

    Gurucharan

     
    • gurucharan

      gurucharan - 2009-04-29

      Hello Nickolay,

      Thanks for your input.
      I apologize for my English. I am not good in English, so it may look as rude. I really didn't mean to be rude.
      Sorry again.

      Thanks,
      Gurucharan

       
      • Nickolay V. Shmyrev

        No problem really, I'm sure you'll progress a lot.

         
    • Nickolay V. Shmyrev

      Gurucharan, you are getting the exception about "file not found" becase file is not found. There is no such file. File is missing. It tried to find the file, but there was no file on path you specified. The path you specified is invalid. Specified path doesn't point to any file. File on the specified location is missing.

      Specify correct path in the command line. Find correct path and specify it. Correct path should point to the existing file.

      Heh, I hope you could understand that and your next question will not be that rude.

       

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.