牛卧堂MCU技术交流
标题: [M55M1] NPU Keyword Spotting Inference [打印本页]
作者: admin 时间: 2026-8-14 14:43
标题: [M55M1] NPU Keyword Spotting Inference
| This example code uses M55M1 NPU to demonstrate machine learning keyword spotting on the Zephyr platform. |
| M55M1_Series_BSP_CMSIS_V3.01.003 |
| |
This example demonstrates one keyword spotting (KWS) inference application that recognizes the presence of a keyword in a recording on Nuvoton's Ethos-U NPU platform. Its source comes from Arm’s ML embedded evaluation kit/Keyword Spotting example, which has more information on the keyword spotting application.
This example mainly consists of:
- Recording audio clip through digital microphone (DMIC)
- Running keyword spotting inference using the TensorFlow Lite Micro framework and the Ethos-U NPU. This will involve three steps:
- Preprocess recorded audio clip to specified input tensor format for inference.
- Run keyword spotting inference.
- Postprocess output tensor format usable by external applications.
This example runs a model DS-CNN Medium INT8 that has been downloaded from the Arm Model Zoo. Then this model is optimized using the Vela compiler to be runnable and accelerated on the Ethos-U NPU platform.
Vela takes a .tflite file as input and produces another .tflite file as output, where the operators supported by Ethos-U have been replaced by an Ethos-U custom operator. In an ideal case the complete model network would be replaced by a single Ethos-U custom operator.
You can download the sample code at EC_M55M1_Zephyr_ML_KWS_V1.00.
作者: 匿名 时间: 2026-8-21 10:09
“本示例展示了一个关键词识别(KWS)推理应用,该应用能够在录音中识别特定关键词的存在,并运行于新唐的 Ethos-U NPU 平台上。其源代码源自 Arm 的 ML 嵌入式评估套件/关键词识别示例,该套件中包含了更多关于关键词识别应用的详细信息。 本示例主要包含以下内容: 通过数字麦克风(DMIC)录制音频片段。 使用 TensorFlow Lite Micro 框架和 Ethos-U NPU 运行关键词识别推理。这主要涉及三个步骤: 将录制的音频片段预处理为指定的输入张量(Tensor)格式,以供推理使用。 运行关键词识别推理。 对输出张量格式进行后处理,使其可被外部应用程序使用。 本示例运行的是从 Arm Model Zoo 下载的 DS-CNN Medium INT8 模型。随后,该模型会使用 Vela 编译器进行优化,以便在 Ethos-U NPU 平台上运行并实现硬件加速。 Vela 编译器以 .tflite 文件作为输入,并生成另一个 .tflite 文件作为输出。在此过程中,Ethos-U 支持的算子(Operators)会被替换为 Ethos-U 自定义算子。在理想情况下,整个模型网络会被替换为单个 Ethos-U 自定义算子。 您可以在 EC_M55M1_Zephyr_ML_KWS_V1.00 下载示例代码。”
作者: 匿名 时间: 2026-8-21 10:09
“本示例展示了一个关键词识别(KWS)推理应用,该应用能够在录音中识别特定关键词的存在,并运行于新唐的 Ethos-U NPU 平台上。其源代码源自 Arm 的 ML 嵌入式评估套件/关键词识别示例,该套件中包含了更多关于关键词识别应用的详细信息。
本示例主要包含以下内容:
通过数字麦克风(DMIC)录制音频片段。
使用 TensorFlow Lite Micro 框架和 Ethos-U NPU 运行关键词识别推理。这主要涉及三个步骤:
将录制的音频片段预处理为指定的输入张量(Tensor)格式,以供推理使用。
运行关键词识别推理。
对输出张量格式进行后处理,使其可被外部应用程序使用。
本示例运行的是从 Arm Model Zoo 下载的 DS-CNN Medium INT8 模型。随后,该模型会使用 Vela 编译器进行优化,以便在 Ethos-U NPU 平台上运行并实现硬件加速。
Vela 编译器以 .tflite 文件作为输入,并生成另一个 .tflite 文件作为输出。在此过程中,Ethos-U 支持的算子(Operators)会被替换为 Ethos-U 自定义算子。在理想情况下,整个模型网络会被替换为单个 Ethos-U 自定义算子。
您可以在 EC_M55M1_Zephyr_ML_KWS_V1.00 下载示例代码。”
| 欢迎光临 牛卧堂MCU技术交流 (https://nuvoton-mcu.com/) |
Powered by Discuz! X3.2 |