MCU常用工作模式介绍(8008)

UAC workmode

功能:

以声卡录音的方式获取mic和ref的数据或者播放音频数据

PLC workmode

功能:

 通过更改配置文件使同一份固件可以实现不同的功能
  • PLC模式的功能实现基于kws识别算法,通过算法的返回值进行相应的响应。 算法返回值对应的响应由代码和配置文件共同决定。
配置方式:
  • 配置文件由脚本根据json文件和资源文件生成
  • json文件示例如下
      {"index":0,"event":100,"led":1,"wav":"yikaideng_16k.wav"}
      {"index":1,"event":101,"led":0,"wav":"yiguandeng_16k.wav"}
      {"index":2,"event":102,"led":3,"wav":"kaibaideng.wav"}
      {"index":3,"event":103,"led":2,"wav":"kainuandeng.wav"}
      {"index":4,"event":104,"led":4,"wav":"yitiaozheng_16k.wav"}
      {"index":5,"event":105,"led":5,"wav":"yitiaozheng_16k.wav"}
      {"index":6,"event":106,"led":6,"wav":"yitiaoliang.wav"}
      {"index":7,"event":107,"led":7,"wav":"yitiaoan.wav"}
      {"index":8,"event":108,"led":7,"wav":"yitiaoan.wav"}
      {"index":9,"event":109,"led":7,"wav":"zhunbeishangsheng.wav"}
      {"index":10,"event":110,"led":7,"wav":"haode.wav"}
      {"index":11,"event":111,"led":7,"wav":"haode.wav"}
      {"index":12,"event":112,"led":7,"wav":"ai.wav"}
      {"index":13,"event":113,"led":7,"wav":"yiguanbi.wav"}
    
  • event指的是算法里的指令词事件
  • led和wav指的是代码里要执行的led和语音响应
  • 音频文件,每30000B一个音频,每个音频的size不应大于30000,小于30000会补零
  • 生成命令$ python build.py,会生成一个config.bin固件

codec workmode

功能:

通过语音处理,以串口方式输出vad状态,kws状态,以i2s或者DAC方式输出算法处理后的音频数据

results matching ""

    No results matching ""