MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / play_sound

Function play_sound

Morse_code_beep/main.py:63–71  ·  view source on GitHub ↗
(duration)

Source from the content-addressed store, hash-verified

61}
62
63def play_sound(duration):
64 # For Windows
65 if platform.system() == 'Windows':
66 import winsound
67 winsound.Beep(1000, duration) # Beep at 1000 Hz for 'duration' milliseconds
68 # For Linux/macOS
69 else:
70 import os
71 os.system('printf "\a"') # Produces system beep
72
73def text_to_morse(text):
74 morse_code = ''

Callers 1

morse_to_soundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected