Ubuntu系统 Yaafe安装
来源:互联网 发布:管家婆软件怎样? 编辑:程序博客网 时间:2024/05/24 04:28
Ubuntu系统下安装Yaafe工具
Yaafe官方安装教程: http://yaafe.sourceforge.net/manual/install.html
1.安装常用工具
sudo apt-get install git sudo apt-get install zsh sudo apt-get install curl sudo apt-get install python-pip sudo apt-get install cmake-qt-gui sudo apt-get install g++
注意 git安装可能会报错,git : Depends: liberror-perl but it is not installable
解决方法,输入以下命令,重新安装常用工具即可:
sudo apt-get updatasudo apt-get upgradesudo apt-get install -f
问题:如果出现E:unable to locate package,需要更新源,更新到/etc/apt/source.list,然后再sudo apt-get update
打开source.list文件添加保存以下内容:
#deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417)]/ trusty main restricted# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricteddeb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted## Major bug fix updates produced after the final release of the## distribution.deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricteddeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ trusty universedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty universedeb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://us.archive.ubuntu.com/ubuntu/ trusty multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiversedeb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu trusty-security main restricteddeb-src http://security.ubuntu.com/ubuntu trusty-security main restricteddeb http://security.ubuntu.com/ubuntu trusty-security universedeb-src http://security.ubuntu.com/ubuntu trusty-security universedeb http://security.ubuntu.com/ubuntu trusty-security multiversedeb-src http://security.ubuntu.com/ubuntu trusty-security multiverse## Uncomment the following two lines to add software from Canonical's## 'partner' repository.## This software is not part of Ubuntu, but is offered by Canonical and the## respective vendors as a service to Ubuntu users.# deb http://archive.canonical.com/ubuntu trusty partner# deb-src http://archive.canonical.com/ubuntu trusty partner## This software is not part of Ubuntu, but is offered by third-party## developers who want to ship their latest software.deb http://extras.ubuntu.com/ubuntu trusty maindeb-src http://extras.ubuntu.com/ubuntu trusty main
相关链接,传送门:http://bbs.csdn.net/topics/390889987
2. Yaafe获取
mkdir Yaafe cd Yaafegit clone https://github.com/Yaafe/Yaafe.git
yaafe使用git的submodule功能来管理它的依赖代码(Eigen)
git submodule init
git submodule update
运行后,Yaafe/exterals/eigen文件夹下会有内容;若无法获取尝试直接下载覆盖:http://pan.baidu.com/s/1jHJcgke
3.下载Yaafe依赖
sudo apt-get install cmake cmake-curses-gui libargtable2-0 libargtable2-dev libsndfile1 libsndfile1-dev libmpg123-0 libmpg123-dev libfftw3-3 libfftw3-dev liblapack-dev libhdf5-serial-dev libhdf5-7:i386 libhdf5-7
4.安装Yaafe
mkdir buildcd build
命令输入:cmake-gui
点击generate实施,成功后关闭图形化界面。
问题:出现error:,下方的白色运行框里寻找问题原因:cannot find hdf5 library
解决方法: 文件搜索 libhdf5.os,找到存放地址
在图形化界面的红色框里,将Name对应HDF5相关的几个变量值修改,
以我自己的为例:
HDF5_HL_LIBRARY /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.os
此条搜索hdf5.h文件, HDF5_INCLUDE_DIR /usr/include/hdf5/serial
HDF5_LIARARY /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.os
修改后重新generate后,界面应该不报错并变成白色。
在build文件夹下命令输入
make
make install
不报错,就是安装成功。
配置环境
export YAAFE_PATH=$INSTALL_DIR/yaafe_extensions
export LD_LIBRARY_PATH=/usr/local/lib
测试Test.py
from yaafelib import *import sysdef getFeature(path):fp = FeaturePlan(sample_rate=44100, resample=True, time_start=20,time_limit=40)fp.addFeature("energy: Energy")df = fp.getDataFlow() engine = Engine()engine.load(df)afp = AudioFileProcessor()afp.processFile(engine, path)features = engine.readAllOutputs()energy = features.get('energy')energyMean=energy.mean(axis=0)energyVar =energy.var(axis=0) print energyMean[0]print energyVar[0]return if __name__ == '__main__':path='/home/Downloadsong/5646.mp3'getFeature(path)from yaafelib import *import sys
def getFeature(path): fp = FeaturePlan(sample_rate=44100, resample=True, time_start=20,time_limit=40) fp.addFeature("energy: Energy") df = fp.getDataFlow() engine = Engine() engine.load(df) afp = AudioFileProcessor() afp.processFile(engine, path) features = engine.readAllOutputs() energy = features.get('energy') energyMean=energy.mean(axis=0) energyVar =energy.var(axis=0) print energyMean[0] print energyVar[0] return if __name__ == '__main__': #print sys.path path='/home/jason/gra/music/test/rock/nono.mp3' getFeature(path)
path路径换成你的MP3文件的存储路径即可
问题:error出现no numpy
解决方法:安装
sudo apt-get install build-essential python-dev python-numpy python-setuptools python-scipy libatlas-dev libatlas3-base sudo apt-get install python-matplotlibsudo apt-get install python-pippip install -U scikit-learnsudo apt-get install python-numpy sudo apt-get install python-scipy sudo apt-get install python-matplotlib sudo apt-get install python-pandas sudo apt-get install python-sklearn
相关链接传送门:http://blog.csdn.net/sdhfaka/article/details/22040527
http://blog.csdn.net/Yakumoyukarilan/article/details/51340358
安装参考博客:http://blog.csdn.net/chen0ming123/article/details/50929841
阅读全文
0 0
- Ubuntu系统 Yaafe安装
- Ubuntu下安装Yaafe
- Ubuntu下Yaafe安装及配置
- 在Ubuntu下配置Yaafe
- ubuntu系统安装软件
- ubuntu 之多系统安装
- Ubuntu系统安装问题
- 安装ubuntu 10.04系统
- ubuntu系统安装cacti
- 安装ubuntu Linux系统
- Ubuntu系统安装工序
- 安装Ubuntu 10.04系统
- 硬盘安装ubuntu系统
- Ubuntu系统安装系列
- 怎样安装ubuntu系统
- 量安装ubuntu系统
- ubuntu系统常用软件安装
- Ubuntu系统常用软件安装
- Javaweb项目各个模块的用途
- 浅谈分布式计算的开发与实现(一)
- Float
- 91-接收 IP 数据报
- FREAK算法
- Ubuntu系统 Yaafe安装
- Hibernate和MyBatis的区别?
- 浅谈分布式计算的开发与实现(二)
- intellij idea svn 配置
- FlightDisplay设计思路
- android长度单位转换工具类
- jQuery操作dom的一个实例
- 深度学习常用非线性函数及其导数
- 排序