{"id":458491,"date":"2025-05-03T21:00:05","date_gmt":"2025-05-03T21:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=458491"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=458491","title":{"rendered":"<span>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u0443\u0434\u0438\u043e \u043d\u0430 ESP32<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u043e\u0432 \u0430\u0443\u0434\u0438\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 ESP32-C3. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u0437\u044f\u0442 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043a\u043d\u0438\u0433\u0438 <a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\" rel=\"noopener noreferrer nofollow\">TinyML-Cookbook_2E<\/a>.<br \/>\u041f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0440\u0435\u0447\u0438 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0432\u0443\u043a\u043e\u0432 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <strong>cepstrum<\/strong>, <strong>mel-cepstrum<\/strong> \u0438 <strong>MFCC<\/strong> &#8212; \u044d\u0442\u043e \u0448\u0430\u0433\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442 \u0437\u0432\u0443\u043a \u0432 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0444\u043e\u0440\u043c\u0443.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/h2>\n<p>\u041c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0432 \u0441\u043f\u0435\u043a\u0442\u0440, \u043f\u043e\u0442\u043e\u043c \u0431\u0435\u0440\u0451\u043c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0441\u043f\u0435\u043a\u0442\u0440\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f cepstrum.<\/p>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435:<\/p>\n<ol>\n<li>\n<p>\u0411\u0435\u0440\u0451\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0437\u0432\u0443\u043a\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 20\u201340 \u043c\u0441).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u0435\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440 (FFT).<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0440\u0451\u043c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u2014 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043f\u0435\u043a\u0442\u0440 \u0431\u043e\u043b\u0435\u0435 \u00ab\u0440\u043e\u0432\u043d\u044b\u043c\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043d\u043e\u0432\u0430 FFT \u2192 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u044d\u0442\u043e cepstrum.<\/p>\n<\/li>\n<\/ol>\n<p>\u041b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 (\u0430 \u0441\u043f\u0435\u043a\u0442\u0440 \u0440\u0435\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0433\u043e\u043b\u043e\u0441\u0430 \u0438 \u0432\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0440\u0430\u043a\u0442\u0430) \u0432 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0410 \u0437\u0430\u0442\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 FFT \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0437\u0432\u0443\u043a \u0440\u0435\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0437\u0432\u0443\u043a\u0430 (excitation) \u2014 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u0441\u0432\u044f\u0437\u043e\u043a. \u042d\u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 100 \u0413\u0446).<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0442\u0440\u0430\u043a\u0442 (vocal tract) \u2014 \u0440\u043e\u0442, \u044f\u0437\u044b\u043a, \u0433\u0443\u0431\u044b \u0438 \u0442.\u043f., \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0437\u0432\u0443\u043a, \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u044f\/\u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c IFFT, \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 (quefrency) \u044d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0438\u0435 quefrency (0\u201310 \u043c\u0441) \u2192 \u0444\u043e\u0440\u043c\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u043a\u0442\u0430 (\u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0430\u044f).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 quefrency (10\u201320 \u043c\u0441) \u2192 \u0432\u043e\u0437\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c, F0.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Quefrency<\/strong> \u2014 \u044d\u0442\u043e \u0448\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0443\u043a\u0432 \u043e\u0442 <em>frequency<\/em>, \u0447\u0430\u0441\u0442\u043e\u0442\u0430), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0441\u044c \u0432 cepstrum. \u041d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u0435 \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u0422\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f quefrency (\u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430) \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0433\u043b\u0430\u0434\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u2014 \u044d\u0442\u043e \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0430\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0438\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0442\u043e\u043d\u043e\u043c (F0).<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0424\u043e\u0440\u043c\u0430\u043d\u0442\u044b<\/strong> \u2014 \u044d\u0442\u043e \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u043f\u0438\u043a\u0438 \u0432 \u0441\u043f\u0435\u043a\u0442\u0440\u0435 \u0440\u0435\u0447\u0438. \u041e\u043d\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0438\u0437-\u0437\u0430 \u0440\u0435\u0437\u043e\u043d\u0430\u043d\u0441\u0430 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u043c \u0442\u0440\u0430\u043a\u0442\u0435 (\u0440\u043e\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u0442\u0438, \u0433\u043e\u0440\u0442\u0430\u043d\u0438 \u0438 \u0442.\u0434.).<br \/> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u043b\u0430\u0441\u043d\u044b\u0435, \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 \u0438 \u0433\u0443\u0431 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u043e\u043d\u0430\u043d\u0441\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u2014 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0433\u043b\u0430\u0441\u043d\u044b\u0439 \u0437\u0432\u0443\u043a \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439 \u00ab\u0443\u0437\u043e\u0440\u00bb \u0444\u043e\u0440\u043c\u0430\u043d\u0442, \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u043d\u0438\u043c \u043c\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u043c \u043e\u0434\u043d\u0438 \u0433\u043b\u0430\u0441\u043d\u044b\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 cepstrum \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0438\u0437\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f quefrency (\u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435), \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u043b\u0430\u0434\u043a\u0443\u044e \u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0443\u044e \u0441\u043f\u0435\u043a\u0442\u0440\u0430. \u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435: \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443.<\/p>\n<h4>Mel-\u0448\u043a\u0430\u043b\u0430 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/h4>\n<p>\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0445\u043e \u0441\u043b\u044b\u0448\u0438\u0442 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e: \u043c\u044b \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u043c \u043d\u0438\u0437\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b, \u0447\u0435\u043c \u0432\u044b\u0441\u043e\u043a\u0438\u0435.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7be\/7fa\/779\/7be7fa7798a358bb86e5ddabd6e66c6c.png\" width=\"538\" height=\"411\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7be\/7fa\/779\/7be7fa7798a358bb86e5ddabd6e66c6c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7be\/7fa\/779\/7be7fa7798a358bb86e5ddabd6e66c6c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>Mel-\u0448\u043a\u0430\u043b\u0430<\/strong> \u2014 \u044d\u0442\u043e \u0448\u043a\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u043c\u0443.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 500 \u0438 1000 \u0413\u0446 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0410 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 5000 \u0438 5500 \u0413\u0446 \u2014 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Mel-\u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/strong> \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432, \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u043f\u043e mel-\u0448\u043a\u0430\u043b\u0435. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0432 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u0445, \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043b\u0443\u0445\u0430.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d7b\/df5\/5aa\/d7bdf55aaf050d47d39389839b541182.png\" width=\"532\" height=\"411\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d7b\/df5\/5aa\/d7bdf55aaf050d47d39389839b541182.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d7b\/df5\/5aa\/d7bdf55aaf050d47d39389839b541182.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e43\/8a3\/6a5\/e438a36a5c79da9a04e58e569f8da359.png\" width=\"530\" height=\"411\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e43\/8a3\/6a5\/e438a36a5c79da9a04e58e569f8da359.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e43\/8a3\/6a5\/e438a36a5c79da9a04e58e569f8da359.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>MFCC (Mel-Frequency Cepstral Coefficients)<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>\u0428\u0430\u0433\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f MFCC:<\/p>\n<ol>\n<li>\n<p>\u0414\u0435\u043b\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0430 \u043e\u043a\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u043a\u043d\u0430: <\/p>\n<ul>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u0441\u043f\u0435\u043a\u0442\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 mel-\u0444\u0438\u043b\u044c\u0442\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0440\u0451\u043c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c DCT (\u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441-\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435) \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0434\u0435\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0444\u043e\u0440\u043c\u0443 \u0441\u043f\u0435\u043a\u0442\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b \u043a \u0448\u0443\u043c\u0443 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0447\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0430\u0443\u0434\u0438\u043e.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f ML-\u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0432 <code>tflite<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 <code>model.h<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u043c Jupyter Notebook <a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\/blob\/main\/Chapter05_06\/ColabNotebooks\/prepare_model.ipynb\" rel=\"noopener noreferrer nofollow\">prepare_model.ipynb<\/a>. \u0424\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 VScode \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c Jupyter, \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Colab.<br \/> \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0430\u0432\u0442\u043e\u0440 \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f: &#8216;disco&#8217;, &#8216;jazz&#8217;, &#8216;metal&#8217; \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 <a href=\"https:\/\/www.kaggle.com\/datasets\/andradaolteanu\/gtzan-dataset-music-genre-classification\" rel=\"noopener noreferrer nofollow\">GTZAN Dataset<\/a> \u0438\u0437 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 Raspberry Pico. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0434\u0435\u0441\u044f\u0442\u0438 \u0436\u0430\u043d\u0440\u0430\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0438 ESP32 \u0441 \u044d\u0442\u0438\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<br \/> \u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d<strong>\u044b<\/strong>\u0445 \u0440\u044f\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Lstm (\u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0439) \u0441\u043b\u043e\u0439 ML-\u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"python\">x = norm_layer(input) x = layers.LSTM(32, return_sequences=True)(x) x = layers.Dropout(0.5)(x) x = layers.Flatten()(x) x = layers.Dense(32, activation='relu')(x) x = layers.Dense(len(LIST_GENRES), activation='softmax')(x)<\/code><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 Python \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f <code>Tensorflow<\/code> \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>Keras 3<\/code> \u0432\u0435\u0440\u0441\u0438\u0438. \u0418 \u044d\u0442\u043e \u0432\u043b\u0435\u0447\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412 \u0444\u0430\u0439\u043b\u0435 <code>prepare_model.ipynb<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>Keras 2<\/code> \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <code>.tflite<\/code>. \u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430 <code>keras 3<\/code> \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c, \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a &#171;\u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0435\u043c\u0443&#187; \u0427\u0430\u0442\u0443. \u041d\u043e \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 OPS \u0441\u043b\u043e\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 espressif\/esp-tflite-micro.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.  \u0420\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 <code>prepare_model.ipynb<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c <code>tensorflow<\/code> \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 <code>2.12.0.<\/code><\/p>\n<pre><code class=\"python\">!pip install numpy==1.23.5 !pip install cmsisdsp==1.9.6 !pip install tensorflow==2.12.0<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.kaggle.com\/datasets\/andradaolteanu\/gtzan-dataset-music-genre-classification\" rel=\"noopener noreferrer nofollow\">GTZAN Dataset<\/a>. \u0412 Jupyter \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 <code>mgr_dataset<\/code>. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 Colab \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435 Google drive \u0438 \u0442\u0443\u0434\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u043c\u0435\u043b\u043e\u0434\u0438\u0439 \u0438\u0437 <code>genres_original<\/code>, \u0438\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c Jupyter-\u0444\u0430\u0439\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Google drive \u043a Colab.<\/p>\n<pre><code class=\"python\">from google.colab import drive drive.mount('\/content\/drive')<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432\u0441\u043f\u043b\u044b\u0432\u0435\u0442 \u0434\u0438\u0430\u043b\u043e\u0433 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 Google, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u0438\u0430\u043b\u043e\u0433 \u0432\u044b\u0431\u043e\u0440\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0438\u0441\u043a \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f, \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c \u0441 \u043e\u0431\u0440\u0430\u0437\u0446\u0430\u043c\u0438 \u043c\u0435\u043b\u043e\u0434\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 10 \u0442\u0438\u043f\u043e\u0432 \u0436\u0430\u043d\u0440\u0430 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a <code>LIST_GENRES<\/code><\/p>\n<pre><code class=\"python\">LIST_GENRES = ['blues', 'classical', 'country', 'disco', 'hiphop', 'jazz', 'metal', 'pop', 'reggae', 'rock']<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <code>prepare_model.ipynb<\/code> \u0438 \u0438\u0434\u0442\u0438 \u0437\u0430\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u0447\u0430\u0439.<br \/> \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0438\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432 Colab, \u0442\u043e \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043d\u044f\u043b 18 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 <code>C<\/code> \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 MFCC-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fde\/ee2\/8ee\/fdeee28eedeacd0f6aac8b74cfdc612e.png\" alt=\"MFCC-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0432 Google Colab\" title=\"MFCC-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0432 Google Colab\" width=\"269\" height=\"408\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fde\/ee2\/8ee\/fdeee28eedeacd0f6aac8b74cfdc612e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fde\/ee2\/8ee\/fdeee28eedeacd0f6aac8b74cfdc612e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>MFCC-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0432 Google Colab<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 (\u043a\u0440\u043e\u043c\u0435 test_dst.h, test_src.h) \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <a href=\"https:\/\/components.espressif.com\/components\/espressif\/esp-tflite-micro\/versions\/1.3.1?language=en\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/a> Tensorflow lite \u0432 ESP-IDF \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 ESP-IDF \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<pre><code>idf.py add-dependency \"esp-tflite-micro\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 <code>idf_component.yml<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/p>\n<pre><code class=\"yaml\">## IDF Component Manager Manifest File dependencies:   espressif\/esp-tflite-micro: \"*\"   ## Required IDF version   idf:     version: \"&gt;=4.1.0\"<\/code><\/pre>\n<p>\u0412 <code>espressif\/esp-tflite-micro<\/code> \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u043e\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0444\u0430\u0439\u043b model.tflite \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 <a href=\"https:\/\/netron.app\" rel=\"noopener noreferrer nofollow\">https:\/\/netron.app<\/a>. \u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed5\/fe5\/6c9\/ed5fe56c9943da85afbd9ac89c40faa8.png\" alt=\"Tensorflow lite model\" title=\"Tensorflow lite model\" width=\"2774\" height=\"158\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ed5\/fe5\/6c9\/ed5fe56c9943da85afbd9ac89c40faa8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ed5\/fe5\/6c9\/ed5fe56c9943da85afbd9ac89c40faa8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Tensorflow lite model<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/891314\/\" rel=\"noopener noreferrer nofollow\">Machine learning \u043d\u0430 ESP32<\/a> \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f ESP32. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"cpp\">void tflu_initialization() {     if (tensor_arena == NULL) {         tensor_arena = (uint8_t *) heap_caps_malloc(tensor_arena_size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);       }       if (tensor_arena == NULL) {         ESP_LOGE(TAG, \"Couldn't allocate memory of %d bytes\\n\", tensor_arena_size);         return;       }       tflu_model = tflite::GetModel(model_tflite);     if (tflu_model-&gt;version() != TFLITE_SCHEMA_VERSION) {         ESP_LOGE(TAG, \"Model schema version mismatch!\");         while (1);     }      static tflite::MicroMutableOpResolver&lt;9&gt;; resolver;     resolver.AddQuantize();     resolver.AddDequantize();     resolver.AddSub();     resolver.AddMul();     resolver.AddUnidirectionalSequenceLSTM();     resolver.AddStridedSlice();     resolver.AddFullyConnected();     resolver.AddSoftmax();      static tflite::MicroInterpreter static_interpreter(         tflu_model, resolver, tensor_arena, tensor_arena_size);      tflu_interpreter = &amp;static_interpreter;     tflu_interpreter-&gt;AllocateTensors();      tflu_i_tensor = tflu_interpreter-&gt;input(0);     tflu_o_tensor = tflu_interpreter-&gt;output(0);      ESP_LOGI(TAG, \"TensorFlow Lite initialization completed\"); } <\/code><\/pre>\n<h2>\u041c\u043e\u0434\u0443\u043b\u044c ESP32-C3<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u043c\u043e\u0434\u0443\u043b\u044c ESP32-C3 0.42 OLED. \u041e\u043d \u0441\u043a\u0440\u043e\u043c\u043d\u043e \u0436\u0434\u0430\u043b \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0441 \u0442\u0435\u0445 \u0432\u0440\u0435\u043c\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043e\u043c RISK-V. \u041c\u043e\u0434\u0443\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/docs.nordicsemi.com\/bundle\/ncs-latest\/page\/zephyr\/boards\/01space\/esp32c3_042_oled\/doc\/index.html#hardware\" rel=\"noopener noreferrer nofollow\">\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/a>:<\/p>\n<ul>\n<li>\n<p>RISC-V SoC @ 160MHz with 4MB flash and 400kB RAM<\/p>\n<\/li>\n<li>\n<p>WS2812B RGB serial LED<\/p>\n<\/li>\n<li>\n<p>0.42-inch OLED over I2C<\/p>\n<\/li>\n<li>\n<p>Qwiic I2C connector<\/p>\n<\/li>\n<li>\n<p>One pushbutton<\/p>\n<\/li>\n<li>\n<p>Onboard ceramic chip antenna<\/p>\n<\/li>\n<li>\n<p>On-chip USB-UART converter<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e82\/19d\/9b7\/e8219d9b7ebf1029eeb19166325d8192.png\" width=\"600\" height=\"600\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e82\/19d\/9b7\/e8219d9b7ebf1029eeb19166325d8192.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e82\/19d\/9b7\/e8219d9b7ebf1029eeb19166325d8192.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0439 \u0444\u0438\u0448\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f 0.42-\u0434\u044e\u0439\u043c\u043e\u0432\u044b\u0439 OLED-\u0434\u0438\u0441\u043f\u043b\u0435\u0439, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u043d\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u0436\u0430\u043d\u0440.<\/p>\n<h2>\u041c\u043e\u0434\u0443\u043b\u044c \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 MAX9814<\/h2>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da1\/aba\/e99\/da1abae9961e6ecb4a64c2f8129a4d4a.png\" width=\"420\" height=\"420\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/da1\/aba\/e99\/da1abae9961e6ecb4a64c2f8129a4d4a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da1\/aba\/e99\/da1abae9961e6ecb4a64c2f8129a4d4a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 2,7 \u0412 &#8212; 5,5 \u0412 \u043f\u0440\u0438 \u0442\u043e\u043a\u0435 3 \u043c\u0410<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0445\u043e\u0434: 2Vpp \u043f\u0440\u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0438 1,25\u0412<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430: 20 \u0413\u0446 &#8212; 20 \u043a\u0413\u0446<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0430\u0442\u0430\u043a\u0438 \u0438 \u0441\u043f\u0430\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0438\u0437 40\u0434\u0411, 50\u0434\u0411 \u0438\u043b\u0438 60\u0434\u0411<\/p>\n<\/li>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0430\u044f \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0448\u0443\u043c\u0430 30 \u043d\u0412\/\u0413\u0446<\/p>\n<\/li>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0438\u0439 THD: 0,04% (\u0442\u0438\u043f)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440\u044b: 25\u044514\u043c\u043c , \u0434\u0438\u0430\u043c\u0435\u0442\u0440 \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u044f 2\u043c\u043c, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430 \u0434\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u044f 10\u043c\u043c<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u043f \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0438\u043b\u0438\u0442\u0435\u043b\u044f \u2013\u00a0<a href=\"https:\/\/www.analog.com\/en\/products\/max9814.html\" rel=\"noopener noreferrer nofollow\">MAX9814<\/a><\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043a\u0442\u0440\u0435\u0442\u043d\u044b\u0439 <a href=\"https:\/\/cdn-shop.adafruit.com\/datasheets\/CMA-4544PF-W.pdf\" rel=\"noopener noreferrer nofollow\">\u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d<\/a><\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/055\/2d3\/dc1\/0552d3dc18a40f215c076fe1983fe5e6.png\" alt=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435\" title=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435\" width=\"428\" height=\"380\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/055\/2d3\/dc1\/0552d3dc18a40f215c076fe1983fe5e6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/055\/2d3\/dc1\/0552d3dc18a40f215c076fe1983fe5e6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u044b\u0432\u043e\u0434 OUT \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c\u0443 \u0432\u0445\u043e\u0434\u0443 A0 ESP32-\u04213. \u0412\u044b\u0432\u043e\u0434 Gain \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a V+, \u0442\u043e\u0433\u0434\u0430 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c.<br \/>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0441\u0446\u0438\u043b\u043b\u043e\u0433\u0440\u0430\u0444\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0442\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d, \u0449\u0443\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a OUT, \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e\u0441\u0438\u0433\u043d\u0430\u043b.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d3\/563\/453\/4d35634535c165b28211116a5a94265a.png\" width=\"576\" height=\"306\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4d3\/563\/453\/4d35634535c165b28211116a5a94265a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d3\/563\/453\/4d35634535c165b28211116a5a94265a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 0.42-inch OLED \u0434\u0438\u0441\u043f\u043b\u0435\u044f<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u043d\u043e\u0445\u0440\u043e\u043c\u043d\u044b\u0445 LCD-\u0434\u0438\u0441\u043f\u043b\u0435\u0435\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/olikraus\/u8g2\/wiki\" rel=\"noopener noreferrer nofollow\">u8g2<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f 0.42 OLED \u043d\u0430 Arduino \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/01Space\/ESP32-C3-0.42LCD\/blob\/main\/ESP32-C3-GraphicsTest\/ESP32-C3-GraphicsTest.ino\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u044f 0.42.<\/p>\n<pre><code class=\"cpp\">U8G2_SSD1306_72X40_ER_F_HW_I2C u8g2(U8G2_R0, \/* reset=*\/ U8X8_PIN_NONE);   \/\/ EastRising 0.42\" OLED<\/code><\/pre>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c <a href=\"https:\/\/github.com\/olikraus\/u8g2\" rel=\"noopener noreferrer nofollow\">u8g2<\/a> \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <code>.\/components<\/code>. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 CMakeLists.txt \u0443\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f ESP-IDF<\/p>\n<pre><code class=\"bash\">if(COMMAND idf_component_register)     idf_component_register(SRCS \"${COMPONENT_SRCS}\" INCLUDE_DIRS csrc)     return() endif() <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 u8g2 \u0432 ESP-IDF \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f hal-\u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0438\u0437 <a href=\"https:\/\/github.com\/nkolban\/esp32-snippets\/blob\/master\/hardware\/displays\/U8G2\/u8g2_esp32_hal.c\" rel=\"noopener noreferrer nofollow\">nkolban\/esp32-snippets<\/a> \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430: <code>u8g2_esp32_hal.h<\/code> \u0438 <code>u8g2_esp32_hal.c<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c <code>main.c<\/code>.<br \/> \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 hal-\u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0436\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/nkolban\/esp32-snippets\/blob\/master\/hardware\/displays\/U8G2\/test_SSD1306_i2c.c\" rel=\"noopener noreferrer nofollow\">test_SSD1306_i2c.c<\/a><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c hal-\u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 C++ \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 (Tensorflow, CMCIS) \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <code>u8g2_esp32_hal.h<\/code>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <code>extern \"C\"<\/code>.<\/p>\n<pre><code class=\"cpp\">#ifndef U8G2_ESP32_HAL_H_ #define U8G2_ESP32_HAL_H_  #ifdef __cplusplus extern \"C\" { #endif  \/\/\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434  #ifdef __cplusplus } #endif  #endif \/* U8G2_ESP32_HAL_H_ *\/<\/code><\/pre>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 <code>main.c<\/code> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <code>#include \"u8g2_esp32_hal.h\"<\/code><\/p>\n<p>\u0412 main-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c hal-\u043c\u043e\u0434\u0443\u043b\u044c \u0438 OLED, \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0437 test_SSD1306_i2c.c. \u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a ESP32 I2C-\u0448\u0438\u043d\u0435, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b  <code>PIN_SDA<\/code> \u0438 <code>PIN_SDA<\/code>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 ESP32-C3 &#8212; \u044d\u0442\u043e \u043f\u0438\u043d\u044b 5 \u0438 6 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. I2C \u0430\u0434\u0440\u0435\u0441 \u0434\u0438\u0441\u043f\u043b\u0435\u044f &#8212; 0x78.<\/p>\n<pre><code class=\"cpp\">#include \"u8g2_esp32_hal.h\"  #define PIN_SDA GPIO_NUM_5 #define PIN_SCL GPIO_NUM_6  u8g2_t u8g2;<\/code><\/pre>\n<pre><code class=\"cpp\">\/\/ initialize the u8g2 hal u8g2_esp32_hal_t u8g2_esp32_hal = U8G2_ESP32_HAL_DEFAULT; u8g2_esp32_hal.sda = PIN_SDA; u8g2_esp32_hal.scl = PIN_SCL; u8g2_esp32_hal_init(u8g2_esp32_hal);  \/\/ initialize the u8g2 library u8g2_Setup_ssd1306_i2c_72x40_er_f( &amp;u8g2, U8G2_R0, u8g2_esp32_i2c_byte_cb, u8g2_esp32_gpio_and_delay_cb);  \/\/ set the display address u8x8_SetI2CAddress(&amp;u8g2.u8x8, 0x78);  \/\/ initialize the display u8g2_InitDisplay(&amp;u8g2);  \/\/ wake up the display u8g2_SetPowerSave(&amp;u8g2, 0);<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>u8g2_DrawStr<\/code>. \u041f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u0431\u0443\u0444\u0435\u0440 <code>u8g2_ClearBuffer<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0448\u0440\u0438\u0444\u0442 <code>u8g2_SetFont<\/code>, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u043c \u0431\u0443\u0444\u0435\u0440 <code>u8g2_SendBuffer<\/code>.<\/p>\n<pre><code class=\"cpp\">u8g2_ClearBuffer(&amp;u8g2); u8g2_SetFont(&amp;u8g2, u8g2_font_ncenB08_tr); u8g2_DrawStr(&amp;u8g2, 0,15, \"Hello world\"); u8g2_SendBuffer(&amp;u8g2);<\/code><\/pre>\n<p>\u0433\u0434\u0435,<\/p>\n<ul>\n<li>\n<p><code>&amp;u8g2<\/code> &#8212; \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 u8g2_t u8g2,<\/p>\n<\/li>\n<li>\n<p><code>0,15<\/code> &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b x, y \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u0445 \u0441 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043b\u0435\u0432\u043e\u0433\u043e \u043a\u0440\u0430\u044f.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/404\/213\/bb5\/404213bb55625a205f4642b4f672209a.png\" width=\"525\" height=\"192\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/404\/213\/bb5\/404213bb55625a205f4642b4f672209a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/404\/213\/bb5\/404213bb55625a205f4642b4f672209a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 CMSIS<\/h2>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f MFCC-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f CMSIS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0410\u0432\u0442\u043e\u0440 \u0443\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 zip-\u0430\u0440\u0445\u0438\u0432. \u042d\u0442\u043e\u0442 \u0430\u0440\u0445\u0438\u0432 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043a Arduino IDE.<br \/> \u0414\u043b\u044f ESP-IDF \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c CMSIS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/ARM-software\/CMSIS-DSP\" rel=\"noopener noreferrer nofollow\">CMSIS-DSP<\/a> \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>\/components<\/code>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b CMSIS Core \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0435\u0440\u0435\u043c \u043e\u0442\u0441\u044e\u0434\u0430 <a href=\"https:\/\/github.com\/ARM-software\/CMSIS_5\/tree\/develop\/CMSIS\/Core.%EF%BF%BC\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ARM-software\/CMSIS_5\/tree\/develop\/CMSIS\/Core.<br \/><\/a> \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c make-\u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 CMSIS.<\/p>\n<p><strong>CMakefile.txt \u0434\u043b\u044f CMSIS Core.<\/strong><\/p>\n<pre><code class=\"bash\">idf_component_register(     INCLUDE_DIRS         \"Include\"  # Path to the CMSIS-Core include directory )<\/code><\/pre>\n<p><strong>CMakefile.txt  CMSIS-DSP<\/strong><\/p>\n<pre><code class=\"bash\"># Define the path to the CMSIS-DSP library set(CMSISDSP \"${CMAKE_CURRENT_LIST_DIR}\")  # Recursively gather all source files from the CMSIS-DSP Source directory file(GLOB_RECURSE CMSIS_DSP_SRCS \"${CMSISDSP}\/Source\/*.c\")  # Exclude NEON-specific files if NEON is not supported list(FILTER CMSIS_DSP_SRCS EXCLUDE REGEX \"_arm_mat_mult_neon.c\")  idf_component_register(     SRCS ${CMSIS_DSP_SRCS}     INCLUDE_DIRS         \"${CMSISDSP}\/Include\"         \"${CMSISDSP}\/PrivateInclude\"         \"${CMAKE_CURRENT_LIST_DIR}\/..\/CMSIS-Core\/Include\"  # Add CMSIS-Core include path         \".\" )<\/code><\/pre>\n<p>\u0412 CMSIS-DSP \u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b \u043c\u043e\u0434\u0443\u043b\u044c <code><em>arm<\/em>mat_mult_neon.c<\/code>, \u0442.\u043a. \u043e\u043d \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 MFCC \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c <code>MFCC_Q15.h<\/code>, <code>MFCC_Q15.c<\/code>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 MFCC \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043a\u043d\u0438\u0433\u0435 TinyML-Cookbook_2E. \u0414\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>void MFCC_Q15::run(const q15_t* src, float* dst)<\/code>. \u0412 \u043c\u0435\u0442\u043e\u0434 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0431\u0443\u0444\u0435\u0440 \u0441 \u0430\u0443\u0434\u0438\u043e\u0441\u0435\u043c\u043f\u043b\u0430\u043c\u0438 \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u0430. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f MFCC-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043d\u0437\u043e\u0440.<\/p>\n<pre><code class=\"cpp\"> mfccs.run((const q15_t*)audio_buffer, tflu_i_tensor-&gt;data.f);<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"cpp\">tflu_interpreter-&gt;Invoke();<\/code><\/pre>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 ESP32<\/h2>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 ESP-IDF v4.4 &#8212; <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/v4.4\/esp32c3\/api-reference\/peripherals\/adc.html\" rel=\"noopener noreferrer nofollow\">Analog to Digital Converter<\/a> ESP32-C3 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 ADC \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 6 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f (\u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0434\u043e\u0432). \u0412 ESP-IDF v5.4 ADC API \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043c\u044b\u0441\u043b.<\/p>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b:<\/p>\n<p><strong>ADC1:<\/strong><br \/> 5 \u043a\u0430\u043d\u0430\u043b\u043e\u0432: GPIO0 \u2013 GPIO4<\/p>\n<p><strong>ADC2:<\/strong><br \/> 1 \u043a\u0430\u043d\u0430\u043b: GPIO5<\/p>\n<p><strong>\u0410\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u044f ADC<\/strong><br \/> Vref \u2014 \u044d\u0442\u043e \u043e\u043f\u043e\u0440\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 ESP32-C3 \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. ADC \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0412 \u0434\u043e Vref. \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Vref \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 1.1 \u0412, \u043d\u043e \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u043f\u0430\u043c\u0438. \u0414\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0439 \u0432\u044b\u0448\u0435 Vref \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u044f (\u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430). \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u0430\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u0438:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0410\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u044f<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ADC_ATTEN_DB_0<\/p>\n<\/td>\n<td>\n<p align=\"left\">0 \u043c\u0412 &#8212; 750 \u043c\u0412<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ADC_ATTEN_DB_2_5<\/p>\n<\/td>\n<td>\n<p align=\"left\">0 \u043c\u0412 &#8212; 1050 \u043c\u0412<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ADC_ATTEN_DB_6<\/p>\n<\/td>\n<td>\n<p align=\"left\">0 \u043c\u0412 &#8212; 1300 \u043c\u0412<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ADC_ATTEN_DB_11<\/p>\n<\/td>\n<td>\n<p align=\"left\">0 \u043c\u0412 &#8212; 2500 \u043c\u0412<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ADC<\/strong><br \/> \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 ADC \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u2014 12 \u0431\u0438\u0442. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>adc1_get_raw()<\/p>\n<\/li>\n<li>\n<p>adc2_get_raw()<\/p>\n<\/li>\n<li>\n<p>adc_digi_read_bytes()<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430:<\/p>\n<p><code>Vout = Dout * Vmax \/ Dmax<\/code><\/p>\n<p>\u0433\u0434\u0435:<\/p>\n<ul>\n<li>\n<p>Vout \u2014 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>Dout \u2014 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (raw)<\/p>\n<\/li>\n<li>\n<p>Vmax \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 (\u0441\u043c. \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0430\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<li>\n<p>Dmax \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430, 4095 \u0434\u043b\u044f 12 \u0431\u0438\u0442<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430 ADC \u0447\u0435\u0440\u0435\u0437 eFuse, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e esp_adc_cal_raw_to_voltage(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f (\u0432 \u043c\u0412). \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0430\u0445 \u0431\u0435\u0437 eFuse, \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f ADC<\/strong><\/p>\n<ul>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c ADC2 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Wi-Fi, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0442\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 adc2_get_raw() \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 esp_wifi_start() \u0438 esp_wifi_stop().<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c ADC \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435: \u043b\u0438\u0431\u043e \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u043c, \u043b\u0438\u0431\u043e \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>ADC1 \u0438 ADC2 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f. \u041e\u0434\u0438\u043d \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 SOC_ADC_SAMPLE_FREQ_THRES_LOW \u0438 SOC_ADC_SAMPLE_FREQ_THRES_HIGH.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 ADC<\/strong><br \/> \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 (single read) \u2014 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0438\u0437\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435 (DMA) \u2014 \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0438\u043d \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d \u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443 \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b ADC \u0431\u0443\u0434\u0443\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f (DMA)<\/strong><\/p>\n<p>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430: adc_digi_initialize()<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430: adc_digi_controller_config()<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0442\u0435\u043d\u0438\u044f: adc_digi_start()<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445: adc_digi_read_bytes()<\/p>\n<\/li>\n<li>\n<p>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0447\u0442\u0435\u043d\u0438\u044f: adc_digi_stop()<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430: adc_digi_deinitialize()<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>examples\/peripherals\/adc\/dma_read<\/code> \u0432 ESP-IDF.<\/p>\n<p><strong>\u0420\u0435\u0436\u0438\u043c \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f ADC1: adc1_config_width() \u0438 adc1_config_channel_atten()<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f ADC2: adc2_config_channel_atten(); \u0448\u0438\u0440\u0438\u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 adc2_get_raw()<\/p>\n<\/li>\n<\/ul>\n<p>\u0410\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>adc1_get_raw()<\/p>\n<\/li>\n<li>\n<p>adc2_get_raw()<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u2014 <code>examples\/peripherals\/adc\/single_read<\/code>.<\/p>\n<p><strong>\u041c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0448\u0443\u043c\u0430<\/strong><br \/> ADC \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d \u043a \u0448\u0443\u043c\u0443. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0431\u0430\u0439\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u0435\u0440\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 100 \u043d\u0424) \u043a \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u043f\u0438\u043d\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 (multisampling) \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0448\u0443\u043c\u043e\u0432.<\/p>\n<p><strong>\u041a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430 ADC<\/strong><br \/> \u0421\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p><strong>\u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0430\u044f \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043e\u043f\u043e\u0440\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f (bandgap)<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0435 Vin\u2013Dout (\u043e\u0431\u044b\u0447\u043d\u043e: f(x) = A * x + B, \u0433\u0434\u0435 B \u2014 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435)<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u2014 \u044d\u0442\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 &#171;\u0441\u044b\u0440\u044b\u0435&#187; \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0443.<\/p>\n<p><strong>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 eFuse: esp_adc_cal_check_efuse()<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0447\u0451\u0442 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a: esp_adc_cal_characterize(). \u041e\u043d\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u0430\u0442\u0442\u0435\u043d\u044e\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ADC1 \u043a\u0430\u043d\u0430\u043b 0 \u0438 \u043a\u0430\u043d\u0430\u043b 2 \u043f\u0440\u0438 11 \u0434\u0411 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u0430 ADC1 \u043a\u0430\u043d\u0430\u043b 0 \u043f\u0440\u0438 6 \u0434\u0411 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f: esp_adc_cal_raw_to_voltage()<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u2014 \u043e\u0442\u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u2014 \u0432 <code>examples\/peripherals\/adc\/single_read<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ADC \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438<\/p>\n<pre><code class=\"cpp\">#include \"driver\/adc.h\" #include \"esp_adc_cal.h\"<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c ADC.<\/p>\n<pre><code class=\"cpp\">esp_adc_cal_characteristics_t* adc_chars;  \/\/ Initialize ADC     adc1_config_width(ADC_WIDTH_BIT_12);     adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_DB_11);     adc_chars = (esp_adc_cal_characteristics_t*) calloc(1, sizeof(esp_adc_cal_characteristics_t));     if (adc_chars == NULL) {         ESP_LOGE(TAG, \"Failed to allocate memory for ADC characteristics\");         return;     }     esp_adc_cal_value_t val_type = esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, DEFAULT_VREF, adc_chars);<\/code><\/pre>\n<p><code>ADC_WIDTH_BIT_12<\/code> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c 12-\u0431\u0438\u0442\u043d\u044b\u0439 ADC;<br \/><code>ADC_ATTEN_DB_11<\/code> &#8212; \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f 0 \u043c\u0412 &#8212; 2500 \u043c\u0412, \u0442. \u043a. \u043e\u043f\u043e\u0440\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0435 \u0441 \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u044b\u043c \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435 = 1.25 \u0412;<br \/><code>ADC1_CHANNEL_0<\/code> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u044b\u0432\u043e\u0434 GPIO0 \u043d\u0430 ESP32-C3.<\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0443 ADC \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>esp_adc_cal_characterize<\/code>, \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f <code>adc_chars<\/code>.<\/p>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\/blob\/main\/Chapter05_06\/ArduinoSketches\/11_music_genre_classification.ino\" rel=\"noopener noreferrer nofollow\">11_music_genre_classification.ino<\/a> \u043f\u043e\u0441\u043b\u0435 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f ADC \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"bias = \\frac{V_{ref} \\cdot N_{bit}}{V_{cc}}\" alt=\"bias = \\frac{V_{ref} \\cdot N_{bit}}{V_{cc}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2f\/2f7\/2f76c5f19870f9a4e83c12ea6d3d3d81.svg\" width=\"auto\" height=\"auto\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2f\/2f7\/2f76c5f19870f9a4e83c12ea6d3d3d81.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/2f\/2f7\/2f76c5f19870f9a4e83c12ea6d3d3d81.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<pre><code class=\"cpp\">int BIAS_MIC  =  1552; \/\/ (1.25V * 4095) \/ 3.3<\/code><\/pre>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 ESP32. \u0422. \u0435., \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 ADC, \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u0430 1000 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<pre><code class=\"cpp\">int measure_bias_offset() {     int sum = 0;     const int samples = 1000;     for (int i = 0; i &amp;lt; samples; i++) {         sum += adc1_get_raw(ADC1_CHANNEL_0);         ets_delay_us(1000);      }     return sum \/ samples; }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u0443\u0434\u0438\u043e\u0441\u0435\u043c\u043f\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043b\u043b\u0431\u044d\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u0432 Freertos-\u0437\u0430\u0434\u0430\u0447\u0435, \u043d\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0436\u0430\u043d\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043f\u043b\u043e\u0445\u043e, \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u0439\u043c\u0435\u0440.<\/p>\n<pre><code class=\"cpp\">void timer_callback(void* arg) {     if (buffer_index &amp;lt; AUDIO_LENGTH_SAMPLES) {         int adc_value = adc1_get_raw(ADC1_CHANNEL_0); \/\/ Read ADC         \/\/printf(\"Raw ADC Value: %d\\n\", adc_value);         audio_buffer[buffer_index++] = adc_value - bias_offset; \/\/ Adjust for bias     } else {         buffer_ready = true;     } }<\/code><\/pre>\n<pre><code class=\"cpp\">const esp_timer_create_args_t timer_args = {         .callback = &amp;amp;timer_callback,         .name = \"audio_timer\"     };     esp_timer_handle_t timer;     esp_timer_create(&amp;amp;timer_args, &amp;amp;timer);     esp_timer_start_periodic(timer, 1000000 \/ SAMPLE_RATE); \/\/ Sampling rate<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043d\u0430 1\/SAMPLE_RATE \u0441\u0435\u043a, \u0433\u0434\u0435 SAMPLE_RATE=22050. \u0421 \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 MFCC-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0434\u043b\u044f CD &#8212; 44100, \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c Jupyter-\u0444\u0430\u0439\u043b.<br \/> \u0412 \u043a\u043e\u043b\u043b\u0431\u044d\u043a\u0435 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 ADC, \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u043c \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u043f\u043e\u0440\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430.<\/p>\n<p>\u0410\u0443\u0434\u0438\u043e-\u0436\u0430\u043d\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043d\u0437\u043e\u0440\u0430.<\/p>\n<pre><code class=\"cpp\">static const char *label[] = {\"blues\", \"classical\", \"country\", \"disco\", \"hiphop\", \"jazz\", \"metal\", \"pop\", \"reggae\", \"rock\"};  size_t max_index = 0;         float max_value = 0;         for (size_t i = 0; i &amp;lt; 10; i++) {             if (tflu_o_tensor-&amp;gt;data.f[i] &amp;gt; max_value) {                 max_index = i;                 max_value = tflu_o_tensor-&amp;gt;data.f[i];             }         }          ESP_LOGI(TAG, \"Predicted genre: %s\", label[max_index]); <\/code><\/pre>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f ESP32-C3<\/p>\n<pre><code class=\"css\">\u251c\u2500\u2500 main \u2502   \u251c\u2500\u2500 main.cc                # Main application logic \u2502   \u251c\u2500\u2500 u8g2_esp32_hal.h       # HAL for U8G2 library \u2502   \u251c\u2500\u2500 u8g2_esp32_hal.c       # Implementation of U8G2 HAL \u2502   \u251c\u2500\u2500 MFCC_Q15.cc            # MFCC computation logic \u2502   \u251c\u2500\u2500 model.h                # TensorFlow Lite model header \u2502   \u251c\u2500\u2500 dct_wei_mtx_q15_T.h    # DCT weight matrix for MFCC computation \u2502   \u251c\u2500\u2500 hann_lut_q15.h         # Hanning window lookup table \u2502   \u251c\u2500\u2500 log_lut_q13_3.h        # Logarithm lookup table \u2502   \u251c\u2500\u2500 mel_wei_mtx_q15_T.h    # Mel filter bank weights \u2502   \u251c\u2500\u2500 mfccs_consts.h         # Constants for MFCC computation \u251c\u2500\u2500 components \u2502   \u251c\u2500\u2500 esp-tflite-micro       # TensorFlow Lite Micro component \u2502   \u251c\u2500\u2500 esp-mfcc               # MFCC computation library \u2502   \u251c\u2500\u2500 u8g2                   # U8G2 library for OLED display \u251c\u2500\u2500 CMakeLists.txt             # Build configuration \u251c\u2500\u2500 README.md                  # Project documentation <\/code><\/pre>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/vladipirogov\/genre-classification-esp32\" rel=\"noopener noreferrer nofollow\">genre-classification-esp32<\/a>.<\/p>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 reggae-\u0436\u0430\u043d\u0440\u0430<\/strong><\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/681674afa54631a83a8753a4\" data-style=\"\" id=\"681674afa54631a83a8753a4\" width=\"\"><\/div>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 metall-\u0436\u0430\u043d\u0440\u0430<\/strong><\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/681674affc0bb4a81647dca2\" data-style=\"\" id=\"681674affc0bb4a81647dca2\" width=\"\"><\/div>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043b\u0443\u0436\u0438\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0432\u0443\u043a\u0430 \u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0447\u0438. \u0423\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\/blob\/main\/Chapter05_06\/ArduinoSketches\/11_music_genre_classification.ino\" rel=\"noopener noreferrer nofollow\">11_music_genre_classification.ino<\/a> \u0434\u043b\u044f ESP-IDF \u043f\u0440\u043e\u0435\u043a\u0442\u0430 ESP32-C3. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u0438\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 CMSIS, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OLED-\u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c u8g2.<br \/>\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f 10 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u043e\u0432.<br \/>\u0418\u0437 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430 ESP32 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0436\u0430\u043d\u0440\u043e\u0432. \u0415\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Jupyter, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b \u0438\u0437 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0436\u0430\u043d\u0440\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0439. \u041e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0436\u0430\u043d\u0440\u044b \u0441 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0433\u0438\u0442\u0430\u0440\u043d\u044b\u0435 \u0441\u043e\u043b\u043b\u043e-\u043f\u0430\u0440\u0442\u0438\u0438 \u0432 \u043c\u0435\u0442\u0430\u043b\u043b-\u0433\u0440\u0443\u043f\u043f\u0430\u0445. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0432\u0435\u043b\u0438\u043a\u0430. \u041f\u0440\u043e\u0435\u043a\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u0441 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0432\u0443\u043a\u0430.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435  \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.oreilly.com\/library\/view\/tinyml-cookbook\/9781837637362\/\" rel=\"noopener noreferrer nofollow\">TinyML Cookbook &#8212; Second Edition<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/speechprocessingbook.aalto.fi\/Representations\/Melcepstrum.html\" rel=\"noopener noreferrer nofollow\">The cepstrum, mel-cepstrum and mel-frequency cepstral coefficients<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/practicalcryptography.com\/miscellaneous\/machine-learning\/guide-mel-frequency-cepstral-coefficients-mfccs\/\" rel=\"noopener noreferrer nofollow\">Mel Frequency Cepstral Coefficient (MFCC) tutorial<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\" rel=\"noopener noreferrer nofollow\">TinyML-Cookbook_2E source code<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/v4.4\/esp32c3\/api-reference\/peripherals\/adc.html\" rel=\"noopener noreferrer nofollow\">ESP32-C3 Analog to Digital Converter<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/01Space\/ESP32-C3-0.42LCD\" rel=\"noopener noreferrer nofollow\">ESP32C3 0.42 OLED<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/playlist?list=PL-wATfeyAMNqIee7cH3q1bh4QJFAaeNv0\" rel=\"noopener noreferrer nofollow\">Audio Signal Processing for Machine Learning<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/ARM-software\/CMSIS-DSP\" rel=\"noopener noreferrer nofollow\">CMSIS-DSP<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/906658\/\"> https:\/\/habr.com\/ru\/articles\/906658\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u043e\u0432 \u0430\u0443\u0434\u0438\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 ESP32-C3. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u0437\u044f\u0442 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043a\u043d\u0438\u0433\u0438 <a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\" rel=\"noopener noreferrer nofollow\">TinyML-Cookbook_2E<\/a>.<br \/>\u041f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0440\u0435\u0447\u0438 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0432\u0443\u043a\u043e\u0432 \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <strong>cepstrum<\/strong>, <strong>mel-cepstrum<\/strong> \u0438 <strong>MFCC<\/strong> &#8212; \u044d\u0442\u043e \u0448\u0430\u0433\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442 \u0437\u0432\u0443\u043a \u0432 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0444\u043e\u0440\u043c\u0443.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/h2>\n<p>\u041c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0432 \u0441\u043f\u0435\u043a\u0442\u0440, \u043f\u043e\u0442\u043e\u043c \u0431\u0435\u0440\u0451\u043c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0441\u043f\u0435\u043a\u0442\u0440\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435. \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f cepstrum.<\/p>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435:<\/p>\n<ol>\n<li>\n<p>\u0411\u0435\u0440\u0451\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0437\u0432\u0443\u043a\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 20\u201340 \u043c\u0441).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u0435\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440 (FFT).<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0440\u0451\u043c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u2014 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043f\u0435\u043a\u0442\u0440 \u0431\u043e\u043b\u0435\u0435 \u00ab\u0440\u043e\u0432\u043d\u044b\u043c\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043d\u043e\u0432\u0430 FFT \u2192 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u044d\u0442\u043e cepstrum.<\/p>\n<\/li>\n<\/ol>\n<p>\u041b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 (\u0430 \u0441\u043f\u0435\u043a\u0442\u0440 \u0440\u0435\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0433\u043e\u043b\u043e\u0441\u0430 \u0438 \u0432\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0440\u0430\u043a\u0442\u0430) \u0432 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0410 \u0437\u0430\u0442\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 FFT \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0437\u0432\u0443\u043a \u0440\u0435\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0437\u0432\u0443\u043a\u0430 (excitation) \u2014 \u0432\u0438\u0431\u0440\u0430\u0446\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u0441\u0432\u044f\u0437\u043e\u043a. \u042d\u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 100 \u0413\u0446).<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0442\u0440\u0430\u043a\u0442 (vocal tract) \u2014 \u0440\u043e\u0442, \u044f\u0437\u044b\u043a, \u0433\u0443\u0431\u044b \u0438 \u0442.\u043f., \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0437\u0432\u0443\u043a, \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u044f\/\u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b.<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c IFFT, \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 (quefrency) \u044d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0438\u0435 quefrency (0\u201310 \u043c\u0441) \u2192 \u0444\u043e\u0440\u043c\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0442\u0440\u0430\u043a\u0442\u0430 (\u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0430\u044f).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 quefrency (10\u201320 \u043c\u0441) \u2192 \u0432\u043e\u0437\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c, F0.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Quefrency<\/strong> \u2014 \u044d\u0442\u043e \u0448\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0431\u0443\u043a\u0432 \u043e\u0442 <em>frequency<\/em>, \u0447\u0430\u0441\u0442\u043e\u0442\u0430), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0441\u044c \u0432 cepstrum. \u041d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u0435 \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u0422\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f quefrency (\u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430) \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0433\u043b\u0430\u0434\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u2014 \u044d\u0442\u043e \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0430\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0438\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0442\u043e\u043d\u043e\u043c (F0).<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0424\u043e\u0440\u043c\u0430\u043d\u0442\u044b<\/strong> \u2014 \u044d\u0442\u043e \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u043f\u0438\u043a\u0438 \u0432 \u0441\u043f\u0435\u043a\u0442\u0440\u0435 \u0440\u0435\u0447\u0438. \u041e\u043d\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0438\u0437-\u0437\u0430 \u0440\u0435\u0437\u043e\u043d\u0430\u043d\u0441\u0430 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u043c \u0442\u0440\u0430\u043a\u0442\u0435 (\u0440\u043e\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u0442\u0438, \u0433\u043e\u0440\u0442\u0430\u043d\u0438 \u0438 \u0442.\u0434.).<br \/> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0433\u043b\u0430\u0441\u043d\u044b\u0435, \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 \u0438 \u0433\u0443\u0431 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u043e\u043d\u0430\u043d\u0441\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u2014 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0433\u043b\u0430\u0441\u043d\u044b\u0439 \u0437\u0432\u0443\u043a \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439 \u00ab\u0443\u0437\u043e\u0440\u00bb \u0444\u043e\u0440\u043c\u0430\u043d\u0442, \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u043d\u0438\u043c \u043c\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u043c \u043e\u0434\u043d\u0438 \u0433\u043b\u0430\u0441\u043d\u044b\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 cepstrum \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0438\u0437\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f quefrency (\u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435), \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0433\u043b\u0430\u0434\u043a\u0443\u044e \u043e\u0433\u0438\u0431\u0430\u044e\u0449\u0443\u044e \u0441\u043f\u0435\u043a\u0442\u0440\u0430. \u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435: \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443.<\/p>\n<h4>Mel-\u0448\u043a\u0430\u043b\u0430 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/h4>\n<p>\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0445\u043e \u0441\u043b\u044b\u0448\u0438\u0442 \u043d\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e: \u043c\u044b \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u043c \u043d\u0438\u0437\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b, \u0447\u0435\u043c \u0432\u044b\u0441\u043e\u043a\u0438\u0435.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><strong>Mel-\u0448\u043a\u0430\u043b\u0430<\/strong> \u2014 \u044d\u0442\u043e \u0448\u043a\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u043a \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u043c\u0443.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 500 \u0438 1000 \u0413\u0446 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0410 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 5000 \u0438 5500 \u0413\u0446 \u2014 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>Mel-\u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/strong> \u2014 \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432, \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u043f\u043e mel-\u0448\u043a\u0430\u043b\u0435. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0432 \u0447\u0430\u0441\u0442\u043e\u0442\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u0445, \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043b\u0443\u0445\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p><strong>MFCC (Mel-Frequency Cepstral Coefficients)<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<p>\u0428\u0430\u0433\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f MFCC:<\/p>\n<ol>\n<li>\n<p>\u0414\u0435\u043b\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0430 \u043e\u043a\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u043a\u043d\u0430: <\/p>\n<ul>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0438\u043c \u0441\u043f\u0435\u043a\u0442\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 mel-\u0444\u0438\u043b\u044c\u0442\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0435\u0440\u0451\u043c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c DCT (\u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441-\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435) \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0434\u0435\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0444\u043e\u0440\u043c\u0443 \u0441\u043f\u0435\u043a\u0442\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b \u043a \u0448\u0443\u043c\u0443 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0447\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0430\u0443\u0434\u0438\u043e.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f ML-\u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0432 <code>tflite<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 <code>model.h<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u043c Jupyter Notebook <a href=\"https:\/\/github.com\/PacktPublishing\/TinyML-Cookbook_2E\/blob\/main\/Chapter05_06\/ColabNotebooks\/prepare_model.ipynb\" rel=\"noopener noreferrer nofollow\">prepare_model.ipynb<\/a>. \u0424\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 VScode \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c Jupyter, \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Google Colab.<br \/> \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0430\u0432\u0442\u043e\u0440 \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0430\u043d\u0440\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f: &#8216;disco&#8217;, &#8216;jazz&#8217;, &#8216;metal&#8217; \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 <a href=\"https:\/\/www.kaggle.com\/datasets\/andradaolteanu\/gtzan-dataset-music-genre-classification\" rel=\"noopener noreferrer nofollow\">GTZAN Dataset<\/a> \u0438\u0437 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 Raspberry Pico. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0434\u0435\u0441\u044f\u0442\u0438 \u0436\u0430\u043d\u0440\u0430\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0438 ESP32 \u0441 \u044d\u0442\u0438\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<br \/> \u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d<strong>\u044b<\/strong>\u0445 \u0440\u044f\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Lstm (\u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0439) \u0441\u043b\u043e\u0439 ML-\u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"python\">x = norm_layer(input) x = layers.LSTM(32, return_sequences=True)(x) x = layers.Dropout(0.5)(x) x = layers.Flatten()(x) x = layers.Dense(32, activation='relu')(x) x = layers.Dense(len(LIST_GENRES), activation='softmax')(x)<\/code><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 Python \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f <code>Tensorflow<\/code> \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>Keras 3<\/code> \u0432\u0435\u0440\u0441\u0438\u0438. \u0418 \u044d\u0442\u043e \u0432\u043b\u0435\u0447\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412 \u0444\u0430\u0439\u043b\u0435 <code>prepare_model.ipynb<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>Keras 2<\/code> \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <code>.tflite<\/code>. \u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430 <code>keras 3<\/code> \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c, \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a &#171;\u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0435\u043c\u0443&#187; \u0427\u0430\u0442\u0443. \u041d\u043e \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u0442\u0435\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 OPS \u0441\u043b\u043e\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 espressif\/esp-tflite-micro.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.  \u0420\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 <code>prepare_model.ipynb<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c <code>tensorflow<\/code> \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 <code>2.12.0.<\/code><\/p>\n<pre><code class=\"python\">!pip install numpy==1.23.5 !pip install cmsisdsp==1.9.6 !pip install tensorflow==2.12.0<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.kaggle.com\/datasets\/andradaolteanu\/gtzan-dataset-music-genre-classification\" rel=\"noopener noreferrer nofollow\">GTZAN Dataset<\/a>. \u0412 Jupyter \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 <code>mgr_dataset<\/code>. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 Colab \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435 Google drive \u0438 \u0442\u0443\u0434\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u043c\u0435\u043b\u043e\u0434\u0438\u0439 \u0438\u0437 <code>genres_original<\/code>, \u0438\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c Jupyter-\u0444\u0430\u0439\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Google drive \u043a Colab.<\/p>\n<pre><code class=\"python\">from google.colab import drive drive.mount('\/content\/drive')<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432\u0441\u043f\u043b\u044b\u0432\u0435\u0442 \u0434\u0438\u0430\u043b\u043e\u0433 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 Google, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u0438\u0430\u043b\u043e\u0433 \u0432\u044b\u0431\u043e\u0440\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0438\u0441\u043a \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f, \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c \u0441 \u043e\u0431\u0440\u0430\u0437\u0446\u0430\u043c\u0438 \u043c\u0435\u043b\u043e\u0434\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 10 \u0442\u0438\u043f\u043e\u0432 \u0436\u0430\u043d\u0440\u0430 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a <code>LIST_GENRES<\/code><\/p>\n<pre><code class=\"python\">LIST_GENRES = ['blues', 'classical', 'country', 'disco', 'hiphop', 'jazz', 'metal', 'pop', 'reggae', 'rock']<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <code>prepare_model.ipynb<\/code> \u0438 \u0438\u0434\u0442\u0438 \u0437\u0430\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u0447\u0430\u0439.<br \/> \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0438\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432 Colab, \u0442\u043e \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043d\u044f\u043b 18 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 <code>C<\/code> \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 MFCC-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b.<\/p>\n<figure class=\"\">\n<div><figcaption>MFCC-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0432 Google Colab<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 (\u043a\u0440\u043e\u043c\u0435 test_dst.h, test_src.h) \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <a href=\"https:\/\/components.espressif.com\/components\/espressif\/esp-tflite-micro\/versions\/1.3.1?language=en\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/a> Tensorflow lite \u0432 ESP-IDF \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 ESP-IDF \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<pre><code>idf.py add-dependency \"esp-tflite-micro\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 <code>idf_component.yml<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/p>\n<pre><code class=\"yaml\">## IDF Component Manager Manifest File dependencies:   espressif\/esp-tflite-micro: \"*\"   ## Required IDF version   idf:     version: \"&gt;=4.1.0\"<\/code><\/pre>\n<p>\u0412 <code>espressif\/esp-tflite-micro<\/code> \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u043e\u0438 \u043c\u043e\u0434\u0435\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0444\u0430\u0439\u043b model.tflite \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 <a href=\"https:\/\/netron.app\" rel=\"noopener noreferrer nofollow\">https:\/\/netron.app<\/a>. \u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>Tensorflow lite model<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/891314\/\" rel=\"noopener noreferrer nofollow\">Machine learning \u043d\u0430 ESP32<\/a> \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f ESP32. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<pre><code class=\"cpp\">void tflu_initialization() {     if (tensor_arena == NULL) {         tensor_arena = (uint8_t *) heap_caps_malloc(tensor_arena_size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);       }       if (tensor_arena == NULL) {         ESP_LOGE(TAG, \"Couldn't allocate memory of %d bytes\\n\", tensor_arena_size);         return;       }       tflu_model = tflite::GetModel(model_tflite);     if (tflu_model-&gt;version() != TFLITE_SCHEMA_VERSION) {         ESP_LOGE(TAG, \"Model schema version mismatch!\");         while (1);     }      static tflite::MicroMutableOpResolver&lt;9&gt;; resolver;     resolver.AddQuantize();     resolver.AddDequantize();     resolver.AddSub();     resolver.AddMul();     resolver.AddUnidirectionalSequenceLSTM();     resolver.AddStridedSlice();     resolver.AddFullyConnected();     resolver.AddSoftmax();      static tflite::MicroInterpreter static_interpreter(         tflu_model, resolver, tensor_arena, tensor_arena_size);      tflu_interpreter = &amp;static_interpreter;     tflu_interpreter-&gt;AllocateTensors();      tflu_i_tensor = tflu_interpreter-&gt;input(0);     tflu_o_tensor = tflu_interpreter-&gt;output(0);      ESP_LOGI(TAG, \"TensorFlow Lite initialization completed\"); } <\/code><\/pre>\n<h2>\u041c\u043e\u0434\u0443\u043b\u044c ESP32-C3<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u043c\u043e\u0434\u0443\u043b\u044c ESP32-C3 0.42 OLED. \u041e\u043d \u0441\u043a\u0440\u043e\u043c\u043d\u043e \u0436\u0434\u0430\u043b \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0441 \u0442\u0435\u0445 \u0432\u0440\u0435\u043c\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043e\u043c RISK-V. \u041c\u043e\u0434\u0443\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/docs.nordicsemi.com\/bundle\/ncs-latest\/page\/zephyr\/boards\/01space\/esp32c3_042_oled\/doc\/index.html#hardware\" rel=\"noopener noreferrer nofollow\">\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/a>:<\/p>\n<ul>\n<li>\n<p>RISC-V SoC @ 160MHz with 4MB flash and 400kB RAM<\/p>\n<\/li>\n<li>\n<p>WS2812B RGB serial LED<\/p>\n<\/li>\n<li>\n<p>0.42-inch OLED over I2C<\/p>\n<\/li>\n<li>\n<p>Qwiic I2C connector<\/p>\n<\/li>\n<li>\n<p>One pushbutton<\/p>\n<\/li>\n<li>\n<p>Onboard ceramic chip antenna<\/p>\n<\/li>\n<li>\n<p>On-chip USB-UART converter<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><\/figure>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0439 \u0444\u0438\u0448\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f 0.42-\u0434\u044e\u0439\u043c\u043e\u0432\u044b\u0439 OLED-\u0434\u0438\u0441\u043f\u043b\u0435\u0439, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u043d\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u0436\u0430\u043d\u0440.<\/p>\n<h2>\u041c\u043e\u0434\u0443\u043b\u044c \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 MAX9814<\/h2>\n<figure class=\"\"><\/figure>\n<p>\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 2,7 \u0412 &#8212; 5,5 \u0412 \u043f\u0440\u0438 \u0442\u043e\u043a\u0435 3 \u043c\u0410<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0445\u043e\u0434: 2Vpp \u043f\u0440\u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0438 1,25\u0412<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u043e\u0442\u043d\u0430\u044f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430: 20 \u0413\u0446 &#8212; 20 \u043a\u0413\u0446<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0430\u0442\u0430\u043a\u0438 \u0438 \u0441\u043f\u0430\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0438\u0437 40\u0434\u0411, 50\u0434\u0411 \u0438\u043b\u0438 60\u0434\u0411<\/p>\n<\/li>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0430\u044f \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0448\u0443\u043c\u0430 30 \u043d\u0412\/\u0413\u0446<\/p>\n<\/li>\n<li>\n<p>\u041d\u0438\u0437\u043a\u0438\u0439 THD: 0,04% (\u0442\u0438\u043f)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440\u044b: 25\u044514\u043c\u043c , \u0434\u0438\u0430\u043c\u0435\u0442\u0440 \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u044f 2\u043c\u043c, \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u0446\u0435\u043d\u0442\u0440\u0430 \u0434\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u044f 10\u043c\u043c<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u043f \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0438\u043b\u0438\u0442\u0435\u043b\u044f \u2013\u00a0<a href=\"https:\/\/www.analog.com\/en\/products\/max9814.html\" rel=\"noopener noreferrer nofollow\">MAX9814<\/a><\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043a\u0442\u0440\u0435\u0442\u043d\u044b\u0439 <a href=\"https:\/\/cdn-shop.adafruit.com\/datasheets\/CMA-4544PF-W.pdf\" rel=\"noopener noreferrer nofollow\">\u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d<\/a><\/p>\n<\/li>\n<\/ul>\n<figure class=\"\">\n<div><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u044b\u0432\u043e\u0434 OUT \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c\u0443 \u0432\u0445\u043e\u0434\u0443 A0 ESP32-\u04213. \u0412\u044b\u0432\u043e\u0434 Gain \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a V+, \u0442\u043e\u0433\u0434\u0430 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c.<br \/>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0441\u0446\u0438\u043b\u043b\u043e\u0433\u0440\u0430\u0444\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0442\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d, \u0449\u0443\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a OUT, \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e\u0441\u0438\u0433\u043d\u0430\u043b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432<\/h><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-458491","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=458491"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458491\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=458491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=458491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=458491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}