|
@@ -321,7 +321,7 @@ public class SoundCompareHelper implements PitchDetectionHandler {
|
|
|
Double avgPitch = currPitchInfos.stream().skip(1).collect(Collectors.averagingDouble(MusicPitchDetailDto::getFrequency));
|
|
|
Double avgDb = currPitchInfos.stream().skip(1).collect(Collectors.averagingDouble(MusicPitchDetailDto::getDecibel));
|
|
|
long count = currPitchInfos.stream().filter(p -> p.getFrequency() < 0).count();
|
|
|
- if(currPitchInfos.size()>0&&count/currPitchInfos.size()<0.3){
|
|
|
+ if(currPitchInfos.size()>0&&count/currPitchInfos.size()<0.5){
|
|
|
avgPitch = currPitchInfos.stream().skip(1).filter(p->p.getFrequency()>0).collect(Collectors.averagingDouble(MusicPitchDetailDto::getFrequency));
|
|
|
}
|
|
|
if(Math.abs(avgPitch-pitch)>10||Math.abs(decibel-avgDb)>5){
|