当前位置:网站首页>opensmile简介和安装过程中遇到的问题记录

opensmile简介和安装过程中遇到的问题记录

2022-07-23 01:13:00 Wsyoneself

  1. 定义:一种提取音频特征的工具
  2. 优点:
    1. 可以在新数据到达时以增量方式提取特征
    2. 几乎所有在特征提取过程中生成的中间数据(如窗口音频数据、频谱等)都可以访问并保存到文件中,一遍进行可视化或进一步处理
  3. 特点:
    1. 支持的文件格式:音频文件wav,文本数据文件csv(逗号分隔值、电子表格格式),weka数据挖掘得到的arff格式,HTK(隐马尔科夫工具包)参数文件,二进制特征数据的简单二进制浮点矩阵格式
    2. 为了兼容,官方二进制文件不是使用ffmpeg支持构建的,所以压缩格式(如mp3,mp4,ogg)存储的音频需要转换为未压缩的wave格式,然后才能使用opensmile进行分析。否则需要自行构建具有ffmpeg支持的opensmile
  4. 应用领域:语音识别(特征提取前端,关键字发现等),情感计算领域(情感识别),音乐信息检索(和弦识别,节拍trace)
  5. 分类:
    1. 用c++编写的:安装需要clone源码并使用cmake安装,使用一些指令来使用。(由于博主使用场景是在python中调用,所以没有尝试使用这一种)
    2. python模块(下面说明安装步骤以及过程中遇到的问题)
  6. 安装:
    pip install opensmile
  7. 遇到的报错:
    1. 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.
      1. 解决:在安装的包后面加上 --ignore-installed PyYAML,即
        pip install opensmile --ignore-installed PyYAML
    2. 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.
      1. 解决:(实际就是根据错误提示将缺的依赖进行安装)

        pip install wandb
        pip install pytorch-lightning 
        pip install --user datasets

         

  8.  测试程序:
    # 为预定义特征集的功能设置一个特征提取器
    import opensmile
    smile=opensmile.Smile(
        feature_set=opensmile.FeatureSet.eGeMAPSv02, # 特征集
        feature_level=opensmile.FeatureLevel.Functionals # 特征级别,比如低级,高级等
    )
    smile.feature_names

    输出:

     

原网站

版权声明
本文为[Wsyoneself]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_45647721/article/details/125940984