Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clean up
  • Loading branch information
promise committed Jul 30, 2024
1 parent c6525d6 commit 9d701b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sound.py
Expand Up @@ -57,4 +57,11 @@ def play_alarm():
play_alarm()
client.publish(MQTT_TOPIC_SOUND, "Sound Detected")
except KeyboardInterrupt:
print("Exiting...")
print("Exiting...")

# Clean up
stream.stop_stream()
stream.close()
p.terminate()
client.loop_stop()
client.disconnect()

0 comments on commit 9d701b1

Please sign in to comment.