🔨 refactor whisper_live according to flake8

This commit is contained in:
makaveli10
2024-02-09 13:45:13 +05:30
parent b4abe95fc6
commit 9fbff47126
13 changed files with 549 additions and 540 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import unittest
import numpy as np
import torch
import scipy.io as sio
from whisper_live.tensorrt_utils import load_audio
from whisper_live.vad import VoiceActivityDetection
@@ -25,4 +24,4 @@ class TestVoiceActivityDetection(unittest.TestCase):
def test_vad_speech_detection(self):
audio_tensor = torch.from_numpy(load_audio("assets/jfk.flac"))
speech_prob = self.vad(audio_tensor, self.sample_rate).item()
self.assertGreater(speech_prob, 0.5, "VAD failed to identify speech segment.")
self.assertGreater(speech_prob, 0.5, "VAD failed to identify speech segment.")