怎么通过程序(如python怎么终止程序)判断一个音频文件(如wav、mp3等格式)的声音清晰度?

Player 利用python和wx 编写的一个音乐播放器,支持mp3,wav,ogg等格式 Audio program 238万源代码下载-
&文件名称: Player
& & & & &&]
&&所属分类:
&&开发工具: Python
&&文件大小: 23 KB
&&上传时间:
&&下载次数: 42
&&提 供 者:
&详细说明:利用python和wxpython编写的一个音乐播放器,支持mp3,wav,ogg等格式-Written in python and wxpython a music player, support mp3, wav, ogg and other formats
文件列表(点击判断是否您需要的文件,如果是垃圾请在下面评价投诉):
&&Player\.project&&......\.pydevproject&&......\.settings&&......\.........\org.eclipse.core.resources.prefs&&......\data&&......\....\exit.png&&......\....\favourite.png&&......\....\Lyric.png&&......\....\music.ico&&......\....\next.png&&......\....\open.png&&......\....\play.png&&......\....\playerlist.xml&&......\....\Playlist.PNG&&......\....\pre.png&&......\....\stop.png&&......\mfc.py&&......\player.py&&......\test.py&&......\xmlparser.py&&......\xmlparser.pyc
&近期下载过的用户:
&相关搜索:
&输入关键字,在本站238万海量源码库中尽情搜索:
&[] - 征服python光盘源代码,共20章,非常全面
&[] - python局域网聊天工具(python语言编程)
&[] - python 做的显示股票K线图的源代码。
从通达信软件中读取数据,显示出制定代码的K线
使用Python 2.6 和 wxPython 2.8.1
&[] - 乐谱转MIF格式的python脚本。使用说明:脚本会将同目录下convert.txt转换输出为output.txt。convert1.py提供了一种不带时间间隔的转换方式。
&[] - tcp syn flood攻击的python脚本代码实现,基于James Penguin的代码,
&[] - 收发无附件的邮件
采用python技术
实现了简单的功能,界面简洁,测试成功!含报告
&[] - python的Mp3音乐播放器,使用了Phonon库,能够实现播放列表和调整音效等功能。【图文】音频文件格式_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
音频文件格式
大小:4.51MB
登录百度文库,专享文档复制特权,财富值每天免费拿!
你可能喜欢python处理音频文件(mp3)
今天aiping点读笔的MP3源文件出现声音大小不一致,而且需要将英文单词MP3与单词翻译MP3文件连接起来,刚开始使用ffmpeg效果很差。万能的gitgub再次证明了它的万能,我找到了pydub
1 网址:/jiaaro/pydub
2 pydub需要依赖 libav或者ffmpeg
3 在mac环境下安装依赖:(二选一)
brew install libav --with-libvorbis --with-sdl --with-theora
将所有依赖都安装上~~
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis--with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-fdk-aac --with-freetype --with-ffplay --with-ffplay --with-freetype --with-frei0r --with-libass --with-libbluray --with-libcaca --with-libquvi --with-libvidstab --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools --with-x265
4 安装pydub:
pip install pydub
5 使用pydub:
enPath = "%s%s/%s"%(enDir,file,enfile) #英文文件的路径
cnPath = "%s%s/%s"%(cnDir,file,enfile.replace("en_w","cn_w"))#中文文件的路径
targetPath = "%s%s/%s"%(toDir,file,enfile.replace("en_w","all")) #合并文件的路径
#加载MP3文件
song1 = AudioSegment.from_mp3(enPath)
song2 = AudioSegment.from_mp3(cnPath)
#取得两个MP3文件的声音分贝
db1 = song1.dBFS
db2 = song2.dBFS
song1 = song1[300:] #从300ms开始截取英文MP3
#调整两个MP3的声音大小,防止出现一个声音大一个声音小的情况
dbplus = db1 - db2
0: #song2的声音更小
song2+=abs(dbplus)
#拼接两个音频文件
song = song1 + song2
#导出音频文件
song.export(targetPath, format="mp3") #导出为MP3格式5被浏览917分享邀请回答32 条评论分享收藏感谢收起

我要回帖

更多关于 python怎么写程序 的文章

 

随机推荐