|
@@ -72,6 +72,9 @@ public class SoundCheckHandler implements WebSocketEventHandler {
|
|
|
try {
|
|
|
AudioDispatcher dispatcher = AudioDispatcherFactory.fromByteArray(message.getPayload().array(), SoundCompareHandler.soundCompareConfig.audioFormat, SoundCompareHandler.soundCompareConfig.simpleSize, SoundCompareHandler.soundCompareConfig.overlap);
|
|
|
dispatcher.addAudioProcessor(new PitchProcessor(SoundCompareHandler.soundCompareConfig.algo, SoundCompareHandler.soundCompareConfig.simpleRate, SoundCompareHandler.soundCompareConfig.simpleSize, (pitchDetectionResult, audioEvent) -> {
|
|
|
+ if(!userSoundCheckInfo.containsKey(phone)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
if(pitchDetectionResult.getPitch()<=0){
|
|
|
return;
|
|
|
}
|