Skip to content

Commit

Permalink
chore: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejmajek committed Sep 3, 2024
1 parent 518e71c commit b89aa65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rai_asr/rai_asr/asr_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ def capture_sound(self):
)
if asr_lock or self.hmi_lock or self.tts_lock:
continue


if self.should_listen(audio_data):
self.silence_start_time = datetime.now()
Expand All @@ -297,7 +296,9 @@ def capture_sound(self):
self.audio_buffer.append(audio_data)
elif self.is_recording:
self.audio_buffer.append(audio_data)
if datetime.now() - self.silence_start_time > timedelta(seconds=self.silence_grace_period):
if datetime.now() - self.silence_start_time > timedelta(
seconds=self.silence_grace_period
):
self.stop_recording_and_transcribe()
self.reset_buffer()

Expand Down

0 comments on commit b89aa65

Please sign in to comment.