Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

how to detect a presence of word /audio silence in the wav file using java?

I am working on a speech recognizer project as a part of it want from a wav file want to find the presence of silence or detect the presence of word .and if a word is found then copy that word from start to end into a new wav file so it original wav file has 10 words then output is 10 file..problem is with detecting the silence or word want suggestion on how to implement this in java.. please suggest..

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Well, wav is just PCM data. I'd start by reading this: http://en.wikipedia.org/wiki/Pulse-code_modulation

I've done this before... You start be pulling samples out of the PCM data. You then check each to see if it is greater than a threshold values that you've set. For instance assuming 16 bit samples...Example any value from zero to 15000 is silence, anything greater than 15001 is sound. Just remember to deal with unsigned ints or you'll have negative in the PCM. Also, remember log vs linear when you're playing with the threshold.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...