Reading wav file in Java

后端 未结 5 1846
清酒与你
清酒与你 2020-11-27 20:44

I want to read wav files in Java and I am going to classify them with K-means.

How can I read wav files in Java and assign them into an array or something like that(

5条回答
  •  一个人的身影
    2020-11-27 21:08

    You could read the sound files using javax sound library and FileInputStream (found a nice example here) and treat the wave files as a vector of bits (0,1) or bytes.. using multiple sequence alignment (Wiki) create a distance matrix between every stream of bits/bytes, and from there, the clustering should be straight forward.

    The Problem is, that this method is very sensitive to noise, etc, but it is worth a shot...

提交回复
热议问题