{"id":308387,"date":"2020-08-12T15:00:50","date_gmt":"2020-08-12T15:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308387"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308387","title":{"rendered":"\u0412\u044b\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0430\u0443\u0434\u0438\u043e\u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 AI"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/514854\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qz\/cu\/dd\/qzcuddcxoxbapqghcebqsli81zw.png\"><\/div>\n<p>  \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447 \u0444\u043e\u043d\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0438\u0437\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u043e\u043d\u0442\u0430\u0436\u0430, \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438. \u0423 \u043d\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0435\u0451 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043b\u044f\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u2013 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041d\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u044b\u0441\u044f\u0447, \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u0442\u0435\u043d \u0442\u044b\u0441\u044f\u0447 \u0430\u0443\u0434\u0438\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439?<\/p>\n<p>  \u041d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043c\u0435\u0442\u043e\u0434\u044b AI, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0430\u0443\u0434\u0438\u043e, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 NewTechAudit <a href=\"https:\/\/newtechaudit.ru\/obrabotka-audio-s-pomoshhyu-ffmpeg\/\" rel=\"nofollow\">\u00ab\u041e\u0411\u0420\u0410\u0411\u041e\u0422\u041a\u0410 \u0410\u0423\u0414\u0418\u041e \u0421 \u041f\u041e\u041c\u041e\u0429\u042c\u042e FFMPEG\u00bb<\/a>.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u043e? \u041a\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438, \u043e\u0442 \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430?<\/p>\n<p>  <a name=\"habracut\"><\/a> \u0422\u0430\u043a\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u2014 \u044d\u0442\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u0442\u044b \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0430\u043c\u043e\u0439 \u041e\u0421, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u0445 \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ol>\n<li> \u0441\u0434\u0432\u0438\u0433 \u043a\u043e\u043d\u0442\u0443\u0440\u043e\u0432;<\/li>\n<li> \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e;<\/li>\n<li> \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0443\u0437;<\/li>\n<li> \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435.<\/li>\n<\/ol>\n<p>  \u0418 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0432\u0443\u0447\u0430\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430\u043c\u0438 \u2014 \u0444\u043e\u043d\u043e\u0441\u043a\u043e\u043f\u0438\u0441\u0442\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0444\u0442\u0430 \u0442\u0438\u043f\u0430 Praat, Speech Analyzer SIL, ELAN, \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0442\u0440\u0430\u043a\u0442\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<\/p>\n<p>  \u042d\u043a\u0441\u043f\u0435\u0440\u0442\u0430\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u0443\u0434\u0438\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u0435\u0433\u043e \u043c\u0435\u043b-\u043a\u0435\u043f\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432, \u0438 \u0437\u0430\u043e\u0434\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0435\u0433\u043e \u043f\u043e\u0434 \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<p>  \u0422\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c?<\/p>\n<p>  \u0418\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0438\u0434\u043e\u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0432 \u0430\u0443\u0434\u0438\u043e \u0444\u0430\u0439\u043b\u044b, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438\u0437 \u0430\u0443\u0434\u0438\u043e, \u043b\u0438\u0431\u043e \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043f\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0443\u0441\u043a\u043e\u043c \u2014 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 cut\/copy \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0442.\u043a. \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0447\u0430\u0441\u0442\u0438 \u0448\u0443\u043c\u043e\u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u043e\u043d\u0430 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043d\u0435 \u043d\u0435\u0441\u0443\u0442 \u0440\u0438\u0441\u043a\u043e\u0432 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0418 \u043a\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 cut\/copy? \u0418\u0445 \u0436\u0435 \u043d\u0430\u0434\u043e \u0441 \u0447\u0435\u043c-\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c?<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2013 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b FFmpeg \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0447\u0430\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u043b-\u043a\u0435\u043f\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u00ab\u043f\u043e\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u0433\u043e\u00bb \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  \u041a\u043e\u0434 \u0434\u043b\u044f \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">import numpy as np import librosa import librosa.display import matplotlib.pyplot as plt  def make_spek(audio):     n_fft = 2048     y, sr = librosa.load(audio)     ft = np.abs(librosa.stft(y[:n_fft], hop_length = n_fft+1))     spec = np.abs(librosa.stft(y, hop_length=512))     spec = librosa.amplitude_to_db(spec, ref=np.max)     mel_spect = librosa.feature.melspectrogram(y=y, sr=sr, n_fft=2048, hop_length=1024)     mel_spect = librosa.power_to_db(mel_spect, ref=np.max)     librosa.display.specshow(mel_spect, y_axis='mel', fmax=8000, x_axis='time');     plt.title('Mel Spectrogram');     plt.colorbar(format='%+2.0f dB');     plt.show(); make_spek('.\/audio\/original.wav')# '.\/audio\/original.wav' \u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0430\u0443\u0434\u0438\u043e \u0444\u0430\u0439\u043b\u0430<\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u043f\u043e\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0442\u0438\u043b\u0438\u0442\u044b FFmpeg: <\/p>\n<pre><code class=\"python\">ffmpeg -i oroginal.wav -ss STARTTIME -to ENDTIME -acodec copy cut.wav <\/code><\/pre>\n<p>  \u0433\u0434\u0435 STARTTIME \u0438 ENDTIME \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430. \u0410 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"python\">ffmpeg -iconcat:&quot;part_0.wav|part_1.wav |part_2.wav&quot; -codeccopyconcat.wav<\/code><\/pre>\n<p>  \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 part_1.wav\u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0430\u0441\u0442\u044f\u043c\u0438 (\u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 FFmpeg \u0432 python \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u0448\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0440\u043e FFmpeg).<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u043b-\u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u0438 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u044b \u0447\u0430\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e \u043f\u043e 0.2-2.5 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0438 \u043c\u0435\u043b-\u0441\u043f\u0435\u043a\u0442\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b\u0438 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u044b \u0447\u0430\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e \u043f\u043e 0.2-2.5 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0430\u0443\u0434\u0438\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u0430: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jp\/xb\/yh\/jpxbyhxn2yfjwcxo8nhfzxrsivm.jpeg\"><\/p>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u043c\u044b \u0434\u0430\u0436\u0435 \u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438. \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043f\u043e \u043f\u0430\u043f\u043a\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u0430\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a: <\/p>\n<pre><code class=\"python\">model.py # \u043c\u043e\u0434\u0435\u043b\u044c \/input\/train\/original\/ # \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0430\u0443\u0434\u0438\u043e \/input\/train\/cut_copy\/ # \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0441 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0431\u044b\u043b \u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u0430\u0443\u0434\u0438\u043e \u0444\u0430\u0439\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d \u2014 \u043c\u044b \u0434\u0435\u043b\u0438\u043c \u0432\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0438 \u043f\u043b\u043e\u0445\u0438\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443 \u043d\u0430\u0441 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439, \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c Keras.<\/p>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043f\u0430\u043a\u0435\u0442\u044b from keras.models import Sequential from keras.layers import Flatten from keras.layers import Dense from keras.layers import Conv2D from keras.layers import MaxPooling2D  # \u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 classifier = Sequential() classifier.add(Conv2D(32, (3, 3), input_shape = (64, 64, 3), activation = 'relu')) classifier.add(MaxPooling2D(pool_size = (2, 2))) classifier.add(Conv2D(32, (3, 3), activation = 'relu')) classifier.add(MaxPooling2D(pool_size = (2, 2))) classifier.add(Flatten()) classifier.add(Dense(units = 128, activation = 'relu')) classifier.add(Dense(units = 1, activation = 'sigmoid')) classifier.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])  # \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 from keras.preprocessing.image import ImageDataGenerator as img  train_datagen = img(rescale = 1.\/255, shear_range = 0.2, zoom_range = 0.2, horizontal_flip = True) test_datagen = img(rescale = 1.\/255) training_set = train_datagen.flow_from_directory('input\/train', target_size = (64, 64), batch_size = 32, class_mode = 'binary') test_set = test_datagen.flow_from_directory('input\/test', target_size = (64, 64), batch_size = 32, class_mode = 'binary') classifier.fit_generator(     training_set,     steps_per_epoch = 8000,     epochs = 25,     validation_data = test_set,     validation_steps = 2000)<\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0438\u043b\u0430\u0441\u044c, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0441 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e<\/p>\n<pre><code class=\"python\">import numpy as np from keras.preprocessing import image  test_image = image.load_img('dataset\/prediction\/original_or_corrupt.jpg', target_size = (64, 64)) test_image = image.img_to_array(test_image) test_image = np.expand_dims(test_image, axis = 0) result = classifier.predict(test_image) training_set.class_indices ifresult[0][0] == 1: prediction = 'original' else: prediction = 'corrupt'<\/code><\/pre>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0430\u0443\u0434\u0438\u043e \u0444\u0430\u0439\u043b\u0430 \u2014 \u2018original\u2019\/\u2019corrupt\u2019, \u0442.\u0435. \u0444\u0430\u0439\u043b \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b.<\/p>\n<p>  \u041c\u044b \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u0434\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0449\u0438\u0435 \u0432\u0435\u0449\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0442\u0440\u0443\u0434\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u0432 AI, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0430\u0443\u0434\u0438\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041d\u0443 \u0438 \u043f\u043e\u0431\u044b\u043b\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430\u043c\u0438 \u0438\u0437 \u0434\u0435\u0442\u0435\u043a\u0442\u0438\u0432\u0430.<\/p><\/div>\n<p> \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\/post\/514854\/\"> https:\/\/habr.com\/ru\/post\/514854\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/514854\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qz\/cu\/dd\/qzcuddcxoxbapqghcebqsli81zw.png\"><\/div>\n<p>  \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447 \u0444\u043e\u043d\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0438\u0437\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u043e\u043d\u0442\u0430\u0436\u0430, \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438. \u0423 \u043d\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0435\u0451 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043b\u044f\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u2013 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041d\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u044b\u0441\u044f\u0447, \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u0442\u0435\u043d \u0442\u044b\u0441\u044f\u0447 \u0430\u0443\u0434\u0438\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439?<\/p>\n<p>  \u041d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043c\u0435\u0442\u043e\u0434\u044b AI, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0430\u0443\u0434\u0438\u043e, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 NewTechAudit <a href=\"https:\/\/newtechaudit.ru\/obrabotka-audio-s-pomoshhyu-ffmpeg\/\" rel=\"nofollow\">\u00ab\u041e\u0411\u0420\u0410\u0411\u041e\u0422\u041a\u0410 \u0410\u0423\u0414\u0418\u041e \u0421 \u041f\u041e\u041c\u041e\u0429\u042c\u042e FFMPEG\u00bb<\/a>.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u043e? \u041a\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438, \u043e\u0442 \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430?<\/p>\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-308387","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308387","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=308387"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308387\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}