{"id":3600,"date":"2023-11-15T10:39:03","date_gmt":"2023-11-15T02:39:03","guid":{"rendered":"https:\/\/benson80.eu.org\/?p=3600"},"modified":"2023-11-15T11:09:13","modified_gmt":"2023-11-15T03:09:13","slug":"%e6%9c%ac%e5%9c%b0%e5%ae%89%e8%a3%85%e5%b9%b6%e8%bf%90%e8%a1%8caiui","status":"publish","type":"post","link":"https:\/\/benson80.eu.org\/?p=3600","title":{"rendered":"\u672c\u5730\u5b89\u88c5\u5e76\u8fd0\u884cAIUI"},"content":{"rendered":"\n<p>AIUI \u662f\u4e00\u4e2a\u80fd\u4e0e\u4eba\u5de5\u667a\u80fd\u8fdb\u884c\u65e0\u7f1d\u53cc\u5411\u8bed\u8a00\u4ea4\u6d41\u7684\u5e73\u53f0\u3002<\/p>\n\n\n\n<p>\u9879\u76ee\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/lspahija\/AIUI\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/lspahija\/AIUI<\/a><\/p>\n\n\n\n<p><strong>A Voice Interface for AI<\/strong><\/p>\n\n\n\n<p>\u70b9\u51fb\u5f0f\u7528\u6237\u754c\u9762\u5f88\u5feb\u5c06\u6210\u4e3a\u8fc7\u53bb\u3002\u4e0d\u4e45\u7684\u5c06\u6765\uff0c\u4e3b\u8981\u7684\u7528\u6237\u754c\u9762\u5c06\u5b8c\u5168\u57fa\u4e8e\u8bed\u97f3\u3002<\/p>\n\n\n\n<p>AIUI \u662f\u4e00\u4e2a\u65e8\u5728\u5b9e\u73b0\u4e0e\u4eba\u5de5\u667a\u80fd\u6a21\u578b\u65e0\u7f1d\u53cc\u5411\u8bed\u8a00\u4ea4\u6d41\u7684\u5e73\u53f0\u3002\u5b83\u53ef\u5728\u684c\u9762\u548c\u79fb\u52a8\u6d4f\u89c8\u5668\u4e0a\u8fd0\u884c\uff0c\u76ee\u524d\u652f\u6301 GPT-4 \u548c GPT-3.5 \u6a21\u578b\uff0c\u5bf9\u5f00\u653e\u6a21\u578b\u7684\u652f\u6301\u6b63\u5728\u5f00\u53d1\u4e2d\u3002<\/p>\n\n\n\n<p><strong>\u5728\u672c\u5730\u8fd0\u884c<\/strong><\/p>\n\n\n\n<p>1. Clone the repo<\/p>\n\n\n\n<p>git clone git@github.com:lspahija\/AIUI.git<\/p>\n\n\n\n<p>2. Change directory to AIUI<\/p>\n\n\n\n<p>cd AIUI<\/p>\n\n\n\n<p>3. Build Docker image<\/p>\n\n\n\n<p>docker build -t aiui .<\/p>\n\n\n\n<p>or if on arm64 architecture (including Apple Silicon):<\/p>\n\n\n\n<p>docker buildx build &#8211;platform linux\/arm64 -t aiui .<\/p>\n\n\n\n<p>4. Create Docker container from image<\/p>\n\n\n\n<p>docker run -d -e OPENAI_API_KEY= -e TTS_PROVIDER=EDGETTS -e EDGETTS_VOICE=en-US-EricNeural -p 8000:80 aiui<\/p>\n\n\n\n<p>5. Navigate to&nbsp;<code>localhost:8000<\/code>&nbsp;in a modern browser<\/p>\n\n\n\n<p><strong>\u6ce8\u610f<\/strong><\/p>\n\n\n\n<p>AI \u6a21\u578b\u9ed8\u8ba4\u4e3a gpt-3.5-turbo\uff0c\u4f46\u60a8\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e AI_COMPLETION_MODEL \u73af\u5883\u53d8\u91cf\u8fdb\u884c\u8c03\u6574\uff08\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u7684 OPENAI_API_KEY \u53ef\u4ee5\u8bbf\u95ee gpt-4\uff09\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u5c06 LANGUAGE \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u76f8\u5e94\u7684 ISO-639-1 \u4ee3\u7801\uff0c\u53ef\u4ee5\u914d\u7f6e\u8bed\u8a00\u3002\u9ed8\u8ba4\u8bed\u8a00\u4e3a en\u3002\u76ee\u524d\uff0c\u53ea\u6709\u5728\u4f7f\u7528 gTTS \u6216 edge_tts \u63d0\u4f9b\u5546\u8fdb\u884c\u6587\u672c\u5230\u8bed\u97f3\u8f6c\u6362\u65f6\uff0c\u624d\u652f\u6301\u82f1\u8bed\u4ee5\u5916\u7684\u8bed\u8a00\u3002\u53ef\u4ee5\u901a\u8fc7\u5c06\u73af\u5883\u53d8\u91cf TTS_PROVIDER \u8bbe\u7f6e\u4e3a tts.py \u4e2d\u7684\u67d0\u4e2a\u503c\u6765\u9009\u62e9 TTS \u63d0\u4f9b\u5546\u3002<\/p>\n\n\n\n<p>\u5b9e\u4f8b\uff1a<\/p>\n\n\n\n<p>docker run -d -e OPENAI_API_KEY=pk-this-is-a-real-free-pool-token-for-everyone -e TTS_PROVIDER=EDGETTS -e EDGETTS_VOICE=en-US-EricNeural -p 8000:80 erickbmeyers\/aiui<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AIUI \u662f\u4e00\u4e2a\u80fd\u4e0e\u4eba\u5de5\u667a\u80fd\u8fdb\u884c\u65e0\u7f1d\u53cc\u5411\u8bed\u8a00\u4ea4\u6d41\u7684 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-3600","post","type-post","status-publish","format-standard","hentry","category-17"],"_links":{"self":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/3600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3600"}],"version-history":[{"count":9,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/3600\/revisions"}],"predecessor-version":[{"id":3610,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/3600\/revisions\/3610"}],"wp:attachment":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}