diff --git a/barking.py b/barking.py new file mode 100644 index 0000000..aa32728 --- /dev/null +++ b/barking.py @@ -0,0 +1,22 @@ +import pygame +import time +import random + +# Initialize pygame mixer +pygame.mixer.init() + +# Load the sound file +sound = pygame.mixer.Sound("bark5.wav") + +try: + while True: + # Play the sound + sound.play() + + # Wait for the sound to finish playing + time.sleep(sound.get_length()) + + # Wait for a random interval between plays, e.g., 2 to 5 seconds + time.sleep(random.randint(2, 5)) +except KeyboardInterrupt: + print("Playback stopped by user.") diff --git a/barking_and_chasing.launch b/barking_and_chasing.launch new file mode 100644 index 0000000..61be277 --- /dev/null +++ b/barking_and_chasing.launch @@ -0,0 +1,7 @@ + + + + + + +