/ Модель

Характеристики

Лицензия
MIT
Опубликована
1 окт 2026

micro-speech-lstm-imx

Классификация аудиоАудио → label3 профессии

Компактная LSTM-модель NXP классифицирует короткие голосовые команды yes и no на процессорах i.MX.

328скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MicroSpeech LSTM — компактная модель классификации речевых команд, подготовленная NXP для процессоров i.MX 8M Plus, i.MX 93, i.MX 95 и i.MX 952. Рекуррентная сеть LSTM обучена с нуля на подмножестве mini_speech_commands из набора Speech Commands. Модель квантована до int8 и доступна в формате TensorFlow Lite; для поддерживаемых платформ предусмотрена компиляция под NPU.

Модель принимает спектрограмму амплитуд величиной 1 × 49 × 257, рассчитанную для монофонического аудио длительностью 1 секунду с частотой 16 кГц, и выдаёт оценки трёх классов: yes, no и unknown. Она подходит для распознавания ограниченного набора ключевых слов и простых голосовых команд на периферийных устройствах с низкой вычислительной нагрузкой.

Это не универсальная система распознавания речи: слова, отличные от yes и no, объединяются в класс unknown. Качество на других частотах дискретизации, длинах записи, шумных или дальних микрофонных записях не проверено; точность может зависеть от акцента, стиля речи и условий записи. Репозиторий модели распространяется по лицензии MIT; данные обучения Speech Commands указаны под CC BY 4.0.

Сценарии применения

  • распознавание команды «да» в голосовом интерфейсе
  • распознавание команды «нет» на периферийном устройстве
  • классификация коротких речевых команд на NXP i.MX
  • запуск распознавания ключевых слов на NPU с низкой вычислительной нагрузкой

Ограничения

Распознаёт только классы yes, no и unknown и не предназначена для общего распознавания речи или критически важных сценариев. Вход рассчитан на спектрограмму 1-секундного моноаудио с частотой 16 кГц; качество на других условиях записи, акцентах и уровнях шума может снижаться.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MicroSpeech LSTM

Overview

MicroSpeech is a basic speech-recognition network that recognizes two command words, yes and no; every other spoken word (and silence/background noise) is classified as unknown. Given a magnitude spectrogram computed from a 1-second, 16 kHz audio clip, the network outputs a vector of class probabilities over the three classes. This variant uses a recurrent LSTM layer and is based on the TensorFlow tflite-micro MicroSpeech-with-LSTM tutorial. The model was trained on the mini_speech_commands subset of the Speech Commands dataset [1], an audio dataset of spoken words released under a Creative Commons BY 4.0 license.

This repository contains the MicroSpeech LSTM model, quantized to int8 and compiled for NXP i.MX 8M Plus, i.MX 93, i.MX 95, and i.MX 952 processors. It also contains the scripts used to regenerate these assets (recipe.sh, train_model.py, convert_model.py), an inference example (example.py) and an evaluation script (evaluate.py).

Key Features

  • Recurrent LSTM-based keyword recognizer.
  • Operates on a magnitude spectrogram extracted from a 1-second, 16 kHz audio clip.
  • Recognizes 3 classes: yes, no, and unknown.
  • ~119,923 parameters, ~0.023 MOPS.
  • int8 quantized (int8 input / int8 output) for accelerated NPU inference on NXP i.MX platforms.

Model Description

This is a quantized and compiled version of the MicroSpeech-with-LSTM model, trained from scratch by NXP on the mini_speech_commands dataset, optimized for NXP i.MX 8M Plus, i.MX 93, i.MX 95, and i.MX 952 processors.

Modifications

This model is a derivative work with the following changes from the original:

  • Training: NXP trained the model from scratch (train_model.py) on the mini_speech_commands subset of the Speech Commands dataset [1] (all words other than yes/no are grouped into unknown).
  • Quantization: Full int8 post-training quantization (int8 input / int8 output) using a representative dataset of 800 spectrograms drawn from the training split (see convert_model.py).
  • Compilation (i.MX 93): Compiled for the Ethos-U65 NPU using Vela, tags lf-6.18.20_2.0.0 and lf-6.18.37_2.1.0; both tags map 100% of the operators to the NPU.
  • Compilation (i.MX 95 / i.MX 952): Converted for the eIQ Neutron NPU using the eIQ Neutron SDK versions 3.1.3, 3.2.1, and 3.2.3.

Original model available at: TensorFlow tflite-micro MicroSpeech-with-LSTM tutorial.

Model Information

InformationValue
Input shapeMagnitude spectrogram (1, 49, 257), int8
Input exampleexample_input.wav (sound file from the Speech Commands dataset [1], CC BY 4.0)
Output shapeVector of class probabilities (1, 3), int8 quantized; dequantize with the output tensor's scale / zero point. See example.py to decode it.
Output exampleRecognized word: no
FLOPS0.023 MOPS
Number of parameters119,923
File size (int8)122 KB (assets/quantized_tflite_model/microspeech-lstm_quant_int8.tflite)
Source frameworkTensorFlow / Keras

Labels

The model output index order follows the training-time directory listing of the mini_speech_commands dataset:

yes, no, unknown

Supported Hardware and Software Configurations

All models run with the eIQ LiteRT (TensorFlow Lite) runtime and the corresponding NPU delegate (VX for i.MX 8M Plus, Ethos-U for i.MX 93, Neutron for i.MX 95 / i.MX 952). The same information is captured in release_manifest.json.

AssetRuntimePrecisionHW targetBSP & SDK versionsLink to asset
i.MX 8M Plus QuantizedLiteRTINT8i.MX 8M Plus-Download
i.MX 93 PrecompiledLiteRTINT8i.MX 93BSP lf-6.18.20_2.0.0, VELA_TAG = lf-6.18.20_2.0.0Download
i.MX 93 PrecompiledLiteRTINT8i.MX 93BSP lf-6.18.37_2.1.0, VELA_TAG = lf-6.18.37_2.1.0Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3Download

The hardware-independent int8 model is also provided for host (x86) inference and as the input to the compilers: assets/quantized_tflite_model/microspeech-lstm_quant_int8.tflite (the i.MX 8M Plus asset above is a symlink to this same file).

Limitations and Biases

This model targets classification tasks with a very limited command vocabulary. Additional limitations:

  • Task scope: Recognizes only yes, no, and unknown; it is not a general-purpose speech-recognition model and should not be relied upon in safety-critical scenarios.
  • Fixed input format: The model expects a magnitude spectrogram computed from a 1-second, 16 kHz mono audio clip. Other sample rates, clip lengths, or noisy/far-field recordings are untested.
  • Dataset bias: The model is trained on the mini_speech_commands subset of the Speech Commands dataset. Recognition quality may vary for accents, speaking styles, microphones, or background-noise conditions that are under-represented in that dataset.

Training

The model is trained from scratch by NXP, using train_model.py, on the mini_speech_commands subset of the Speech Commands dataset [1] (all words other than yes/no are grouped into unknown). The dataset is released under a Creative Commons BY 4.0 license.

Evaluation

evaluate.py runs the int8 quantized model on the held-out test split of the mini_speech_commands dataset and reports classification accuracy. The evaluation runs on a host PC with the LiteRT CPU runtime, using the hardware-independent model (assets/quantized_tflite_model/microspeech-lstm_quant_int8.tflite), not the NPU-compiled assets.

python evaluate.py -m assets/quantized_tflite_model/microspeech-lstm_quant_int8.tflite

Download and Run

Running the example

An example of how to use the model is in example.py (run on a PC). Install the dependencies from requirements.txt first. The example loads a .wav file, computes the magnitude spectrogram, runs the LSTM model, and prints the recognized word.

# Run on PC:
python example.py -m assets/quantized_tflite_model/microspeech-lstm_quant_int8.tflite -i example_input.wav

Please refer to the i.MX Machine Learning User Guide for details on how to run the models on each platform.

Regenerating the assets with recipe.sh

The recipe installs the eIQ Neutron SDK from the NXP eIQ PyPI Distribution Portal. Configure pip once to use it:

python -m pip config --user set global.index https://eiq.nxp.com/repository
python -m pip config --user set global.index-url https://eiq.nxp.com/repository
python -m pip config --user set global.trusted-host eiq.nxp.com
python -m pip config --user set global.extra-index-url https://pypi.org/simple
python -m pip config --user set global.find-links https://eiq.nxp.com/repository/

To train, quantize the int8 model, and compile the platform-specific variants, run:

bash recipe.sh

The script takes two optional positional arguments, the Vela tag and the eIQ Neutron SDK version (defaulting to lf-6.18.20_2.0.0 and 3.2.3 respectively):

bash recipe.sh [IMX_ETHOS_U_VELA_TAG] [EIQ_NEUTRON_SDK_VERSION]
# e.g.
bash recipe.sh lf-6.18.37_2.1.0 3.2.3

The generated files are:

  • assets/quantized_tflite_model/microspeech-lstm_quant_int8.tflite - hardware-independent int8 model, also used for i.MX 8M Plus (assets/imx8mplus/microspeech-lstm_quant_int8.tflite).
  • assets/imx93/<IMX_ETHOS_U_VELA_TAG>/microspeech-lstm_quant_int8_vela.tflite - Vela-compiled for i.MX 93.
  • assets/imx95/<EIQ_NEUTRON_SDK_VERSION>/microspeech-lstm_quant_int8_converted.tflite - Neutron-converted for i.MX 95.
  • assets/imx952/<EIQ_NEUTRON_SDK_VERSION>/microspeech-lstm_quant_int8_converted.tflite - Neutron-converted for i.MX 952.

License

This model, including the quantized and compiled assets and the scripts in this repository, is released under the MIT License (see LICENSE). The original TensorFlow tflite-micro MicroSpeech-with-LSTM tutorial is also released under the MIT License. The training data (Speech Commands dataset) is released under a Creative Commons Attribution 4.0 International (CC BY 4.0) license (see MODEL_LICENSE).

Citation

If you use this model, please cite both this work and the original dataset:

@article{warden2018speech,
  title={Speech commands: A dataset for limited-vocabulary speech recognition},
  author={Warden, Pete},
  journal={arXiv preprint arXiv:1804.03209},
  year={2018}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Библиотека «litert» рантаймом не поддерживается.

Ревизия весов
6feb5fa

0 моделей