{"id":372366,"date":"2024-05-21T05:10:22","date_gmt":"2024-05-21T05:10:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=372366"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=372366","title":{"rendered":"<span>\u041c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0418\u0418-\u0441\u0435\u043a\u0440\u0435\u0442\u0430\u0440\u044f \u0441 Whisper \u0438 ChatGPT<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/bde\/3f9\/a2c\/bde3f9a2c178f63243cc376ce5149830.jpg\" alt=\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0438\u0441\u0438 \u0445\u043e\u0434\u0430 \u0441\u043e\u0437\u0432\u043e\u043d\u0430 (\u0444\u043e\u0442\u043e \u0432 \u0446\u0432\u0435\u0442\u0435)\" title=\"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0438\u0441\u0438 \u0445\u043e\u0434\u0430 \u0441\u043e\u0437\u0432\u043e\u043d\u0430 (\u0444\u043e\u0442\u043e \u0432 \u0446\u0432\u0435\u0442\u0435)\" width=\"1800\" height=\"1214\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bde\/3f9\/a2c\/bde3f9a2c178f63243cc376ce5149830.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0438\u0441\u0438 \u0445\u043e\u0434\u0430 \u0441\u043e\u0437\u0432\u043e\u043d\u0430 (\u0444\u043e\u0442\u043e \u0432 \u0446\u0432\u0435\u0442\u0435)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0439, \u0438 \u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u00a0\u0441\u043f\u0435\u0446\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u0432\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u0435 AllSee. \u0412\u00a0\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0441\u0442\u0430\u043b \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b\u043c \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0432\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445 \u043d\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u044f \u0432\u0435\u0440\u044e, \u0447\u0442\u043e\u00a0\u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a\u00a0\u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0412\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Whisper \u0438 ChatGPT \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0418\u0418\u2011\u0441\u0435\u043a\u0440\u0435\u0442\u0430\u0440\u044f, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432.<\/p>\n<h2>\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041d\u0435\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u043e\u00a0\u0438 \u043d\u0430\u0443\u0447\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0418\u0418 \u0432\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c: <a href=\"https:\/\/joshbersin.com\/2023\/03\/new-mit-research-shows-spectacular-increase-in-white-collar-productivity-from-chatgpt\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043b\u044f\u00a0\u0431\u0435\u043b\u044b\u0445 \u0432\u043e\u0440\u043e\u0442\u043d\u0438\u0447\u043a\u043e\u0432 \u0434\u043e 37%<\/a>!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4e3\/75e\/d12\/4e375ed12970841740234390d1c2246e.png\" alt=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/joshbersin.com\/2023\/03\/new-mit-research-shows-spectacular-increase-in-white-collar-productivity-from-chatgpt\/\" title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/joshbersin.com\/2023\/03\/new-mit-research-shows-spectacular-increase-in-white-collar-productivity-from-chatgpt\/\" width=\"814\" height=\"587\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e3\/75e\/d12\/4e375ed12970841740234390d1c2246e.png\"\/><\/p>\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/joshbersin.com\/2023\/03\/new-mit-research-shows-spectacular-increase-in-white-collar-productivity-from-chatgpt\/<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u00ab\u0432\u044b\u0431\u0438\u0442\u044c\u00bb \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0440\u0443\u0442\u0438\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0432\u0432\u043e\u0434\u043d\u044b\u0435?<\/h3>\n<p>\u0415\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0430\u0437\u0430 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c, \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u044f \u043f\u043e 30\u201340\u00a0\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u00a0\u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c, \u0430\u00a0\u0434\u043b\u044f\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0438\u0434\u0435\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f\u00a0\u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u0438\u043b\u0438\u00a0\u0441\u0431\u043e\u0440\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430.<\/p>\n<p>\u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u043f\u0446\u0438\u0438 \u0432\u0441\u0442\u0440\u0435\u0447 \u0441\u00a0\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0434\u043b\u044f\u00a0\u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0443\u0442\u043e\u0447\u043d\u044f\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0443\u00a0\u0418\u0418\u2011\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430. \u0414\u043b\u044f\u00a0\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u00a0\u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Telegram\u2011\u0431\u043e\u0442\u0430.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u00a0\u0441\u0435\u0431\u044f: <\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u0430 \u043d\u0430\u00a0\u0431\u0430\u0437\u0435 <a href=\"https:\/\/docs.python-telegram-bot.org\/en\/v21.0.1\/\" rel=\"noopener noreferrer nofollow\">python\u2011telegram\u2011bot<\/a><\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 <a href=\"https:\/\/github.com\/tdlib\/telegram-bot-api\" rel=\"noopener noreferrer nofollow\">telegram\u2011bot\u2011api<\/a><\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/allseeteam\/whisperx-fastapi\" rel=\"noopener noreferrer nofollow\">API WhisperX<\/a><\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043a\u0441\u0438\u2011\u0441\u0435\u0440\u0432\u0435\u0440<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/platform.openai.com\/docs\/overview\" rel=\"noopener noreferrer nofollow\">ChatGPT API<\/a><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/878\/c2e\/d89\/878c2ed896e0350337f8316ab15197e4.png\" alt=\"\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\" title=\"\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\" width=\"795\" height=\"403\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/878\/c2e\/d89\/878c2ed896e0350337f8316ab15197e4.png\"\/><\/p>\n<div><figcaption>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u042f \u043e\u043f\u0443\u0449\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0UX \u0431\u043e\u0442\u0430, \u043d\u043e\u00a0\u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u0441\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u0430\u043c \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u043f\u0440\u0438\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h3>Sqiud Proxy<\/h3>\n<p>\u0414\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441 <a href=\"https:\/\/platform.openai.com\/docs\/overview\" rel=\"noopener noreferrer nofollow\">ChatGPT API<\/a> \u0438\u0437\u00a0\u0420\u043e\u0441\u0441\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c proxy\u2011\u0441\u0435\u0440\u0432\u0435\u0440. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.squid-cache.org\/Intro\/\" rel=\"noopener noreferrer nofollow\">Squid<\/a>\u00a0\u2014 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u043a\u0441\u0438\u2011\u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f\u00a0\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 HTTP, HTTPS, FTP \u0438 Gopher.<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Squid Proxy<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u00a0\u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u00a0OS Ubuntu, \u043d\u043e\u00a0\u0438 \u0434\u043b\u044f\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0435\u0439, \u043e\u0442\u043b\u0438\u0447\u0430\u044f\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 squid<\/h4>\n<pre><code class=\"bash\">sudo apt update sudo apt-get -y install squid<\/code><\/pre>\n<h4>\u041f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0306\u043a\u0430 \u0441\u0435\u0442\u0438<\/h4>\n<pre><code class=\"bash\">sudo ufw allow squid sudo iptables -P INPUT ACCEPT<\/code><\/pre>\n<h4>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 squid<\/h4>\n<pre><code class=\"bash\">sudo systemctl enable squid<\/code><\/pre>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 squid <\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u0435\u043a\u0430\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 squid \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0438\u0437\u00a0\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432\u0441\u0451 <strong>8000<\/strong> \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.<\/p>\n<pre><code class=\"bash\">sudo cp \/etc\/squid\/squid.conf \/etc\/squid\/squid_back.conf sudo  grep -v '^ *#\\|^ *$' \/etc\/squid\/squid.conf > \/etc\/squid\/squid.conf<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 squid.<\/p>\n<pre><code class=\"bash\">sudo apt-get -y install nano sudo nano \/etc\/squid\/squid.conf<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b squid.conf \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">... http_access allow localhost acl whitelist src 111.111.111.111   # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c IP \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 IP) \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0430 http_access allow whitelist         # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 http_access deny all ...<\/code><\/pre>\n<h4>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a c\u0435\u0440\u0432\u0438\u0441\u0430 squid<\/h4>\n<p>\u0414\u043b\u044f\u00a0\u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c squid.<\/p>\n<pre><code class=\"bash\">sudo systemctl restart squid<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>WhisperX<\/h3>\n<p>\u0414\u043b\u044f\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u0438\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438: \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0437\u00a0\u0430\u0443\u0434\u0438\u043e\u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u043a\u0442\u043e\u0440\u043e\u0432. \u0417\u0430\u0434\u0430\u0447\u0430 \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043f\u0435\u0440\u0435\u0433\u043e\u0432\u043e\u0440\u0430\u0445 \u0438 \u0441\u043e\u0437\u0432\u043e\u043d\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a\u043e\u0432, \u0430\u00a0\u043c\u043d\u043e\u0433\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b 2-\u043c\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430. <\/p>\n<p>\u041d\u0430\u00a0\u043f\u043e\u043c\u043e\u0449\u044c \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 <a href=\"https:\/\/github.com\/m-bain\/whisperX\" rel=\"noopener noreferrer nofollow\">WhisperX<\/a>\u00a0\u2014 \u00ab\u043e\u0431\u0451\u0440\u0442\u043a\u0430\u00bb \u043d\u0430\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Whisper \u0434\u043b\u044f\u00a0\u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0430\u0446\u0438\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e 100\u00a0\u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 WhisperX \u0432\u00a0\u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/github.com\/allseeteam\/whisperx-fastapi\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 FastAPI\u2011\u0441\u0435\u0440\u0432\u0435\u0440<\/a>, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<details class=\"spoiler\">\n<summary>\u0418\u043c\u043f\u043e\u0440\u0442\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import asyncio import os import uuid from dataclasses import dataclass from datetime import datetime from queue import Queue from threading import Thread from typing import Any  from fastapi import HTTPException, BackgroundTasks, FastAPI, status, Request from fastapi.middleware.cors import CORSMiddleware from pydantic_settings import BaseSettings from streaming_form_data import StreamingFormDataParser from streaming_form_data.targets import FileTarget from streaming_form_data.validators import MaxSizeValidator  import whisperx   @dataclass class WhisperXModels:     whisper_model: Any     diarize_pipeline: Any     align_model: Any     align_model_metadata: Any   class TranscriptionAPISettings(BaseSettings):     tmp_dir: str = 'tmp'     cors_origins: str = '*'     cors_allow_credentials: bool = True     cors_allow_methods: str = '*'     cors_allow_headers: str = '*'     whisper_model: str = 'large-v2'     device: str = 'cuda'     compute_type: str = 'float16'     batch_size: int = 16     language_code: str = 'auto'     hf_api_key: str = ''     file_loading_chunk_size_mb: int = 1024     task_cleanup_delay_min: int = 60     max_file_size_mb: int = 4096     max_request_body_size_mb: int = 5000      class Config:         env_file = 'env\/.env.cuda'         env_file_encoding = 'utf-8'   class MaxBodySizeException(Exception):     def __init__(self, body_len: int):         self.body_len = body_len   class MaxBodySizeValidator:     def __init__(self, max_size: int):         self.body_len = 0         self.max_size = max_size      def __call__(self, chunk: bytes):         self.body_len += len(chunk)         if self.body_len > self.max_size:             raise MaxBodySizeException(self.body_len)   settings = TranscriptionAPISettings()  app = FastAPI() # noinspection PyTypeChecker app.add_middleware(     CORSMiddleware,     allow_origins=settings.cors_origins.split(','),     allow_credentials=settings.cors_allow_credentials,     allow_methods=settings.cors_allow_methods.split(','),     allow_headers=settings.cors_allow_headers.split(','), )<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041b\u043e\u0433\u0438\u043a\u0430 \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">trancription_tasks = {} trancription_tasks_queue = Queue()  whisperx_models = WhisperXModels(     whisper_model=None,     diarize_pipeline=None,     align_model=None,     align_model_metadata=None )   def load_whisperx_models() -> None:     global whisperx_models      whisperx_models.whisper_model = whisperx.load_model(         whisper_arch=settings.whisper_model,         device=settings.device,         compute_type=settings.compute_type,         language=settings.language_code if settings.language_code != \"auto\" else None     )      whisperx_models.diarize_pipeline = whisperx.DiarizationPipeline(         use_auth_token=settings.hf_api_key,         device=settings.device     )      if settings.language_code != \"auto\":         (             whisperx_models.align_model,             whisperx_models.align_model_metadata         ) = whisperx.load_align_model(             language_code=settings.language_code,             device=settings.device         )   def transcribe_audio(audio_file_path: str) -> dict:     global whisperx_models      audio = whisperx.load_audio(audio_file_path)      transcription_result = whisperx_models.whisper_model.transcribe(         audio,         batch_size=int(settings.batch_size),     )      if settings.language_code == \"auto\":         language = transcription_result[\"language\"]         (             whisperx_models.align_model,             whisperx_models.align_model_metadata         ) = whisperx.load_align_model(             language_code=language,             device=settings.device         )      aligned_result = whisperx.align(         transcription_result[\"segments\"],         whisperx_models.align_model,         whisperx_models.align_model_metadata,         audio,         settings.device,         return_char_alignments=False     )      diarize_segments = whisperx_models.diarize_pipeline(audio)      final_result = whisperx.assign_word_speakers(         diarize_segments,         aligned_result     )      return final_result   def transcription_worker() -> None:     while True:         task_id, tmp_path = trancription_tasks_queue.get()          try:             result = transcribe_audio(tmp_path)             trancription_tasks[task_id].update({\"status\": \"completed\", \"result\": result})          except Exception as e:             trancription_tasks[task_id].update({\"status\": \"failed\", \"result\": str(e)})          finally:             trancription_tasks_queue.task_done()             os.remove(tmp_path)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041b\u043e\u0433\u0438\u043a\u0430 FasAPI<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">@app.on_event(\"startup\") async def startup_event() -> None:     os.makedirs(settings.tmp_dir, exist_ok=True)     load_whisperx_models()     Thread(target=transcription_worker, daemon=True).start()   async def cleanup_task(task_id: str) -> None:     await asyncio.sleep(settings.task_cleanup_delay_min * 60)     trancription_tasks.pop(task_id, None)   @app.post(\"\/transcribe\/\") async def create_upload_file(         request: Request,         background_tasks: BackgroundTasks ) -> dict:     task_id = str(uuid.uuid4())     tmp_path = f\"{settings.tmp_dir}\/{task_id}.audio\"      trancription_tasks[task_id] = {         \"status\": \"loading\",         \"creation_time\": datetime.utcnow(),         \"result\": None     }      body_validator = MaxBodySizeValidator(settings.max_request_body_size_mb * 1024 * 1024)      try:         file_target = FileTarget(             tmp_path,             validator=MaxSizeValidator(settings.max_file_size_mb * 1024 * 1024)         )         parser = StreamingFormDataParser(headers=request.headers)         parser.register('file', file_target)         async for chunk in request.stream():             body_validator(chunk)             parser.data_received(chunk)      except MaxBodySizeException as e:         raise HTTPException(             status_code=status.HTTP_413_REQUEST_ENTITY_TOO_LARGE,             detail=f\"Maximum request body size limit exceeded: {e.body_len} bytes\"         )      except Exception as e:         if os.path.exists(tmp_path):             os.remove(tmp_path)         raise HTTPException(             status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,             detail=f\"Error processing upload: {str(e)}\"         )      if not file_target.multipart_filename:         if os.path.exists(tmp_path):             os.remove(tmp_path)         raise HTTPException(             status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,             detail='No file was uploaded'         )      trancription_tasks[task_id].update({\"status\": \"processing\"})     trancription_tasks_queue.put((task_id, tmp_path))      background_tasks.add_task(cleanup_task, task_id)      return {         \"task_id\": task_id,         \"creation_time\": trancription_tasks[task_id][\"creation_time\"].isoformat(),         \"status\": trancription_tasks[task_id][\"status\"]     }   @app.get(\"\/transcribe\/status\/{task_id}\") async def get_task_status(task_id: str) -> dict:     task = trancription_tasks.get(task_id)      if not task:         raise HTTPException(status_code=404, detail=\"Task not found\")      return {         \"task_id\": task_id,         \"creation_time\": task[\"creation_time\"],         \"status\": task[\"status\"]     }   @app.get(\"\/transcribe\/result\/{task_id}\") async def get_task_result(task_id: str) -> dict:     task = trancription_tasks.get(task_id)      if not task:         raise HTTPException(status_code=404, detail=\"Task not found\")      if task[\"status\"] == \"pending\":         raise HTTPException(status_code=404, detail=\"Task not completed\")      return {             \"task_id\": task_id,             \"creation_time\": task[\"creation_time\"],             \"status\": task[\"status\"],             \"result\": task[\"result\"]     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Dockerfile<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">FROM nvidia\/cuda:11.8.0-cudnn8-runtime-ubuntu20.04  RUN apt-get update &amp;&amp; apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes\/ppa RUN apt-get update &amp;&amp; apt-get install -y python3.10 python3.10-venv python3-pip ffmpeg  WORKDIR \/whisperx-fastapi COPY . .  RUN python3.10 -m venv venv RUN \/bin\/bash -c \"source venv\/bin\/activate &amp;&amp; pip install --upgrade pip\" RUN \/bin\/bash -c \"source venv\/bin\/activate &amp;&amp; pip install -e .\" RUN \/bin\/bash -c \"source venv\/bin\/activate &amp;&amp; pip install -r fastapi\/requirements-fastapi-cuda.txt\"  WORKDIR \/whisperx-fastapi\/fastapi  EXPOSE 8000  CMD [\"..\/venv\/bin\/uvicorn\", \"api.app:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u043b\u044f\u00a0\u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/allseeteam\/whisperx-fastapi\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 <code>.\/fastapi\/env\/.env.cuda<\/code>\u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 HuggingFace, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Docker.<\/p>\n<pre><code class=\"bash\">sudo docker build -f fastapi\/dockerization\/dockerfile.fastapi.cuda -t whisperx-fastapi-cuda . sudo docker run -p 8000:8000 --env-file .\/fastapi\/env\/.env.cuda  --gpus all --name whisperx-fastapi-cuda-container whisperx-fastapi-cuda<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<h3>Telegram Bot API<\/h3>\n<p>\u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0441\u0442\u0430\u043b\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0Telegram\u2011\u0431\u043e\u0442\u043e\u0432 \u043d\u0430\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u043b\u0435\u0435 50\u043c\u0431, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u0438 \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432\u00a0\u2014 \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0446\u0438\u0444\u0440\u044b. <\/p>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 API \u0434\u043b\u044f\u00a0Telegram\u2011\u0431\u043e\u0442\u0430 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/tdlib\/telegram-bot-api\" rel=\"noopener noreferrer nofollow\">telegram\u2011bot\u2011api<\/a>, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0443\u0436\u0435 \u0434\u043e 2000\u043c\u0431. \u041f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u043e\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u043d\u0430\u00a0\u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0447\u0442\u043e\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u00a0\u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u00a0\u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043d\u0435\u00a0\u0434\u043e\u0436\u0438\u0434\u0430\u044f\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f multipart c \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"bash\">apt-get install -y --no-install-recommends \\     build-essential \\     libssl-dev \\     zlib1g-dev \\     git \\     cmake \\     gperf \\     g++  git clone --recursive https:\/\/github.com\/tdlib\/telegram-bot-api.git &amp;&amp; \\     cd telegram-bot-api &amp;&amp; \\     mkdir build &amp;&amp; \\     cd build &amp;&amp; \\     cmake .. &amp;&amp; \\     cmake --build . --target install  cd telegram-bot-api\/build  .\/telegram-bot-api --api-id=${TELEGRAM_API_ID} --api-hash=${TELEGRAM_API_HASH} --local<\/code><\/pre>\n<ul>\n<li>\n<p>TELEGRAM_API_HASH \u2014 <a href=\"https:\/\/tlgrm.ru\/docs\/api\/obtaining_api_id\" rel=\"noopener noreferrer nofollow\">Hash \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Telegram <\/a><\/p>\n<\/li>\n<li>\n<p>TELEGRAM_BOT_TOKEN \u2014 <a href=\"https:\/\/core.telegram.org\/bots\/tutorial#obtain-your-bot-token\" rel=\"noopener noreferrer nofollow\">\u0422\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430 Telegram<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h3>Python Telegram Bot<\/h3>\n<p>\u041d\u0443 \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0434\u043b\u044f\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0442\u00a0\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <a href=\"https:\/\/docs.python-telegram-bot.org\/en\/v21.0.1\/\" rel=\"noopener noreferrer nofollow\">python\u2011telegram\u2011bot<\/a>.<\/p>\n<p>\u041d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u00a0\u043b\u043e\u0433\u0438\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u044f \u043d\u0435\u00a0\u0432\u044b\u0434\u0435\u043b\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f\u00a0\u043b\u0438\u0448\u044c \u043d\u0430\u00a0\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e Telegram\u2011\u0431\u043e\u0442\u0430 \u0432\u00a0\u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Telegram-\u0431\u043e\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/h4>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/allseeteam\/ai-secretary.git<\/code><\/pre>\n<h4>\u0421\u0431\u043e\u0440\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<pre><code class=\"bash\">docker build --build-arg HTTP_PROXY=${HTTP_PROXY} --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg NO_PROXY=${NO_PROXY} -t ai-secretary .<\/code><\/pre>\n<ul>\n<li>\n<p>HTTP_PROXY \u2014 \u0410\u0434\u0440\u0435\u0441 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>HTTPS_PROXY \u2014 \u0421\u043c. HTTP_PROXY<\/p>\n<\/li>\n<li>\n<p>NO_PROXY \u2014 \u0410\u0434\u0440\u0435\u0441\u0430, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438<\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 docker volume \u0434\u043b\u044f sqlite \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<pre><code class=\"bash\">docker volume create ai_secretary_sqlite_db<\/code><\/pre>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<pre><code class=\"bash\">docker run -d --network host --volume ai_secretary_sqlite_db:\/ai-secretary\/database --env-file env\/.env --name ai-secretary-container ai-secretary<\/code><\/pre>\n<ul>\n<li>\n<p>TELEGRAM_API_ID \u2014 ID \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Telegram<\/p>\n<\/li>\n<li>\n<p>TELEGRAM_API_HASH \u2014 Hash \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Telegram<\/p>\n<\/li>\n<li>\n<p>TELEGRAM_BOT_TOKEN \u2014 \u0422\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430 Telegram<\/p>\n<\/li>\n<li>\n<p>TELEGRAM_BOT_API_BASE_URL \u2014 \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 (\u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430: <a href=\"http:\/\/localhost:8081\/bot\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:8081\/bot<\/a>)<\/p>\n<\/li>\n<li>\n<p>OPENAI_API_KEY \u2014 \u0422\u043e\u043a\u0435\u043d OpenAI<\/p>\n<\/li>\n<li>\n<p>SQLITE_DB_PATH \u2014 \u041f\u0443\u0442\u044c \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0443 SQLite \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441: bot\/database\/ai-secretary.db)<\/p>\n<\/li>\n<li>\n<p>TRANSCRIPTION_API_BASE_URL \u2014 \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0430\u0446\u0438\u0438 (\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0430\u0434\u0440\u0435\u0441 (\u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0435\u0439\u0441\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043e\u0431\u0440\u0430\u0437\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c &#8212;network host): <a href=\"http:\/\/127.0.0.1:8000\" rel=\"noopener noreferrer nofollow\">http:\/\/127.0.0.1:8000<\/a>)<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb8\/cd1\/6f3\/bb8cd16f3a0755af74cb279e543f446f.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u0442\u043e\u043c\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u0442\u043e\u043c\" width=\"854\" height=\"480\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb8\/cd1\/6f3\/bb8cd16f3a0755af74cb279e543f446f.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u0442\u043e\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a\u00a0\u0432\u0438\u0434\u043d\u043e, \u043d\u0430\u0448 \u0418\u0418\u2011\u0441\u0435\u043a\u0440\u0435\u0442\u0430\u0440\u044c \u0431\u0435\u0437\u00a0\u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u0442 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u00a0\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT, Whisper \u0438 \u043a\u0430\u043f\u043b\u0438 \u00ab\u043f\u0440\u043e\u0433\u0435\u0440\u0441\u043a\u043e\u0439 \u043c\u0430\u0433\u0438\u0438\u00bb \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u00a0\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0435\u043e \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u0435\u0436\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0431\u043e\u0442\u043e\u0439.<\/p>\n<p>\u0410\u00a0\u0435\u0449\u0451 \u043a\u0440\u0443\u0442\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u00ab\u043f\u043e\u0442\u044b\u043a\u0430\u0442\u044c\u00bb: \u0432\u00a0\u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0438 \u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 <a href=\"https:\/\/t.me\/allsee_ai_secretary_bot\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0441\u0435\u043c\u00a0\u0436\u0435\u043b\u0430\u044e\u0449\u0438\u043c \u0434\u043b\u044f\u00a0\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u044b<\/a>. \u0415\u0441\u043b\u0438 \u0443\u00a0\u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438\u00a0\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443 \u0431\u043e\u0442\u0430\u00a0\u2014 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u043e\u00a0\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c \u0432\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438.<\/p>\n<p>\u0412\u0441\u044e \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/allseeteam\/ai-secretary\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e\u2011\u0442\u043e \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u0440\u0435\u0448\u0438\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00a0\u2014 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0432\u0430\u0448 pull request.<\/p>\n<p>\u0410\u00a0\u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0441\u044f\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438? \u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0438\u0434\u0435\u044f\u043c\u0438 \u0438 \u043c\u044b\u0441\u043b\u044f\u043c\u0438 \u0432\u00a0\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445\u00a0\u2014 \u0441\u00a0\u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u0441\u0443\u0436\u0443 \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u00a0\u0432\u0430\u043c\u0438. \u0411\u0443\u0434\u044c\u0442\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438, \u0430\u00a0\u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043c\u0430\u0448\u0438\u043d\u0430\u043c. \u0423\u0434\u0430\u0447\u0438 \u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u00a0\u0441\u0432\u044f\u0437\u0438\u270c\ufe0f<\/p>\n<\/p>\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\/804329\/\"> https:\/\/habr.com\/ru\/articles\/804329\/<\/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<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0438\u0441\u0438 \u0445\u043e\u0434\u0430 \u0441\u043e\u0437\u0432\u043e\u043d\u0430 (\u0444\u043e\u0442\u043e \u0432 \u0446\u0432\u0435\u0442\u0435)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0439, \u0438 \u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u00a0\u0441\u043f\u0435\u0446\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u0432\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u0435 AllSee. \u0412\u00a0\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0441\u0442\u0430\u043b \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b\u043c \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0432\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0444\u0435\u0440\u0430\u0445 \u043d\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u044f \u0432\u0435\u0440\u044e, \u0447\u0442\u043e\u00a0\u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a\u00a0\u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044f \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0412\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Whisper \u0438 ChatGPT \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0418\u0418\u2011\u0441\u0435\u043a\u0440\u0435\u0442\u0430\u0440\u044f, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432.<\/p>\n<h2>\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041d\u0435\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u043e\u00a0\u0438 \u043d\u0430\u0443\u0447\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0418\u0418 \u0432\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c: <a href=\"https:\/\/joshbersin.com\/2023\/03\/new-mit-research-shows-spectacular-increase-in-white-collar-productivity-from-chatgpt\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043b\u044f\u00a0\u0431\u0435\u043b\u044b\u0445 \u0432\u043e\u0440\u043e\u0442\u043d\u0438\u0447\u043a\u043e\u0432 \u0434\u043e 37%<\/a>!<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: https:\/\/joshbersin.com\/2023\/03\/new-mit-research-shows-spectacular-increase-in-white-collar-productivity-from-chatgpt\/<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u00ab\u0432\u044b\u0431\u0438\u0442\u044c\u00bb \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0440\u0443\u0442\u0438\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0432\u0432\u043e\u0434\u043d\u044b\u0435?<\/h3>\n<p>\u0415\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0430\u0437\u0430 \u0441\u043e\u0437\u0432\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c, \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u044f \u043f\u043e 30\u201340\u00a0\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u00a0\u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c, \u0430\u00a0\u0434\u043b\u044f\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0438\u0434\u0435\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f\u00a0\u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u0438\u043b\u0438\u00a0\u0441\u0431\u043e\u0440\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430.<\/p>\n<p>\u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u043f\u0446\u0438\u0438 \u0432\u0441\u0442\u0440\u0435\u0447 \u0441\u00a0\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0434\u043b\u044f\u00a0\u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0443\u0442\u043e\u0447\u043d\u044f\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0443\u00a0\u0418\u0418\u2011\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430. \u0414\u043b\u044f\u00a0\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u00a0\u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Telegram\u2011\u0431\u043e\u0442\u0430.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u00a0\u0441\u0435\u0431\u044f: <\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u0430 \u043d\u0430\u00a0\u0431\u0430\u0437\u0435 <a href=\"https:\/\/docs.python-telegram-bot.org\/en\/v21.0.1\/\" rel=\"noopener noreferrer nofollow\">python\u2011telegram\u2011bot<\/a><\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 <a href=\"https:\/\/github.com\/tdlib\/telegram-bot-api\" rel=\"noopener noreferrer nofollow\">telegram\u2011bot\u2011api<\/a><\/p>\n<\/li>\n<li>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/allseeteam\/whisperx-fastapi\" rel=\"noopener noreferrer nofollow\">API WhisperX<\/a><\/p>\n<\/li>\n<li>\n<p>\u0411\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043a\u0441\u0438\u2011\u0441\u0435\u0440\u0432\u0435\u0440<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/platform.openai.com\/docs\/overview\" rel=\"noopener noreferrer nofollow\">ChatGPT API<\/a><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u042f \u043e\u043f\u0443\u0449\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0UX \u0431\u043e\u0442\u0430, \u043d\u043e\u00a0\u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u0441\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u0430\u043c \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u043f\u0440\u0438\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h3>Sqiud Proxy<\/h3>\n<p>\u0414\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441 <a href=\"https:\/\/platform.openai.com\/docs\/overview\" rel=\"noopener noreferrer nofollow\">ChatGPT API<\/a> \u0438\u0437\u00a0\u0420\u043e\u0441\u0441\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c proxy\u2011\u0441\u0435\u0440\u0432\u0435\u0440. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.squid-cache.org\/Intro\/\" rel=\"noopener noreferrer nofollow\">Squid<\/a>\u00a0\u2014 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u043a\u0441\u0438\u2011\u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f\u00a0\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 HTTP, HTTPS, FTP \u0438 Gopher.<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Squid Proxy<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430\u00a0\u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u00a0OS Ubuntu, \u043d\u043e\u00a0\u0438 \u0434\u043b\u044f\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0435\u0439, \u043e\u0442\u043b\u0438\u0447\u0430\u044f\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 squid<\/h4>\n<pre><code class=\"bash\">sudo apt update sudo apt-get -y install squid<\/code><\/pre>\n<h4>\u041f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0306\u043a\u0430 \u0441\u0435\u0442\u0438<\/h4>\n<pre><code class=\"bash\">sudo ufw allow squid sudo iptables -P INPUT ACCEPT<\/code><\/pre>\n<h4>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 squid<\/h4>\n<pre><code class=\"bash\">sudo systemctl enable squid<\/code><\/pre>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 squid <\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u0435\u043a\u0430\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 squid \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0438\u0437\u00a0\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432\u0441\u0451 <strong>8000<\/strong> \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.<\/p>\n<pre><code class=\"bash\">sudo cp \/etc\/squid\/squid.conf \/etc\/squid\/squid_back.conf sudo  grep -v '^ *#\\|^ *$' \/etc\/squid\/squid.conf > \/etc\/squid\/squid.conf<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 squid.<\/p>\n<pre><code class=\"bash\">sudo apt-get -y install nano sudo nano \/etc\/squid\/squid.conf<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b squid.conf \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">... http_access allow localhost acl whitelist src 111.111.111.111   # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c IP \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 IP) \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0430 http_access allow whitelist         # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 http_access deny all ...<\/code><\/pre>\n<h4>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a c\u0435\u0440\u0432\u0438\u0441\u0430 squid<\/h4>\n<p>\u0414\u043b\u044f\u00a0\u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c squid.<\/p>\n<pre><code class=\"bash\">sudo systemctl restart squid<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>WhisperX<\/h3>\n<p>\u0414\u043b\u044f\u00a0\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u0438\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438: \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0437\u00a0\u0430\u0443\u0434\u0438\u043e\u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u043a\u0442\u043e\u0440\u043e\u0432. \u0417\u0430\u0434\u0430\u0447\u0430 \u043e\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043f\u0435\u0440\u0435\u0433\u043e\u0432\u043e\u0440\u0430\u0445 \u0438 \u0441\u043e\u0437\u0432\u043e\u043d\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a\u043e\u0432, \u0430\u00a0\u043c\u043d\u043e\u0433\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b 2-\u043c\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430. <\/p>\n<p>\u041d\u0430\u00a0\u043f\u043e\u043c\u043e\u0449\u044c \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 <a href=\"https:\/\/github.com\/m-bain\/whisperX\" rel=\"noopener noreferrer nofollow\">WhisperX<\/a>\u00a0\u2014 \u00ab\u043e\u0431\u0451\u0440\u0442\u043a\u0430\u00bb \u043d\u0430\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Whisper \u0434\u043b\u044f\u00a0\u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0430\u0446\u0438\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e 100\u00a0\u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 WhisperX \u0432\u00a0\u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/github.com\/allseeteam\/whisperx-fastapi\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 FastAPI\u2011\u0441\u0435\u0440\u0432\u0435\u0440<\/a>, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<details class=\"spoiler\">\n<summary>\u0418\u043c\u043f\u043e\u0440\u0442\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import asyncio import os import uuid from dataclasses import dataclass from datetime import datetime from queue import Queue from threading import Thread from typing import Any  from fastapi import HTTPException, BackgroundTasks, FastAPI, status, Request from fastapi.middleware.cors import CORSMiddleware from pydantic_settings import BaseSettings from streaming_form_data import StreamingFormDataParser from streaming_form_data.targets import FileTarget from streaming_form_data.validators import MaxSizeValidator  import whisperx   @dataclass class WhisperXModels:     whisper_model: Any     diarize_pipeline: Any     align_model: Any     align_model_metadata: Any   class TranscriptionAPISettings(BaseSettings):     tmp_dir: str = 'tmp'     cors_origins: str = '*'     cors_allow_credentials: bool = True     cors_allow_methods: str = '*'     cors_allow_headers: str = '*'     whisper_model: str = 'large-v2'     device: str = 'cuda'     compute_type: str = 'float16'     batch_size: int = 16     language_code: str = 'auto'     hf_api_key: str = ''     file_loading_chunk_size_mb: int = 1024     task_cleanup_delay_min: int = 60     max_file_size_mb: int = 4096     max_request_body_size_mb: int = 5000      class Config:         env_file = 'env\/.env.cuda'         env_file_encoding = 'utf-8'   class MaxBodySizeException(Exception):     def __init__(self, body_len: int):         self.body_len = body_len   class MaxBodySizeValidator:     def __init__(self, max_size: int):         self.body_len = 0         self.max_size = max_size      def __call__(self, chunk: bytes):         self.body_len += len(chunk)         if self.body_len > self.max_size:             raise MaxBodySizeException(self.body_len)   settings = TranscriptionAPISettings()  app = FastAPI() # noinspection PyTypeChecker app.add_middleware(     CORSMiddleware,     allow_origins=settings.cors_origins.split(','),     allow_credentials=settings.cors_allow_credentials,     allow_methods=settings.cors_allow_methods.split(','),     allow_headers=settings.cors_allow_headers.split(','), )<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041b\u043e\u0433\u0438\u043a\u0430 \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">trancription_tasks = {} trancription_tasks_queue = Queue()  whisperx_models = WhisperXModels(     whisper_model=None,     diarize_pipeline=None,     align_model=None,     align_model_metadata=None )   def load_whisperx_models() -> None:     global whisperx_models      whisperx_models.whisper_model = whisperx.load_model(         whisper_arch=settings.whisper_model,         device=settings.device,         compute_type=settings.compute_type,         language=settings.language_code if settings.language_code != \"auto\" else None     )      whisperx_models.diarize_pipeline = whisperx.DiarizationPipeline(         use_auth_token=settings.hf_api_key,         device=settings.device     )      if settings.language_code != \"auto\":         (             whisperx_models.align_model,             whisperx_models.align_model_metadata         ) = whisperx.load_align_model(             language_code=settings.language_code,             device=settings.device         )   def transcribe_audio(audio_file_path: str) -> dict:     global whisperx_models      audio = whisperx.load_audio(audio_file_path)      transcription_result = whisperx_models.whisper_model.transcribe(         audio,         batch_size=int(settings.batch_size),     )      if settings.language_code == \"auto\":         language = transcription_result[\"language\"]         (             whisperx_models.align_model,             whisperx_models.align_model_metadata         ) = whisperx.load_align_model(             language_code=language,             device=settings.device         )      aligned_result = whisperx.align(         transcription_result[\"segments\"],         whisperx_models.align_model,         whisperx_models.align_model_metadata,         audio,         settings.device,         return_char_alignments=False     )      diarize_segments = whisperx_models.diarize_pipeline(audio)      final_result = whisperx.assign_word_speakers(         diarize_segments,         aligned_result     )      return final_result   def transcription_worker() -> None:     while True:         task_id, tmp_path = trancription_tasks_queue.get()          try:             result = transcribe_audio(tmp_path)             trancription_tasks[task_id].update({\"status\": \"completed\", \"result\": result})          except Exception as e:             trancription_tasks[task_id].update({\"status\": \"failed\", \"result\": str(e)})          finally:             trancription_tasks_queue.task_done()             os.remove(tmp_path)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041b\u043e\u0433\u0438\u043a\u0430 FasAPI<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">@app.on_event(\"startup\") async def startup_event() -> None:     os.makedirs(settings.tmp_dir, exist_ok=True)     load_whisperx_models()     Thread(target=transcription_worker, daemon=True).start()   async def cleanup_task(task_id: str) -> None:     await asyncio.sleep(settings.task_cleanup_delay_min * 60)     trancription_tasks.pop(task_id, None)   @app.post(\"\/transcribe\/\") async def create_upload_file(         request: Request,         background_tasks: BackgroundTasks ) -> dict:     task_id = str(uuid.uuid4())     tmp_path = f\"{settings.tmp_dir}\/{task_id}.audio\"      trancription_tasks[task_id] = {         \"status\": \"loading\",         \"creation_time\": datetime.utcnow(),         \"result\": None     }      body_validator = MaxBodySizeValidator(settings.max_request_body_size_mb * 1024 * 1024)      try:         file_target = FileTarget(             tmp_path,             validator=MaxSizeValidator(settings.max_file_size_mb * 1024 * 1024)         )         parser = StreamingFormDataParser(headers=request.headers)         parser.register('file', file_target)         async for chunk in request.stream():             body_validator(chunk)             parser.data_received(chunk)      except MaxBodySizeException as e:         raise HTTPException(             status_code=status.HTTP_413_REQUEST_ENTITY_TOO_LARGE,             detail=f\"Maximum request body size limit exceeded: {e.body_len} bytes\"         )      except Exception as e:         if os.path.exists(tmp_path):             os.remove(tmp_path)         raise HTTPException(             status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,             detail=f\"Error processing<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<\/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-372366","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372366","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=372366"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372366\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}