i am using sphinx4. while working with the wavefile demo, i got the correct output for 12345.wav file. but i got the following error for the other files such as 65536.wav and 1984.wav . the errors are
Loading Recognizer as defined in 'jar:file:/C:/java/sphinx4/bin/WavFile.jar!/edu
/cmu/sphinx/demo/wavfile/config.xml'...
Exception in thread "main" java.lang.NullPointerException
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:50)
==========================================================
please help me to recover from those errros.
thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i saw many resources , but i could not get the codes to convert the speech. if i run the wavefile demo program with different speech content wave file means i am getting only the numerical words. please help me. give me only simple example to convert speech to text
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i corrected the errors and i got the correct output for the other file in wavfile demo folder. but i used another speech file . it gave me the wrong output. the output is
C:\java\sphinx4>java -jar bin/WavFile.jar
Loading Recognizer as defined in 'jar:file:/C:/java/sphinx4/bin/WavFile.jar!/edu
/cmu/sphinx/demo/wavfile/config.xml'...
Decoding jar:file:/C:/java/sphinx4/bin/WavFile.jar!/edu/cmu/sphinx/demo/wavfile/
ls1a.wav
Result: eight one eight oh seven six two eight seven four oh oh oh two eight oh
five oh five six two five eight oh oh eight six eight eight eight one eight eigh
t eight oh oh eight eight eight oh eight oh eight eight one five oh six eight ei
ght one eight oh six two eight eight nine eight one eight eight one eight oh eig
ht eight two eight two six eight one six two three eight eight two eight eight o
h eight eight eight eight eight oh eight oh eight eight eight eight oh two oh ei
ght oh one eight two two zero six eight two eight six two eight oh two five eigh
t three eight eight six oh oh two five five six two oh eight six eight one eight
eight oh eight eight eight oh one five oh six eight one six two eight one one e
ight oh eight two eight two eight eight two eight eight oh eight eight eight oh
eight oh eight eight oh two oh eight two two zero six six two two five
======================================================
please help me
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi
i am using sphinx4. while working with the wavefile demo, i got the correct output for 12345.wav file. but i got the following error for the other files such as 65536.wav and 1984.wav . the errors are
Loading Recognizer as defined in 'jar:file:/C:/java/sphinx4/bin/WavFile.jar!/edu
/cmu/sphinx/demo/wavfile/config.xml'...
Exception in thread "main" java.lang.NullPointerException
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:50)
==========================================================
please help me to recover from those errros.
thanks in advance
Thank you for your reply sir,
can you explain how to use different language model with one simple example? please it will be very helpful to my project.
i saw many resources , but i could not get the codes to convert the speech. if i run the wavefile demo program with different speech content wave file means i am getting only the numerical words. please help me. give me only simple example to convert speech to text
They aren't packed into jar. Edit demo.xml.
i corrected the errors and i got the correct output for the other file in wavfile demo folder. but i used another speech file . it gave me the wrong output. the output is
C:\java\sphinx4>java -jar bin/WavFile.jar
Loading Recognizer as defined in 'jar:file:/C:/java/sphinx4/bin/WavFile.jar!/edu
/cmu/sphinx/demo/wavfile/config.xml'...
Decoding jar:file:/C:/java/sphinx4/bin/WavFile.jar!/edu/cmu/sphinx/demo/wavfile/
ls1a.wav
Result: eight one eight oh seven six two eight seven four oh oh oh two eight oh
five oh five six two five eight oh oh eight six eight eight eight one eight eigh
t eight oh oh eight eight eight oh eight oh eight eight one five oh six eight ei
ght one eight oh six two eight eight nine eight one eight eight one eight oh eig
ht eight two eight two six eight one six two three eight eight two eight eight o
h eight eight eight eight eight oh eight oh eight eight eight eight oh two oh ei
ght oh one eight two two zero six eight two eight six two eight oh two five eigh
t three eight eight six oh oh two five five six two oh eight six eight one eight
eight oh eight eight eight oh one five oh six eight one six two eight one one e
ight oh eight two eight two eight eight two eight eight oh eight eight eight oh
eight oh eight eight oh two oh eight two two zero six six two two five
======================================================
please help me
Wavfile demo recognizes only numbers. You need to use different language model when you want to recognize something else.
Read the documentation, you wont get anywhere with sphinx if you dont.
Here is a faq that answers your question:
http://www.speech.cs.cmu.edu/sphinx/doc/sphinx-FAQ.html