diff --git a/server/voice_changer/VoiceChanger.py b/server/voice_changer/VoiceChanger.py index 1413a947..4a16a813 100755 --- a/server/voice_changer/VoiceChanger.py +++ b/server/voice_changer/VoiceChanger.py @@ -97,7 +97,7 @@ class VoiceChanger: sola_buffer: AudioInOut namespace: socketio.AsyncNamespace | None = None - localPerformanceShowTime = 0 + localPerformanceShowTime = 0.0 def audio_callback( self, indata: np.ndarray, outdata: np.ndarray, frames, times, status @@ -110,16 +110,7 @@ class VoiceChanger: outdata[:] = np.repeat(out_wav, 2).reshape(-1, 2) / 32768.0 all_inference_time = t.secs performance = [all_inference_time] + times - performance = [round(x * 1000) for x in performance] - - currentTime = time.time() - if currentTime - self.localPerformanceShowTime > 2: - print( - "[Voice Changer] server audio", - self.settings.performance, - ) - self.localPerformanceShowTime = currentTime - + self.settings.performance = [round(x * 1000) for x in performance] except Exception as e: print(e)