avoid debug logging for melo
This commit is contained in:
@@ -86,3 +86,7 @@ class VADHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
array = enhanced.numpy().squeeze()
|
array = enhanced.numpy().squeeze()
|
||||||
yield array
|
yield array
|
||||||
|
|
||||||
|
@property
|
||||||
|
def min_time_to_debug(self):
|
||||||
|
return 0.00001
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ class BaseHandler:
|
|||||||
start_time = perf_counter()
|
start_time = perf_counter()
|
||||||
for output in self.process(input):
|
for output in self.process(input):
|
||||||
self._times.append(perf_counter() - start_time)
|
self._times.append(perf_counter() - start_time)
|
||||||
logger.debug(f"{self.__class__.__name__}: {self.last_time: .3f} s")
|
if self.last_time > self.min_time_to_debug:
|
||||||
|
logger.debug(f"{self.__class__.__name__}: {self.last_time: .3f} s")
|
||||||
self.queue_out.put(output)
|
self.queue_out.put(output)
|
||||||
start_time = perf_counter()
|
start_time = perf_counter()
|
||||||
|
|
||||||
@@ -46,6 +47,10 @@ class BaseHandler:
|
|||||||
@property
|
@property
|
||||||
def last_time(self):
|
def last_time(self):
|
||||||
return self._times[-1]
|
return self._times[-1]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def min_time_to_debug(self):
|
||||||
|
return 0.001
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user