I used a test.mp3 file in the same folder with my python script.
This is the source script:
import sys
from PyQt5 import QtCore, QtWidgets, QtMultimedia
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
filename = 'test.mp3'
fullpath = QtCore.QDir.current().absoluteFilePath(filename)
media = QtCore.QUrl.fromLocalFile(fullpath)
content = QtMultimedia.QMediaContent(media)
player = QtMultimedia.QMediaPlayer()
player.setMedia(content)
player.play()
sys.exit(app.exec_())