From c8183b61c04c34105ffdffc0c93cab35c0cc3b07 Mon Sep 17 00:00:00 2001
From: Hongyu Li
Date: Tue, 29 Mar 2022 15:04:31 -0400
Subject: [PATCH] got rid of count and pass
---
vz_acoustic_scene_analysis/scripts/stretch_audio.py | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/vz_acoustic_scene_analysis/scripts/stretch_audio.py b/vz_acoustic_scene_analysis/scripts/stretch_audio.py
index ed4aa64..5e96c78 100755
--- a/vz_acoustic_scene_analysis/scripts/stretch_audio.py
+++ b/vz_acoustic_scene_analysis/scripts/stretch_audio.py
@@ -265,7 +265,6 @@ class ROSInterface:
def process_audio_loop(self):
- audio_count = 0
dev = usb.core.find(idVendor=0x2886, idProduct=0x0018)
try:
if dev:
@@ -281,10 +280,7 @@ class ROSInterface:
# Call of Utku's function
self.cough_prob = dsp.classify_cough(flat_list,RESPEAKER_RATE,self.loaded_model,self.loaded_scaler)
print(self.cough_prob)
- # asa_out = process_wav(wav_data, asa_params)
- # Convert asa_out to ROS message
- audio_count += 1
- print("Audio count: ", audio_count)
+ # do something with probability (publish?)
except usb.core.USBError:
print('Respeaker not on USB bus')
@@ -300,5 +296,4 @@ if __name__ == "__main__":
audio.process_audio_loop()
except rospy.ROSInterruptException:
print('Audio processing node failed!')
- rospy.on_shutdown(audio.cleanup)
- pass
\ No newline at end of file
+ rospy.on_shutdown(audio.cleanup)
\ No newline at end of file