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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
No problem really, I'm sure you'll progress a lot.
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.