我正在尝试运行简单的代码,用 playsound 播放 wav 声音(我在某些网站上发现了这种声音播放方式):
from playsound import playsound
playsound("Piano.wav")
当我运行它时,我得到错误:
Traceback (most recent call last):
File "C:/Users/user/AppData/Local/Programs/Python/Python38/ьгышсф.py", line 3, in <module>
playsound("Piano.wav")
File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\playsound.py", line 35, in _playsoundWin
winCommand('open "' + sound + '" alias', alias)
File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\playsound.py", line 30, in winCommand
'\n ' + errorBuffer.value.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte
mp3 文件也一样。我正在使用 Python 3.8