Echoprint系列--编译
近期要做一个音乐相关的client。当中一个功能是音乐识别。搜索了一些资料选择Echoprint来开发。Echoprint是开源免费的,并且多种client都支持能节约非常多时间,今天主要下载和编译源代码以及測试。
(备注:我的开发环境是Mac,所以以下以及之后都是Mac的环境)
1、官网
官网地址:http://echoprint.me
2、安装依赖环境
- 首先安装HomeBrew
- 安装依赖库
brew install ffmpeg boost taglib
安装的文件夹都在
/usr/local/Cellar
3、下载源代码
git clone -b release-4.12 git://github.com/echonest/echoprint-codegen.git
下载完源代码后进入src并打开Makefile
adsl-172-10-1-12:~ zhangjie$ cd echoprint-codegen
adsl-172-10-1-12:echoprint-codegen zhangjie$ cd src/
adsl-172-10-1-12:src zhangjie$ vim Makefile
改动当中变量BOOST_CFLAGS为你当前安装的boost文件夹
BOOST_CFLAGS=-I/usr/local/Cellar/boost/1.58.0/include
改动
34 libcodegen: $(MODULES_LIB)
35 ifeq ($(UNAME),Darwin)
36 libtool -dynamic -flat_namespace -install_name libcodegen.$(VERSION).dylib -lSystem -compatibility_version $(VERSION_COMPAT) \
37 -macosx_version_min 10.6 -current_version $(VERSION) -o libcodegen.$(VERSION).dylib -undefined suppress \
38 $(MODULES_LIB) -framework vecLib -framework Accelerate
39 else
40 $(CXX) -shared -fPIC -Wl,-soname,$(SONAME) -o $(LIBNAME).$(VERSION) $(MODULES_LIB) -lz
41 endif
假设38行中有-framework vecLib则去掉
变为例如以下:
34 libcodegen: $(MODULES_LIB)
35 ifeq ($(UNAME),Darwin)
36 libtool -dynamic -flat_namespace -install_name libcodegen.$(VERSION).dylib -lSystem -compatibility_version $(VERSION_COMPAT) \
37 -macosx_version_min 10.6 -current_version $(VERSION) -o libcodegen.$(VERSION).dylib -undefined suppress \
38 $(MODULES_LIB) -framework Accelerate
39 else
40 $(CXX) -shared -fPIC -Wl,-soname,$(SONAME) -o $(LIBNAME).$(VERSION) $(MODULES_LIB) -lz
41 endif
4、编译
adsl-172-10-1-12:src zhangjie$ vim Makefile
adsl-172-10-1-12:src zhangjie$ make
g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Codegen.o Codegen.cxx
In file included from Codegen.cxx:12:
In file included from ./AudioBufferInput.h:14:
./AudioStreamInput.h:53:10: warning: 'StdinStreamInput::ProcessFile' hides overloaded virtual function [-Woverloaded-virtual]
bool ProcessFile(const char* filename){ return ProcessStandardInput();}
^
./AudioStreamInput.h:26:18: note: hidden overloaded virtual function 'AudioStreamInput::ProcessFile' declared here: different number of parameters (3 vs 1)
virtual bool ProcessFile(const char* filename, int offset_s=0, int seconds=0);
^
1 warning generated.
g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Fingerprint.o Fingerprint.cxx
g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o MatrixUtility.o MatrixUtility.cxx
g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o SubbandAnalysis.o SubbandAnalysis.cxx
In file included from SubbandAnalysis.cxx:8:
./AudioStreamInput.h:53:10: warning: 'StdinStreamInput::ProcessFile' hides overloaded virtual function [-Woverloaded-virtual]
bool ProcessFile(const char* filename){ return ProcessStandardInput();}
^
./AudioStreamInput.h:26:18: note: hidden overloaded virtual function 'AudioStreamInput::ProcessFile' declared here: different number of parameters (3 vs 1)
virtual bool ProcessFile(const char* filename, int offset_s=0, int seconds=0);
^
1 warning generated.
g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Whitening.o Whitening.cxx
Echoprint系列--编译的更多相关文章
- Echoprint系列--Android编译与调用
在Echoprint系列--编译中编译了源代码,这次将Echoprint移植到Android平台并測试识别歌曲功能. 一.编译库 1.环境准备 Android NDK,我的是android-ndk-r ...
- 2. CMake 系列 - 编译多文件项目
目录 1. 编译不使用第三方库的项目 1.1 项目目录结构 1.2 相关代码 1.3 编译 2. 编译使用第三方库的项目 2.1 项目目录结构 2.2 相关代码 2.3 编译 1. 编译不使用第三方库 ...
- PHP系列 | 编译安装msgpack-php
Msgpack 是一个 PECL 扩展,此扩展提供用于与 MessagePack 序列化通信的 API. MessagePack 是一个基于二进制高效的对象序列化类库,可用于跨语言通信.它可以像JSO ...
- STM32中ARM系列编译工具链的编译宏选择(__CC_ARM、__ICCARM__、__GNUC__、__TASKING__)
一 前言 stm32 f103中.关系到一个选择何种编译宏的问题.这里就梳理一下吧. 二 正文 1 在 core_cm3.h 文件中,有如下代码: #if defined ( __CC_ARM ) ...
- 编译GDAL支持OpenCL使用GPU加速
前言 GDAL库中提供的gdalwarp支持各种高性能的图像重采样算法,图像重采样算法广泛应用于图像校正,重投影,裁切,镶嵌等算法中,而且对于这些算法来说,计算坐标变换的运算量是相当少的,绝大部分运算 ...
- mysql系列安装
Mysql的5种安装方法:1.yum/rpm安装(适合要求不高,并发不大,公司内部,企业内部一些应用场景)2.编译安装(在线高并发业务)3.二进制安装(编译安装后,使用自带工具打包,然后拷贝到相同平台 ...
- c++资源之不完全导引 (转)
c++资源之不完全导引 (转) 转:http://www.cnblogs.com/suiyingjie/archive/2008/02/24/1079411.html 本文2004年5月首发于< ...
- 我们为什么要使用NodeJS
科普文一则,说说我对NodeJS(一种服务端JavaScript实现)的一些认识,以及我为什么会向后端工程师推荐NodeJS. "Node.js 是服务器端的 JavaScript 运行环境 ...
- C++资源之不完全导引 (转载)
C++资源之不完全导引(完整版)- - 这文章太强了,我一定要转载,否则对不起观众,对不起自己.(liigo) 发信人: NULLNULL (空空), 信区: VC标 题: C++资源之不完全导引( ...
随机推荐
- linux中的strip命令简介------给文件脱衣服
1.去掉-g,等于程序做了--strip-debug2.strip程序,等于程序做了--strip-debug和--strip-symbol 作为一名Linux开发人员, 如果没有听说过strip命令 ...
- 微信小程序之下拉刷新,上拉更多列表实现
代码地址如下:http://www.demodashi.com/demo/11110.html 一.准备工作 首先需要下载小程序开发工具 官方下载地址: https://mp.weixin.qq.co ...
- CSS-常用媒体查询
width:视口宽度.height:视口高度.device-width:渲染表面的宽度(对我们来说,就是设备屏幕的宽度).device-height:渲染表面的高度(对我们来说,就是设备屏幕的高度). ...
- js调用打印机 打印整体或部分
有时前端的项目中需要添加打印的功能,首先要知道打印分为整体打印和局部打印两种,而局部打印又可细分为局部打印指定的部分,和局部打印指定部分之外的部分.实例比文字看起来更清晰,下面我将用代码来描述 1.整 ...
- bootstrap学习笔记一 登录水平表单
先上效果图: 样式定义: <form class="form-horizontal"> <div class="control-group"& ...
- IOT表
以前在接触索引的时候,就想过要是表字段太少,索引效果不是很不好吗,直接用索引不是更直接吗?后来因为懒惰也没有去查找相关资料.正好今天看到了table organization index,看了一下,实 ...
- 阿里云Ubuntu部署java web - 文件夹
文件夹(点击章节标题阅读): 阿里云Ubuntu部署java web(1) - 系统配置 ssh链接server(使用终端远程链接) 加入用户 给用户赋予运 ...
- .NET面试题(二)
基础方面: 1.简单的描述一下C# 中重写,重载,隐藏的概念 C#中重写(overide)是子类继承父类后,对父类中的方法进行行为改写. 重载是指方法名相同,参数不同 重写和隐藏的定义: 重写:基类方 ...
- 实例探索Class文件
class文件是指以.class为文件后缀的Java虚拟机可装载文件.无论该class文件是在linux上进行编译的,还是在windows环境下编译的,无论虚拟机是在何种平台下实现和运行的,class ...
- 150. Best Time to Buy and Sell Stock II【medium】
Say you have an array for which the ith element is the price of a given stock on day i. Design an al ...