[bugfix] remove adjust_for_noise()
ENERGY_THRESHOLD/DYNAMIC_ENERGY_THRESHOLDが機能していない問題を修正
This commit is contained in:
@@ -32,7 +32,7 @@ class SelectedMicRecorder(BaseRecorder):
|
|||||||
sample_rate=int(device["defaultSampleRate"]),
|
sample_rate=int(device["defaultSampleRate"]),
|
||||||
)
|
)
|
||||||
super().__init__(source=source, energy_threshold=energy_threshold, dynamic_energy_threshold=dynamic_energy_threshold, record_timeout=record_timeout)
|
super().__init__(source=source, energy_threshold=energy_threshold, dynamic_energy_threshold=dynamic_energy_threshold, record_timeout=record_timeout)
|
||||||
self.adjust_for_noise()
|
# self.adjust_for_noise()
|
||||||
|
|
||||||
class SelectedSpeakerRecorder(BaseRecorder):
|
class SelectedSpeakerRecorder(BaseRecorder):
|
||||||
def __init__(self, device, energy_threshold, dynamic_energy_threshold, record_timeout):
|
def __init__(self, device, energy_threshold, dynamic_energy_threshold, record_timeout):
|
||||||
@@ -44,7 +44,7 @@ class SelectedSpeakerRecorder(BaseRecorder):
|
|||||||
channels=device["maxInputChannels"]
|
channels=device["maxInputChannels"]
|
||||||
)
|
)
|
||||||
super().__init__(source=source, energy_threshold=energy_threshold, dynamic_energy_threshold=dynamic_energy_threshold, record_timeout=record_timeout)
|
super().__init__(source=source, energy_threshold=energy_threshold, dynamic_energy_threshold=dynamic_energy_threshold, record_timeout=record_timeout)
|
||||||
self.adjust_for_noise()
|
# self.adjust_for_noise()
|
||||||
|
|
||||||
class BaseEnergyRecorder:
|
class BaseEnergyRecorder:
|
||||||
def __init__(self, source):
|
def __init__(self, source):
|
||||||
@@ -76,7 +76,7 @@ class SelectedMicEnergyRecorder(BaseEnergyRecorder):
|
|||||||
sample_rate=int(device["defaultSampleRate"]),
|
sample_rate=int(device["defaultSampleRate"]),
|
||||||
)
|
)
|
||||||
super().__init__(source=source)
|
super().__init__(source=source)
|
||||||
self.adjust_for_noise()
|
# self.adjust_for_noise()
|
||||||
|
|
||||||
class SelectedSpeakeEnergyRecorder(BaseEnergyRecorder):
|
class SelectedSpeakeEnergyRecorder(BaseEnergyRecorder):
|
||||||
def __init__(self, device):
|
def __init__(self, device):
|
||||||
@@ -88,4 +88,4 @@ class SelectedSpeakeEnergyRecorder(BaseEnergyRecorder):
|
|||||||
channels=device["maxInputChannels"]
|
channels=device["maxInputChannels"]
|
||||||
)
|
)
|
||||||
super().__init__(source=source)
|
super().__init__(source=source)
|
||||||
self.adjust_for_noise()
|
# self.adjust_for_noise()
|
||||||
Reference in New Issue
Block a user