(duration)
| 61 | } |
| 62 | |
| 63 | def 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 | |
| 73 | def text_to_morse(text): |
| 74 | morse_code = '' |