Trying to play an MP3 through python with playsound. Not ...
文章推薦指數: 80 %
#!/usr/bin/env python # import required module from playsound import playsound # for playing note.wav file playsound('file.mp3') ...
Home
Public
Questions
Tags
Users
Companies
Collectives
ExploreCollectives
Teams
StackOverflowforTeams
–Startcollaboratingandsharingorganizationalknowledge.
CreateafreeTeam
WhyTeams?
Teams
CreatefreeTeam
Collectives™onStackOverflow
Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost.
LearnmoreaboutCollectives
Teams
Q&Aforwork
Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch.
LearnmoreaboutTeams
TryingtoplayanMP3throughpythonwithplaysound.Notworking
AskQuestion
Asked
5monthsago
Modified
5monthsago
Viewed
734times
0
Forcontext,Ihavearaspberrypimodel4b,andanNFCreaderattachedtoit.WhentheNFCreaderdetectsaspecificcard,Iwantittoplayaspecificaudiofile.
Ihaveusedplaysound,pygameandpydub(afterinstalligntheirlibraries)andIkeepongettingerrors.Hereismyplay.pyfile:
#!/usr/bin/envpython
#importrequiredmodule
fromplaysoundimportplaysound
#forplayingnote.wavfile
playsound('file.mp3')
print('playingsoundusingplaysound')
thisismyfullerror:
pi@tjobbe:~/storytime$sudopythonplay.py
Traceback(mostrecentcalllast):
File"play.py",line3,in
延伸文章資訊
- 1Python 播放音效簡易版. 概述 - Kiwi lee
以下找了幾種方法,按照需求選擇,不一定我最後選擇的就是最好的。 playsound; pyAudio; pyGame; cvlc. 方法. playsound. 安裝方法: pip instal...
- 2Python实用模块(二十九)playsound - 迷途小书童的Note - 编程
playsound 支持多平台,仅仅依赖于 python 。 安装. 官方给出的安装方法是 pip install playsound. 但是我在执行的时候, ...
- 3Trying to play an MP3 through python with playsound. Not ...
#!/usr/bin/env python # import required module from playsound import playsound # for playing note...
- 4playsound的简介、安装、使用方法之详细攻略 - CSDN博客
playsound的简介. 纯Python,跨平台,单功能模块,不依赖播放声音。 播放声音模块只包含一个东西——函数(也 ...
- 5python-playsound-git - AUR (en) - Arch Linux
Package Details: python-playsound-git 1.3.0-5 ... Description: Pure Python, cross platform, singl...