[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-LearnedVector--A-Hackers-AI-Voice-Assistant":3,"tool-LearnedVector--A-Hackers-AI-Voice-Assistant":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160784,2,"2026-04-19T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":68,"readme_en":69,"readme_zh":70,"quickstart_zh":71,"use_case_zh":72,"hero_image_url":73,"owner_login":74,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":78,"owner_url":79,"languages":80,"stars":97,"forks":98,"last_commit_at":99,"license":100,"difficulty_score":101,"env_os":102,"env_gpu":103,"env_ram":104,"env_deps":105,"category_tags":114,"github_topics":78,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":116,"updated_at":117,"faqs":118,"releases":169},9686,"LearnedVector\u002FA-Hackers-AI-Voice-Assistant","A-Hackers-AI-Voice-Assistant","A hackers AI voice assistant, built using Python and PyTorch.","A-Hackers-AI-Voice-Assistant 是一个基于 Python 和 PyTorch 构建的开源语音助手项目，旨在帮助开发者从零开始打造属于自己的 AI 语音交互系统。它并非一个开箱即用的成品软件，而是一套完整的教学与实践框架，配套有详细的 YouTube 视频教程，引导用户逐步实现唤醒词检测、语音识别、自然语言理解及语音合成等核心功能。\n\n该项目主要解决了想要深入理解语音助手底层原理的学习者缺乏系统性代码参考的痛点。通过模块化设计，它将复杂的机器学习工程拆解为可独立训练和测试的单元，让用户能亲手参与数据收集、模型训练到引擎集成的全过程。目前，其唤醒词引擎和语音识别模块已具备基础运行能力，其他高级功能仍在社区共建中。\n\nA-Hackers-AI-Voice-Assistant 特别适合对机器学习感兴趣的开发者、学生及研究人员使用。如果你希望跳出调用现成 API 的模式，真正掌握如何从头构建一个端到端的 ML 系统，这将是一个极佳的练手项目。其技术亮点在于提供了完整的训练脚本与数据处理工具链，支持自定义唤醒词训练，并兼容 Docker 部署，方便在不同环境下进行实验与扩","A-Hackers-AI-Voice-Assistant 是一个基于 Python 和 PyTorch 构建的开源语音助手项目，旨在帮助开发者从零开始打造属于自己的 AI 语音交互系统。它并非一个开箱即用的成品软件，而是一套完整的教学与实践框架，配套有详细的 YouTube 视频教程，引导用户逐步实现唤醒词检测、语音识别、自然语言理解及语音合成等核心功能。\n\n该项目主要解决了想要深入理解语音助手底层原理的学习者缺乏系统性代码参考的痛点。通过模块化设计，它将复杂的机器学习工程拆解为可独立训练和测试的单元，让用户能亲手参与数据收集、模型训练到引擎集成的全过程。目前，其唤醒词引擎和语音识别模块已具备基础运行能力，其他高级功能仍在社区共建中。\n\nA-Hackers-AI-Voice-Assistant 特别适合对机器学习感兴趣的开发者、学生及研究人员使用。如果你希望跳出调用现成 API 的模式，真正掌握如何从头构建一个端到端的 ML 系统，这将是一个极佳的练手项目。其技术亮点在于提供了完整的训练脚本与数据处理工具链，支持自定义唤醒词训练，并兼容 Docker 部署，方便在不同环境下进行实验与扩展。需要注意的是，项目目前更偏向学习与研究用途，建议具备一定编程基础的用户在 Linux 或 macOS 环境下尝试。","# A Hackers AI Voice Assistant\n\n### I am not mantaining this repo anymore. If you want to take over, please shoot me a message.\n\nBuild your own voice ai. This repo is for my [YouTube video series](https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PL5rWfvZIL-NpFXM9nFr15RmEEh4F4ePZW) on building an AI voice assistant with PyTorch.\n\n## Looking for contributors!\nLooking for contributors to help build out the assistant. There is still alot of work to do. This would be a good oppurtunity to learn Machine Learning and how to Engineer an entire ML system from the ground up. If you're interested join the [Discord Server](https:\u002F\u002Fdiscord.gg\u002F9wSTT4F)\n\nTODO:\n- [x] wake word model and engine\n- [ ] pre-trained wake word model use for fine tuning on your own wakeword\n- [x] speech recognition model, pretrained model, and engine\n- [ ] natural langauge understanding model, pretrained model, and engine\n- [ ] speech synthesis model, pretrained model, and engine\n- [ ] skills framework\n- [ ] Core A.I. Voice Assistant logic to integrate wake word, speech recongition, natural language understanding, speech sysnthesis, and the skills framework.\n\n## Running on native machine\n### dependencies\n* python3\n* portaudio (for recording with pyaudio to work)\n* [ctcdecode](https:\u002F\u002Fgithub.com\u002Fparlance\u002Fctcdecode) - for speechrecognition\n\nIf you're on mac you can install `portaudio` using `homebrew`\n\n**NOTICE: If you are using windows, some things may not work. For example, torchaudio. I suggest trying this on linux or mac, or use wsl2 on windows**\n\n### using virtualenv (recommend)\n1. `virtualenv voiceassistant.venv`\n2. `source voiceassistant.venv\u002Fbin\u002Factivate`\n\n### pip packages\n`pip install -r requirements.txt` \n\n## Running with Docker\n### setup\nIf you are running with just the cpu\n`docker build -f cpu.Dockerfile -t voiceassistant .`\n\nIf you are running on a cuda enabled machine \n`docker build -f Dockerfile -t voiceassistant .`\n\n## Wake word\n[Youtube Video For WakeWord](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ob0p7G2QoHA&list=PL5rWfvZIL-NpFXM9nFr15RmEEh4F4ePZW)\n\n### scripts\nFor more details make sure to visit these files to look at script arguments and description\n\n`wakeword\u002Fneuralnet\u002Ftrain.py` is used to train the model\n\n`wakeword\u002Fneuralnet\u002Foptimize_graph.py` is used to create a production ready graph that can be used in `engine.py`\n\n`wakeword\u002Fengine.py` is used to demo the wakeword model\n\n`wakeword\u002Fscripts\u002Fcollect_wakeword_audio.py` - used to collect wakeword and environment data\n\n`wakeword\u002Fscripts\u002Fsplit_audio_into_chunks.py` - used to split audio into n second chunks\n\n`wakeword\u002Fscripts\u002Fsplit_commonvoice.py` - if you download the common voice dataset, use this script to split it into n second chunks\n\n`wakeword\u002Fscripts\u002Fcreate_wakeword_jsons.py` - used to create the wakeword json for training\n\n### Steps to train and demo your wakeword model\n\nFor more details make sure to visit these files to look at script arguments and description\n\n1. collect data\n    1. environment and wakeword data can be collected using `python collect_wakeword_audio.py`\n       ```\n       cd VoiceAssistant\u002Fwakeword\u002Fscripts\n       mkdir data\n       cd data\n       mkdir 0 1 wakewords\n       python collect_wakeword_audio.py --sample_rate 8000 --seconds 2 --interactive --interactive_save_path .\u002Fdata\u002Fwakewords\n       ```\n    2. to avoid the imbalanced dataset problem, we can duplicate the wakeword clips with \n       ```\n       python replicate_audios.py --wakewords_dir data\u002Fwakewords\u002F --copy_destination data\u002F1\u002F --copy_number 100\n       ```\n    3. be sure to collect other speech data like common voice. split the data into n seconds chunk with `split_audio_into_chunks.py`.\n    4. put data into two seperate directory named `0` and `1`. `0` for non wakeword, `1` for wakeword. use `create_wakeword_jsons.py` to create train and test json\n    5. create a train and test json in this format...\n        ```\n        \u002F\u002F make each sample is on a seperate line\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fsample.wav, \"label\": 0}\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fsample.wav, \"label\": 1}\n        ```\n\n2. train model\n    1. use `train.py` to train model\n    2. after model training us `optimize_graph.py` to create an optimized pytorch model\n\n3. test\n    1. test using the `engine.py` script\n\n\n## Speech Recognition\n[YouTube Video for Speech Recognition](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=YereI6Gn3bM&list=PL5rWfvZIL-NpFXM9nFr15RmEEh4F4ePZW&index=2)\n\n### scripts\nFor more details make sure to visit these files to look at script arguments and description\n\n`speechrecognition\u002Fscripts\u002Fmimic_create_jsons.py`is used to create the train.json and test.json files with Mimic Recording Studio \n\n`speechrecognition\u002Fscripts\u002Fcommonvoice_create_jsons.py`is used to convert mp3 into wav and create the train.json and test.json files with the Commonvoice dataset\n\n`spechrecognition\u002Fneuralnet\u002Ftrain.py` is used to train the model\n\n`spechrecognition\u002Fneuralnet\u002Foptimize_graph.py` is used to create a production ready graph that can be used in `engine.py`\n\n`spechrecognition\u002Fengine.py` is used to demo the speech recognizer model\n\n`spechrecognition\u002Fdemo\u002Fdemo.py` is used to demo the speech recognizer model with a Web GUI\n\n\n### Steps for pretraining or finetuning speech recognition model\n\nThe pretrained model can be found here at this [google drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F14ljfpvisK1tz8fvFYETbdWqR3lOmJ_2Y?usp=sharing)\n\n1. Collect your own data - the pretrain model was trained on common voice. To make this model work for you, you can collect about an hour or so of your own voice using the [Mimic Recording Studio](https:\u002F\u002Fgithub.com\u002FMycroftAI\u002Fmimic-recording-studio). They have prompts that you can read from.\n    1. collect data using mimic recording studio, or your own dataset.\n    2. be sure to chop up your audio into 5 - 16 seconds chunks max.\n    3. create a train and test json in this format...\n    ```\n        \u002F\u002F make each sample is on a seperate line\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fspeech.wav, \"text\": \"this is your text\"}\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fspeech.wav, \"text\": \"another text example\"}\n    ```\n    use `mimic_create_jsons.py` to create train and test json's with the data from Mimic Recording Studio.\n        \n        python mimic_create_jsons.py --file_folder_directory \u002Fdir\u002Fto\u002Fthe\u002Ffolder\u002Fwith\u002Fthe\u002Fstudio\u002Fdata --save_json_path \u002Fpath\u002Fwhere\u002Fyou\u002Fwant\u002Fthem\u002Fsaved\n\n    (The Mimic Recording Studio files are usually stored in ~\u002Fmimic-recording-studio-master\u002Fbackend\u002Faudio_files\u002F[random_string].) \n    \n    use `commonvoice_create_jsons.py` to convert from mp3 to wav and to create train and test json's with the data from Commonvoice by Mozilla\n        \n        python commonvoice_create_jsons.py --file_path \u002Fpath\u002Fto\u002Fcommonvoice\u002Ffile\u002F.tsv --save_json_path \u002Fpath\u002Fwhere\u002Fyou\u002Fwant\u002Fthem\u002Fsaved \n    \n    if you dont want to convert use `--not-convert` \n        \n2. Train model\n    1. use `train.py` to fine tune. checkout the [train.py](https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fblob\u002Fmaster\u002FVoiceAssistant\u002Fspeechrecognition\u002Fneuralnet\u002Ftrain.py#L115) argparse for other arguments\n    ```\n       python train.py --train_file \u002Fpath\u002Fto\u002Ftrain\u002Fjson --valid_file \u002Fpath\u002Fto\u002Fvalid\u002Fjson --load_model_from \u002Fpath\u002Fto\u002Fpretrain\u002Fspeechrecognition.ckpt\n    ```\n   2. To train from scratch omit the `--load_model_from` argument in train.py\n   3. after model training us `optimize_graph.py` to create a frozen optimized pytorch model. The pretrained optimized torch model can be found in the google drive link as `speechrecognition.zip`\n\n\n3. test\n    1. test using the `engine.py` script\n\n## Raspberry pi\ndocumenation to get this running on rpi is in progress...\n","# 一个黑客的 AI 语音助手\n\n### 我不再维护这个仓库了。如果你想接手，请给我发消息。\n\n构建你自己的语音 AI。这个仓库是为我的 [YouTube 视频系列](https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PL5rWfvZIL-NpFXM9nFr15RmEEh4F4ePZW) 准备的，该系列讲解如何使用 PyTorch 构建一个 AI 语音助手。\n\n## 寻求贡献者！\n我们正在寻找贡献者来帮助完善这个助手。目前还有很多工作要做。这将是一个很好的机会，让你学习机器学习，并从头开始构建一个完整的机器学习系统。如果你感兴趣，请加入我们的 [Discord 服务器](https:\u002F\u002Fdiscord.gg\u002F9wSTT4F)。\n\n待办事项：\n- [x] 唤醒词模型和引擎\n- [ ] 预训练唤醒词模型，可用于针对自定义唤醒词进行微调\n- [x] 语音识别模型、预训练模型和引擎\n- [ ] 自然语言理解模型、预训练模型和引擎\n- [ ] 语音合成模型、预训练模型和引擎\n- [ ] 技能框架\n- [ ] 核心 AI 语音助手逻辑，用于集成唤醒词、语音识别、自然语言理解、语音合成以及技能框架。\n\n## 在本地机器上运行\n### 依赖项\n* Python 3\n* PortAudio（以便 PyAudio 录音正常工作）\n* [ctcdecode](https:\u002F\u002Fgithub.com\u002Fparlance\u002Fctcdecode) - 用于语音识别\n\n如果你使用的是 Mac，可以通过 Homebrew 安装 `PortAudio`。\n\n**注意：如果你使用 Windows，某些功能可能无法正常工作，例如 torchaudio。建议在 Linux 或 Mac 上尝试，或者在 Windows 上使用 WSL2。**\n\n### 使用虚拟环境（推荐）\n1. `virtualenv voiceassistant.venv`\n2. `source voiceassistant.venv\u002Fbin\u002Factivate`\n\n### pip 包\n`pip install -r requirements.txt`\n\n## 使用 Docker 运行\n### 设置\n如果你只使用 CPU：\n`docker build -f cpu.Dockerfile -t voiceassistant .`\n\n如果你的机器支持 CUDA：\n`docker build -f Dockerfile -t voiceassistant .`\n\n## 唤醒词\n[唤醒词 YouTube 视频](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ob0p7G2QoHA&list=PL5rWfvZIL-NpFXM9nFr15RmEEh4F4ePZW)\n\n### 脚本\n更多详细信息请查看这些文件，了解脚本参数和说明：\n\n`wakeword\u002Fneuralnet\u002Ftrain.py` 用于训练模型。\n`wakeword\u002Fneuralnet\u002Foptimize_graph.py` 用于创建可用于 `engine.py` 的生产就绪图。\n`wakeword\u002Fengine.py` 用于演示唤醒词模型。\n`wakeword\u002Fscripts\u002Fcollect_wakeword_audio.py` 用于收集唤醒词和环境数据。\n`wakeword\u002Fscripts\u002Fsplit_audio_into_chunks.py` 用于将音频分割成 n 秒的片段。\n`wakeword\u002Fscripts\u002Fsplit_commonvoice.py` 如果你下载了 Common Voice 数据集，可以使用此脚本将其分割成 n 秒的片段。\n`wakeword\u002Fscripts\u002Fcreate_wakeword_jsons.py` 用于创建用于训练的唤醒词 JSON 文件。\n\n### 训练和演示你的唤醒词模型的步骤\n\n更多详细信息请查看这些文件，了解脚本参数和说明：\n\n1. 收集数据\n    1. 可以使用 `python collect_wakeword_audio.py` 收集环境和唤醒词数据：\n       ```\n       cd VoiceAssistant\u002Fwakeword\u002Fscripts\n       mkdir data\n       cd data\n       mkdir 0 1 wakewords\n       python collect_wakeword_audio.py --sample_rate 8000 --seconds 2 --interactive --interactive_save_path .\u002Fdata\u002Fwakewords\n       ```\n    2. 为了避免数据不平衡问题，我们可以复制唤醒词片段：\n       ```\n       python replicate_audios.py --wakewords_dir data\u002Fwakewords\u002F --copy_destination data\u002F1\u002F --copy_number 100\n       ```\n    3. 务必收集其他语音数据，例如 Common Voice 数据集。使用 `split_audio_into_chunks.py` 将数据分割成 n 秒的片段。\n    4. 将数据分别放入名为 `0` 和 `1` 的两个目录中：`0` 用于非唤醒词数据，`1` 用于唤醒词数据。使用 `create_wakeword_jsons.py` 创建训练和测试 JSON 文件。\n    5. 按照以下格式创建训练和测试 JSON 文件：\n        ```\n        \u002F\u002F 每个样本占一行\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fsample.wav, \"label\": 0}\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fsample.wav, \"label\": 1}\n        ```\n\n2. 训练模型\n    1. 使用 `train.py` 训练模型。\n    2. 模型训练完成后，使用 `optimize_graph.py` 创建优化后的 PyTorch 模型。\n\n3. 测试\n    1. 使用 `engine.py` 脚本进行测试。\n\n## 语音识别\n[语音识别 YouTube 视频](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=YereI6Gn3bM&list=PL5rWfvZIL-NpFXM9nFr15RmEEh4F4ePZW&index=2)\n\n### 脚本\n更多详细信息请查看这些文件，了解脚本参数和说明：\n\n`speechrecognition\u002Fscripts\u002Fmimic_create_jsons.py` 用于使用 Mimic Recording Studio 创建训练和测试 JSON 文件。\n`speechrecognition\u002Fscripts\u002Fcommonvoice_create_jsons.py` 用于将 MP3 转换为 WAV，并使用 Common Voice 数据集创建训练和测试 JSON 文件。\n`spechrecognition\u002Fneuralnet\u002Ftrain.py` 用于训练模型。\n`spechrecognition\u002Fneuralnet\u002Foptimize_graph.py` 用于创建可用于 `engine.py` 的生产就绪图。\n`spechrecognition\u002Fengine.py` 用于演示语音识别模型。\n`spechrecognition\u002Fdemo\u002Fdemo.py` 用于通过 Web GUI 演示语音识别模型。\n\n### 语音识别模型预训练或微调步骤\n\n预训练模型可在此 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F14ljfpvisK1tz8fvFYETbdWqR3lOmJ_2Y?usp=sharing) 链接中找到。\n\n1. 收集您自己的数据——预训练模型是在 Common Voice 数据集上训练的。为了让该模型更好地适用于您的场景，您可以使用 [Mimic Recording Studio](https:\u002F\u002Fgithub.com\u002FMycroftAI\u002Fmimic-recording-studio) 录制大约一小时左右的语音数据。该工具提供了可供朗读的提示文本。\n    1. 使用 Mimic Recording Studio 或您自己的数据集收集音频。\n    2. 确保将音频切分为每段 5 至 16 秒的片段。\n    3. 按照以下格式创建训练和测试的 JSON 文件：\n    ```\n        \u002F\u002F 每个样本独占一行\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fspeech.wav, \"text\": \"这是您的文本\"}\n        {\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fspeech.wav, \"text\": \"另一个文本示例\"}\n    ```\n    使用 `mimic_create_jsons.py` 脚本，基于 Mimic Recording Studio 的数据生成训练和测试的 JSON 文件。\n\n        python mimic_create_jsons.py --file_folder_directory \u002Fdir\u002Fto\u002Fthe\u002Ffolder\u002Fwith\u002Fthe\u002Fstudio\u002Fdata --save_json_path \u002Fpath\u002Fwhere\u002Fyou\u002Fwant\u002Fthem\u002Fsaved\n\n    （Mimic Recording Studio 的文件通常存储在 ~\u002Fmimic-recording-studio-master\u002Fbackend\u002Faudio_files\u002F[random_string] 目录下。）\n\n    使用 `commonvoice_create_jsons.py` 脚本，将 CommonVoice 数据集中的 MP3 文件转换为 WAV 格式，并生成训练和测试的 JSON 文件：\n\n        python commonvoice_create_jsons.py --file_path \u002Fpath\u002Fto\u002Fcommonvoice\u002Ffile\u002F.tsv --save_json_path \u002Fpath\u002Fwhere\u002Fyou\u002Fwant\u002Fthem\u002Fsaved \n\n    如果不需要转换格式，可以添加 `--not-convert` 参数。\n\n2. 训练模型\n    1. 使用 `train.py` 脚本进行微调。请参阅 [train.py](https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fblob\u002Fmaster\u002FVoiceAssistant\u002Fspeechrecognition\u002Fneuralnet\u002Ftrain.py#L115) 中的 argparse 参数说明以了解其他选项。\n    ```\n       python train.py --train_file \u002Fpath\u002Fto\u002Ftrain\u002Fjson --valid_file \u002Fpath\u002Fto\u002Fvalid\u002Fjson --load_model_from \u002Fpath\u002Fto\u002Fpretrain\u002Fspeechrecognition.ckpt\n    ```\n    2. 若要从零开始训练，请在 `train.py` 中省略 `--load_model_from` 参数。\n    3. 模型训练完成后，使用 `optimize_graph.py` 脚本创建一个冻结并优化后的 PyTorch 模型。预训练的优化后模型可在 Google Drive 链接中找到，文件名为 `speechrecognition.zip`。\n\n3. 测试\n    1. 使用 `engine.py` 脚本进行测试。\n\n## 树莓派\n关于如何在树莓派上运行此项目的文档正在编写中……","# A-Hackers-AI-Voice-Assistant 快速上手指南\n\n> **注意**：本项目作者已停止维护。如需贡献或接手项目，可加入其 Discord 社区。本指南基于现有代码整理，旨在帮助开发者快速构建基于 PyTorch 的 AI 语音助手原型。\n\n## 环境准备\n\n### 系统要求\n- **推荐系统**：Linux 或 macOS\n- **Windows 用户**：部分组件（如 `torchaudio`）在 Windows 原生环境下可能无法正常工作，建议使用 **WSL2** (Windows Subsystem for Linux) 运行。\n- **硬件**：\n  - CPU 模式：任意现代计算机\n  - GPU 模式：支持 CUDA 的 NVIDIA 显卡（用于加速训练和推理）\n  - 树莓派：文档正在完善中，暂不推荐新手直接使用。\n\n### 前置依赖\n确保系统已安装以下基础软件：\n- Python 3\n- PortAudio（用于音频录制）\n  - **macOS**: `brew install portaudio`\n  - **Ubuntu\u002FDebian**: `sudo apt-get install portaudio19-dev python3-pyaudio`\n  - **CentOS\u002FFedora**: `sudo dnf install portaudio-devel`\n\n## 安装步骤\n\n推荐使用虚拟环境进行隔离安装。\n\n### 1. 创建并激活虚拟环境\n```bash\nvirtualenv voiceassistant.venv\nsource voiceassistant.venv\u002Fbin\u002Factivate\n```\n\n### 2. 安装 Python 依赖\n```bash\npip install -r requirements.txt\n```\n*注：若下载速度慢，可临时使用国内镜像源：*\n```bash\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 3. (可选) Docker 部署\n如果你希望使用容器化运行：\n\n- **仅使用 CPU**:\n  ```bash\n  docker build -f cpu.Dockerfile -t voiceassistant .\n  ```\n- **使用 CUDA (GPU)**:\n  ```bash\n  docker build -f Dockerfile -t voiceassistant .\n  ```\n\n## 基本使用\n\n本项目核心功能分为 **唤醒词检测 (Wake Word)** 和 **语音识别 (Speech Recognition)** 两个主要模块。以下是各模块的最小化运行流程。\n\n### 模块一：唤醒词检测 (Wake Word)\n\n#### 1. 数据收集与准备\n收集包含唤醒词和环境噪音的音频数据，并整理为训练格式。\n```bash\ncd VoiceAssistant\u002Fwakeword\u002Fscripts\nmkdir -p data\u002F0 data\u002F1 data\u002Fwakewords\n\n# 交互式收集唤醒词音频 (采样率 8000Hz, 每段 2 秒)\npython collect_wakeword_audio.py --sample_rate 8000 --seconds 2 --interactive --interactive_save_path .\u002Fdata\u002Fwakewords\n\n# 平衡数据集：复制唤醒词样本以避免类别不平衡\npython replicate_audios.py --wakewords_dir data\u002Fwakewords\u002F --copy_destination data\u002F1\u002F --copy_number 100\n\n# 将非唤醒词语料库（如 Common Voice）切片并放入 data\u002F0 目录\n# (需先自行下载 Common Voice 数据集，然后使用 split_audio_into_chunks.py 处理)\n\n# 生成训练所需的 JSON 标签文件\npython create_wakeword_jsons.py\n```\n*生成的 JSON 格式示例：*\n```json\n{\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fsample.wav\", \"label\": 0}\n{\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fsample.wav\", \"label\": 1}\n```\n\n#### 2. 训练模型\n```bash\ncd ..\u002Fneuralnet\n# 训练模型\npython train.py\n\n# 优化模型图以便生产环境使用\npython optimize_graph.py\n```\n\n#### 3. 测试演示\n```bash\ncd ..\npython engine.py\n```\n\n---\n\n### 模块二：语音识别 (Speech Recognition)\n\n你可以选择微调预训练模型（推荐）或从头训练。\n*预训练模型下载地址：[Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F14ljfpvisK1tz8fvFYETbdWqR3lOmJ_2Y?usp=sharing)*\n\n#### 1. 数据准备\n使用 [Mimic Recording Studio](https:\u002F\u002Fgithub.com\u002FMycroftAI\u002Fmimic-recording-studio) 录制约 1 小时的个人语音数据，或使用 Mozilla Common Voice 数据集。\n\n- **使用 Mimic 数据生成 JSON**:\n  ```bash\n  cd VoiceAssistant\u002Fspeechrecognition\u002Fscripts\n  python mimic_create_jsons.py --file_folder_directory \u002Fdir\u002Fto\u002Fthe\u002Ffolder\u002Fwith\u002Fthe\u002Fstudio\u002Fdata --save_json_path \u002Fpath\u002Fwhere\u002Fyou\u002Fwant\u002Fthem\u002Fsaved\n  ```\n\n- **使用 Common Voice 数据生成 JSON (含 MP3 转 WAV)**:\n  ```bash\n  python commonvoice_create_jsons.py --file_path \u002Fpath\u002Fto\u002Fcommonvoice\u002Ffile\u002F.tsv --save_json_path \u002Fpath\u002Fwhere\u002Fyou\u002Fwant\u002Fthem\u002Fsaved\n  ```\n  *若不转换格式，添加 `--not-convert` 参数。*\n\n*生成的 JSON 格式示例：*\n```json\n{\"key\": \"\u002Fpath\u002Fto\u002Faudio\u002Fspeech.wav\", \"text\": \"this is your text\"}\n```\n\n#### 2. 微调模型 (Fine-tuning)\n```bash\ncd ..\u002Fneuralnet\npython train.py --train_file \u002Fpath\u002Fto\u002Ftrain\u002Fjson --valid_file \u002Fpath\u002Fto\u002Fvalid\u002Fjson --load_model_from \u002Fpath\u002Fto\u002Fpretrain\u002Fspeechrecognition.ckpt\n```\n*若要从头训练，请省略 `--load_model_from` 参数。*\n\n#### 3. 优化与测试\n```bash\n# 优化模型\npython optimize_graph.py\n\n# 命令行测试\ncd ..\npython engine.py\n\n# Web GUI 演示 (需额外配置前端依赖)\npython demo\u002Fdemo.py\n```","一位嵌入式开发者希望在树莓派上构建一个完全离线、可自定义唤醒词的智能家居控制中心，以保护隐私并降低延迟。\n\n### 没有 A-Hackers-AI-Voice-Assistant 时\n- **依赖云端服务**：必须接入 Google 或 Alexa 等商业 API，导致用户语音数据上传云端，存在隐私泄露风险且断网即失效。\n- **唤醒词固定**：无法修改默认的“嘿 Siri\"或\"OK Google\"，难以针对特定噪音环境（如机械键盘声）进行针对性优化。\n- **黑盒难以定制**：商业方案内部逻辑不透明，开发者无法深入调整声学模型以适应特殊的硬件麦克风阵列。\n- **学习成本高昂**：若从零开始用 PyTorch 搭建整套流程（从音频采集、切片到训练神经网络），需耗费数周时间研究底层架构。\n\n### 使用 A-Hackers-AI-Voice-Assistant 后\n- **实现本地离线运行**：基于 Python 和 PyTorch 在本地部署所有模块，无需联网即可响应指令，彻底杜绝隐私外泄。\n- **自定义专属唤醒词**：利用提供的 `collect_wakeword_audio.py` 脚本采集特定声音数据，轻松训练识别\"Hello Computer\"等个性化唤醒词。\n- **全链路代码开源**：从唤醒词引擎到语音识别模型全部开放，开发者可直接修改 `engine.py` 来适配特定的硬件输入输出需求。\n- **快速验证原型**：借助现成的 Docker 配置和训练脚本，几天内即可完成从数据收集、模型训练到系统集成的完整闭环。\n\nA-Hackers-AI-Voice-Assistant 让开发者能够以极低的门槛，从零构建一个安全、私密且完全可控的定制化语音交互系统。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLearnedVector_A-Hackers-AI-Voice-Assistant_41f8f2d5.png","LearnedVector","Michael Nguyen","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FLearnedVector_f615e4b0.jpg","Buidl",null,"https:\u002F\u002Fgithub.com\u002FLearnedVector",[81,85,89,93],{"name":82,"color":83,"percentage":84},"Python","#3572A5",94.8,{"name":86,"color":87,"percentage":88},"HTML","#e34c26",4.2,{"name":90,"color":91,"percentage":92},"Dockerfile","#384d54",0.6,{"name":94,"color":95,"percentage":96},"Shell","#89e051",0.3,1111,377,"2026-04-14T18:04:35","MIT",4,"Linux, macOS","非必需。支持 CPU 运行；若使用 GPU 需 CUDA 环境（具体版本未说明），Docker 构建区分了 cpu.Dockerfile 和 Dockerfile（CUDA 版）。","未说明",{"notes":106,"python":107,"dependencies":108},"Windows 用户部分功能（如 torchaudio）可能无法正常工作，建议在 Linux、macOS 或使用 WSL2 运行。安装 portaudio 是录音功能的前提（macOS 可通过 homebrew 安装）。项目包含唤醒词和语音识别模型的训练脚本，需自行准备音频数据或下载预训练模型进行微调。Raspberry Pi 的支持文档尚在编写中。","3.x (python3)",[109,110,111,112,113],"portaudio","ctcdecode","pyaudio","torch","torchaudio",[115,13],"音频","2026-03-27T02:49:30.150509","2026-04-20T04:04:29.566939",[119,124,129,134,139,144,149,154,159,164],{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},43490,"遇到 'ModuleNotFoundError: No module named pydub' 错误怎么办？","这通常是因为未在正确的虚拟环境中安装库。请确认你正在使用的虚拟环境，并在该环境中运行 'pip install pydub'。如果你使用的是 Anaconda，请确保在激活了对应环境后执行安装命令。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F46",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},43491,"在 Windows 上运行时出现 'torchaudio C++ extension is not available' 警告或错误如何解决？","Torchaudio 在 Windows 上如果不从源码构建通常无法正常工作。建议用户使用 WSL2 (Windows Subsystem for Linux) 来运行该项目，或者切换到 Linux 环境以避免兼容性问题。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F20",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},43492,"训练数据所需的 JSON 文件应该是什么格式？","对于唤醒词（wakeword）AI，可以使用项目中的 'VoiceAssistant\u002Fwakeword\u002Fscripts\u002Fcreate_wakeword_json.py' 脚本来生成正确格式的 JSON 文件。手动创建时需注意，如果使用 train.py，请确保遵循脚本要求的格式。同样，Windows 用户建议使用 WSL2 运行这些脚本。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F9",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},43493,"运行 engine.py 时提示 'ModuleNotFoundError: No module named neuralnet.dataset' 怎么办？","这个问题通常是因为没有完整克隆仓库。'neuralnet' 指的是项目中的一个文件夹，而不是通过 pip 安装的包。请尝试使用 '--recursive' 参数重新克隆仓库（git clone --recursive ...），以确保 'neuralnet' 文件夹及其内部的 'dataset.py' 文件存在。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F45",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},43494,"运行 split_commonvoice.py 时，--file_name 参数应该传入什么文件？","--file_name 参数应该传入 'train.tsv' 文件。Common Voice 数据集包含 tsv 文件和音频剪辑文件夹，该脚本需要 tsv 文件作为输入来处理数据。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F7",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},43495,"训练时出现 'configure_optimizers must include a monitor...' 错误如何修复？","当使用 ReduceLROnPlateau 调度器时，必须在配置中指定监控指标。解决方法是在 train.py 中将 monitor 的值从 'none' 修改为具体的指标名称，例如：monitor = 'metric_to_track'。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F67",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},43496,"为什么模型在第一个 epoch 结束后没有被保存？","模型仅在有新的最佳 epoch 出现时才会保存，且需要指定保存路径。运行 train.py 时必须添加 '--save_checkpoint_path' 参数来指定模型保存目录。示例命令：python train.py --sample_rate 8000 --epoch 100 --batch_size 32 --save_checkpoint_path ..\u002Fmodels ...","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F52",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},43497,"运行 train.py 时提示 'ModuleNotFoundError: No module named dataset' 是怎么回事？","这通常是因为只复制了 train.py 脚本而没有复制整个仓库。'dataset' 模块位于项目根目录下的 'neuralnet' 文件夹中（即 neuralnet\u002Fdataset.py）。请确保复制了整个项目结构，而不是单个文件，以便导入路径正确。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F47",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},43498,"运行 wakeword 的 engine.py 时报错，提示缺少参数怎么办？","运行 engine.py 时需要通过命令行参数指定模型文件的路径。请使用以下格式运行：python engine.py --model_file path\u002Fto\u002Fyour\u002Fmodel.zip，将 'path\u002Fto\u002Fyour\u002Fmodel.zip' 替换为你实际的模型文件路径。","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F35",{"id":165,"question_zh":166,"answer_zh":167,"source_url":168},43499,"语音识别（Speech Recognition）的相关文档在哪里可以找到？","相关文档已经更新并可用，请访问项目的 README 文件查看语音识别部分：https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fblob\u002Fmaster\u002FREADME.md#speech-recognition","https:\u002F\u002Fgithub.com\u002FLearnedVector\u002FA-Hackers-AI-Voice-Assistant\u002Fissues\u002F6",[]]