Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/explorepy/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from scipy import signal as scipy_signal

import explorepy
from explorepy._exceptions import ImpedanceModeActiveError
from explorepy.command import (
MemoryFormat,
SetBinaryTime,
Expand Down Expand Up @@ -748,7 +749,10 @@ def get_channel_mask(self):
return SettingsManager(self.device_name).get_adc_mask()

def is_asr_processor_available(self):
return self.stream_processor.ensure_asr_processor_available()
try:
return self.stream_processor.ensure_asr_processor_available()
except ImpedanceModeActiveError:
return False

def calibrate_asr(self, length=-1.0):
if self.is_asr_processor_available():
Expand All @@ -773,11 +777,8 @@ def is_asr_running(self):
return False

def start_asr(self, window=None):
print("Starting asr")
if self.is_asr_processor_available():
print("ASR processor is available")
if self.stream_processor.asr_processor.calibration_data_available:
print("calibration data is available")
self.stream_processor.asr_processor.start_cleaning(window)

def stop_asr(self):
Expand Down
Loading