- 定义:一种提取音频特征的工具
- 优点:
- 可以在新数据到达时以增量方式提取特征
- 几乎所有在特征提取过程中生成的中间数据(如窗口音频数据、频谱等)都可以访问并保存到文件中,一遍进行可视化或进一步处理
- 特点:
- 支持的文件格式:音频文件wav,文本数据文件csv(逗号分隔值、电子表格格式),weka数据挖掘得到的arff格式,HTK(隐马尔科夫工具包)参数文件,二进制特征数据的简单二进制浮点矩阵格式
- 为了兼容,官方二进制文件不是使用ffmpeg支持构建的,所以压缩格式(如mp3,mp4,ogg)存储的音频需要转换为未压缩的wave格式,然后才能使用opensmile进行分析。否则需要自行构建具有ffmpeg支持的opensmile
- 应用领域:语音识别(特征提取前端,关键字发现等),情感计算领域(情感识别),音乐信息检索(和弦识别,节拍trace)
- 分类:
- 用c++编写的:安装需要clone源码并使用cmake安装,使用一些指令来使用。
- python模块(下面说明安装步骤以及过程中遇到的问题)
- 源码安装opensmile(linux):
git clone https://github.com/audeering/opensmile cd opensmile bash build.sh vim /etc/profile (修改这个文件需要root权限) export PATH="smilextract绝对路径:$PATH" (加到profile文件尾部) source /etc/profile SMILExtract -h (检测是否安装成功) (可选)对于一些使用可能需要调整SMILExtract的位置(复制到到opensmile的根目录下),以及修改opensmile中opensmile_config_path的定义
- python安装及调用:
- 安装:
pip install opensmile
- 遇到的报错:
- ERROR: Cannot uninstall ‘PyYAML’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
- 解决:在安装的包后面加上 --ignore-installed PyYAML,即
pip install opensmile --ignore-installed PyYAML
- 解决:在安装的包后面加上 --ignore-installed PyYAML,即
-
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
wandb 0.12.18 requires GitPython>=1.0.0, which is not installed. datasets 2.2.2 requires aiohttp, which is not installed. datasets 2.2.2 requires multiprocess, which is not installed. datasets 2.2.2 requires pyarrow>=6.0.0, which is not installed. pytorch-lightning 0.9.0 requires tensorboard==2.2.0, but you have tensorboard 2.9.1 which is incompatible. ltp 4.1.5.post2 requires transformers<=4.7.0,>=4.0.0, but you have transformers 4.19.4 which is incompatible. huggingface-hub 0.7.0 requires packaging>=20.9, but you have packaging 20.4 which is incompatible. datasets 2.2.2 requires fsspec[http]>=2021.05.0, but you have fsspec 0.8.3 which is incompatible.
-
解决:(实际就是根据错误提示将缺的依赖进行安装)
pip install wandb pip install pytorch-lightning pip install --user datasets
-
- ERROR: Cannot uninstall ‘PyYAML’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
- 测试程序:
# 为预定义特征集的功能设置一个特征提取器 import opensmile smile=opensmile.Smile( feature_set=opensmile.FeatureSet.eGeMAPSv02, # 特征集 feature_level=opensmile.FeatureLevel.Functionals # 特征级别,比如低级,高级等 ) smile.feature_names
输出:
- 安装:
opensmile简介和安装过程中遇到的问题记录
于 2022-07-22 22:21:18 首次发布