ubuntu18.04安裝openSMILE教程以及出錯解決辦法

首先安裝依賴:

$sudo apt-get install automake

$sudo apt-get install autoconf

$sudo apt-get install libtool

$sudo apt-get install m4

$sudo apt-get install gcc

從官網下載安裝包:https://www.audeering.com/opensmile/

執行以下命令:

tar -zxvf opensmile-2.3.0.tar.gz

cd opensmile-2.3.0

bash autogen.sh

bash autogen.sh

./configure

make -j4 ; make

make install

注意:你必須執行兩遍bash autogen.sh 這一步,因爲如果只裝一遍的話,必要的文件很可能不會裝全。

安裝成功:

$ ./SMILExtract -h
 
 =============================================================== 
   openSMILE version 2.3.0 (Rev. 2014:2043)
   Build date: Feb 20 2019 (Fri Oct 28 21:16:39 CEST 2016)
   Build branch: 'opensmile-2.3.0'
   (c) 2014-2016 by audEERING GmbH
   All rights reserved. See the file COPYING for license terms.
   Lead author: Florian Eyben
 =============================================================== 

我遇到的出錯的原因:

Makefile:1457: recipe for target 'src/core/libopensmile_la-componentManager.lo' failed
make: *** [src/core/libopensmile_la-componentManager.lo] Error 1
failed to build or install openSMILE to '/opensmile/opensmile-2.3.0/inst'!
buildStandalone.sh: 64: exit: Illegal number: -1

查找錯誤信息:

src/include/core/vectorTransform.hpp:117:83: error: narrowing conversion of ‘'\37777777756'’ from ‘char’ to ‘unsigned char’ inside { } [-Wnarrowing]
 const unsigned char smileMagic[] = {(char)0xEE, (char)0x11, (char)0x11, (char)0x00};
                                                                                   ^
In file included from src/core/vectorTransform.cpp:112:0:

修改方案:

找到相應目錄,然後打開vectorTransform.hpp文件

將第117行代碼改爲

 const char smileMagic[] = {(char)0xEE, (char)0x11, (char)0x11, (char)0x00};

保存後,再編譯,安裝即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章