The main reason is that most modern Linux distributions turn off annoying beeps by default.
Potential solutions use pygame or use one of the installed "players" directly.
Using Pygame looks like this:
import pygame
pygame.init()
pygame.mixer.music.load("my_sound_file.ogg")
pygame.mixer.music.play()
pygame.event.wait()
, :
import os
os.system("/usr/bin/canberra-gtk-play --id='system-ready'")
Ubuntu :
ls /usr/share/sounds/ubuntu/stereo