Skip to content

Commit 52c690e

Browse files
authored
Merge pull request #438 from Mentalab-hub/hotfix-live-imp-asr-lsl
return bool in is_asr_processor_available
2 parents 0ab4508 + 816e0c2 commit 52c690e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/explorepy/explore.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from scipy import signal as scipy_signal
2525

2626
import explorepy
27+
from explorepy._exceptions import ImpedanceModeActiveError
2728
from explorepy.command import (
2829
MemoryFormat,
2930
SetBinaryTime,
@@ -748,7 +749,10 @@ def get_channel_mask(self):
748749
return SettingsManager(self.device_name).get_adc_mask()
749750

750751
def is_asr_processor_available(self):
751-
return self.stream_processor.ensure_asr_processor_available()
752+
try:
753+
return self.stream_processor.ensure_asr_processor_available()
754+
except ImpedanceModeActiveError:
755+
return False
752756

753757
def calibrate_asr(self, length=-1.0):
754758
if self.is_asr_processor_available():
@@ -773,11 +777,8 @@ def is_asr_running(self):
773777
return False
774778

775779
def start_asr(self, window=None):
776-
print("Starting asr")
777780
if self.is_asr_processor_available():
778-
print("ASR processor is available")
779781
if self.stream_processor.asr_processor.calibration_data_available:
780-
print("calibration data is available")
781782
self.stream_processor.asr_processor.start_cleaning(window)
782783

783784
def stop_asr(self):

0 commit comments

Comments
 (0)