[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-mravanelli--SincNet":3,"tool-mravanelli--SincNet":61},[4,18,26,36,44,53],{"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 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"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",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":78,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":86,"forks":87,"last_commit_at":88,"license":89,"difficulty_score":10,"env_os":90,"env_gpu":91,"env_ram":92,"env_deps":93,"category_tags":99,"github_topics":101,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":122,"updated_at":123,"faqs":124,"releases":153},8832,"mravanelli\u002FSincNet","SincNet","SincNet is a neural architecture for efficiently processing raw audio samples.","SincNet 是一款专为高效处理原始音频样本而设计的神经网络架构。它主要解决了传统卷积神经网络（CNN）在音频处理中需要学习大量滤波器参数、导致模型冗余且难以解释的问题。与标准 CNN 不同，SincNet 创新性地引入了参数化的 sinc 函数作为第一层卷积核，直接构建带通滤波器。该方法仅需从数据中学习滤波器的低频和高频截止频率，从而自动生成针对特定任务优化的自定义滤波器组。这种设计不仅大幅减少了参数量，提升了计算效率，还让网络能够更专注于提取具有物理意义的声学特征。\n\nSincNet 特别适合从事语音识别、说话人识别及相关音频分析领域的研究人员和开发者使用。项目提供了基于 PyTorch 的完整代码库及实用工具，并包含在 TIMIT 数据集上进行说话人识别的示例，方便用户快速上手实验。此外，SincNet 的核心算法也已集成到功能更全面的 SpeechBrain 语音处理工具包中，支持包括语音增强、分离及多麦克风信号处理在内的多种任务。对于希望深入探索端到端音频处理技术或需要轻量化高效模型的专业人士而言，SincNet 是一个极具价值的开源选择。","\n# SincNet\nSincNet is a neural architecture for processing **raw audio samples**. It is a novel Convolutional Neural Network (CNN) that encourages the first convolutional layer to discover more **meaningful filters**. SincNet is based on parametrized sinc functions, which implement band-pass filters.\n\nIn contrast to standard CNNs, that learn all elements of each filter, only low and high cutoff frequencies are directly learned from data with the proposed method. This offers a very compact and efficient way to derive a **customized filter bank** specifically tuned for the desired application. \n\nThis project releases a collection of codes and utilities to perform speaker identification with SincNet.\nAn example of speaker identification with the TIMIT database is provided. If you are interested in **SincNet applied to speech recognition you can take a look into the PyTorch-Kaldi github repository (https:\u002F\u002Fgithub.com\u002Fmravanelli\u002Fpytorch-kaldi).** \n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmravanelli_SincNet_readme_8f5a84d1c2af.png\" width=\"400\" img align=\"right\">\n\n[Take a look into our video introduction to SincNet](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=mXQBObRGUgk&feature=youtu.be)\n\n## Cite us\nIf you use this code or part of it, please cite us!\n\n*Mirco Ravanelli, Yoshua Bengio, “Speaker Recognition from raw waveform with SincNet”* [Arxiv](http:\u002F\u002Farxiv.org\u002Fabs\u002F1808.00158)\n\n\n## Prerequisites\n- Linux\n- Python 3.6\u002F2.7\n- pytorch 1.0\n- pysoundfile (``` conda install -c conda-forge pysoundfile```)\n- We also suggest using the anaconda environment.\n\n## SpeechBrain\nSincNet is implemented in the SpeechBrain (https:\u002F\u002Fspeechbrain.github.io\u002F) project as well. We encourage you to take a look into it as well!\nIt is an all-in-one pytorch-based speech processing toolkit that currently supports speech recognition, speaker recognition, SLU, speech enhancement, speech separation, multi-microphone signal processing. It is designed to be flexible, easy-to-use, modular, and well documented. [Check it out](https:\u002F\u002Fspeechbrain.github.io\u002F).\n\n## Updates\nFeb, 16 2019:\n- We replaced the old \"sinc_conv\"  with \"SincConv_fast\". The latter is 50% faster.\n- In the near future, we plan to support SincNet based speaker-id within the [PyTorch-Kaldi project](https:\u002F\u002Fgithub.com\u002Fmravanelli\u002Fpytorch-kaldi) (the current version of the project only supports SincNEt for speech recognition experiments). This will allow users to perform speaker recognition experiments in a faster and much more flexible environment. The current repository will anyway remain as a showcase. \n\n## How to run a TIMIT experiment\nEven though the code can be easily adapted to any speech dataset, in the following part of the documentation we provide an example based on the popular TIMIT dataset.\n\n**1. Run TIMIT data preparation.**\n\nThis step is necessary to store a version of TIMIT in which start and end silences are removed and the amplitude of each speech utterance is normalized. To do it, run the following code:\n\n``\npython TIMIT_preparation.py $TIMIT_FOLDER $OUTPUT_FOLDER data_lists\u002FTIMIT_all.scp\n``\n\nwhere:\n- *$TIMIT_FOLDER* is the folder of the original TIMIT corpus\n- *$OUTPUT_FOLDER* is the folder in which the normalized TIMIT will be stored\n- *data_lists\u002FTIMIT_all.scp* is the list of the TIMIT files used for training\u002Ftest the speaker id system.\n\n**2. Run the speaker id experiment.**\n\n- Modify the *[data]* section of *cfg\u002FSincNet_TIMIT.cfg* file according to your paths. In particular, modify the *data_folder* with the *$OUTPUT_FOLDER* specified during the TIMIT preparation. The other parameters of the config file belong to the following sections:\n 1. *[windowing]*, that defines how each sentence is split into smaller chunks.\n 2. *[cnn]*,  that specifies the characteristics of the CNN architecture.\n 3. *[dnn]*,  that specifies the characteristics of the fully-connected DNN architecture following the CNN layers.\n 4. *[class]*, that specify the softmax classification part.\n 5. *[optimization]*, that reports the main hyperparameters used to train the architecture.\n\n- Once setup the cfg file, you can run the speaker id experiments using the following command:\n\n``\npython speaker_id.py --cfg=cfg\u002FSincNet_TIMIT.cfg\n``\n\nThe network might take several hours to converge (depending on the speed of your GPU card). In our case, using an *nvidia TITAN X*, the full training took about 24 hours. If you use the code within a cluster is crucial to copy the normalized dataset into the local node, since the current version of the code requires frequent accesses to the stored wav files. Note that several possible optimizations to improve the code speed are not implemented in this version since are out of the scope of this work.\n\n\n**3. Results.**\n\nThe results are saved into the *output_folder* specified in the cfg file. In this folder, you can find a file (*res.res*) summarizing training and test error rates. The model *model_raw.pkl* is the SincNet model saved after the last iteration. \nUsing the cfg file specified above, we obtain the following results:\n```\nepoch 0, loss_tr=5.542032 err_tr=0.984189 loss_te=4.996982 err_te=0.969038 err_te_snt=0.919913\nepoch 8, loss_tr=1.693487 err_tr=0.434424 loss_te=2.735717 err_te=0.612260 err_te_snt=0.069264\nepoch 16, loss_tr=0.861834 err_tr=0.229424 loss_te=2.465258 err_te=0.520276 err_te_snt=0.038240\nepoch 24, loss_tr=0.528619 err_tr=0.144375 loss_te=2.948707 err_te=0.534053 err_te_snt=0.062049\nepoch 32, loss_tr=0.362914 err_tr=0.100518 loss_te=2.530276 err_te=0.469060 err_te_snt=0.015152\nepoch 40, loss_tr=0.267921 err_tr=0.076445 loss_te=2.761606 err_te=0.464799 err_te_snt=0.023088\nepoch 48, loss_tr=0.215479 err_tr=0.061406 loss_te=2.737486 err_te=0.453493 err_te_snt=0.010823\nepoch 56, loss_tr=0.173690 err_tr=0.050732 loss_te=2.812427 err_te=0.443322 err_te_snt=0.011544\nepoch 64, loss_tr=0.145256 err_tr=0.043594 loss_te=2.917569 err_te=0.438507 err_te_snt=0.009380\nepoch 72, loss_tr=0.128894 err_tr=0.038486 loss_te=3.009008 err_te=0.438005 err_te_snt=0.019481\n....\nepoch 320, loss_tr=0.033052 err_tr=0.009639 loss_te=4.076542 err_te=0.416710 err_te_snt=0.006494\nepoch 328, loss_tr=0.033344 err_tr=0.010117 loss_te=3.928874 err_te=0.415024 err_te_snt=0.007215\nepoch 336, loss_tr=0.033228 err_tr=0.010166 loss_te=4.030224 err_te=0.410034 err_te_snt=0.005051\nepoch 344, loss_tr=0.033313 err_tr=0.010166 loss_te=4.402949 err_te=0.428691 err_te_snt=0.009380\nepoch 352, loss_tr=0.031828 err_tr=0.009238 loss_te=4.080747 err_te=0.414066 err_te_snt=0.006494\nepoch 360, loss_tr=0.033095 err_tr=0.009600 loss_te=4.254683 err_te=0.419954 err_te_snt=0.005772\n``` \nThe converge is initially very fast (see the first 30 epochs). After that the performance improvement decreases and oscillations into the sentence error rate performance appear. Despite these oscillations an average improvement trend can be observed for the subsequent epochs. In this experiment, we stopped our training  at epoch 360.\nThe fields of the res.res file have the following meaning:\n- loss_tr: is the average training loss (i.e., cross-entropy function) computed at every frame.\n- err_tr: is the classification error (measured at frame level) of the training data. Note that we split the speech signals into chunks of 200ms with 10ms overlap. The error is averaged for all the chunks of the training dataset.\n- loss_te is the average test loss (i.e., cross-entropy function) computed at every frame.\n- err_te: is the classification error (measured at frame level) of the test data.\n- err_te_snt: is the classification error (measured at sentence level) of the test data. Note that we split the speech signal into chunks of 200ms with 10ms overlap. For each chunk, our SincNet performs a prediction over the set of speakers. To compute this classification error rate we averaged the predictions and, for each sentence, we voted for the speaker with the highest average probability.\n\n[You can find our trained model for TIMIT here.](https:\u002F\u002Fbitbucket.org\u002Fmravanelli\u002Fsincnet_models\u002F)\n\n## Where SincNet is implemented?\nTo take a look into the SincNet implementation you should open the file *dnn_models.py* and read the classes *SincNet*, *sinc_conv* and the function *sinc*.\n\n## How to use SincNet with a different dataset?\nIn this repository, we used the TIMIT dataset as a tutorial to show how SincNet works. \nWith the current version of the code, you can easily use a different corpus. To do it you should provide in input the corpora-specific input files (in wav format) and your own labels. You should thus modify the paths into the *.scp files you find in the data_lists folder. \n\nTo assign to each sentence the right label, you also have to modify the dictionary \"*TIMIT_labels.npy*\". \nThe labels are specified within a python dictionary that contains sentence ids as keys (e.g., \"*si1027*\") and speaker_ids as values. Each speaker_id is an integer, ranging from 0 to N_spks-1. In the TIMIT dataset, you can easily retrieve the speaker id from the path (e.g., *train\u002Fdr1\u002Ffcjf0\u002Fsi1027.wav* is the sentence_id \"*si1027*\" uttered by the speaker \"*fcjf0*\"). For other datasets, you should be able to retrieve in such a way this dictionary containing pairs of speakers and sentence ids.\n\nYou should then modify the config file (*cfg\u002FSincNet_TIMIT.cfg*) according to your new paths. Remember also to change the field \"*class_lay=462*\" according to the number of speakers N_spks you have in your dataset.\n\n**The version of the Librispeech dataset used in the paper is available upon request**. In our work, we have used only 12-15 seconds of training material for each speaker and we processed the original librispeech sentences in order to perform amplitude normalization. Moreover, we used a simple energy-based VAD to avoid silences at the beginning and end of each sentence as well as to split in multiple chunks the sentences that contain longer silence\n\n\n\n## References\n\n[1] Mirco Ravanelli, Yoshua Bengio, “Speaker Recognition from raw waveform with SincNet” [Arxiv](http:\u002F\u002Farxiv.org\u002Fabs\u002F1808.00158)\n","# SincNet\nSincNet 是一种用于处理 **原始音频样本** 的神经网络架构。它是一种新颖的卷积神经网络（CNN），旨在促使第一层卷积层发现更具 **语义意义的滤波器**。SincNet 基于参数化的 sinc 函数，这些函数实现了带通滤波器。\n\n与标准 CNN 不同，标准 CNN 会学习每个滤波器的所有参数，而所提出的 SincNet 方法仅直接从数据中学习低频和高频截止频率。这种方法提供了一种非常紧凑且高效的方式来构建一个专门为特定应用量身定制的 **自定义滤波器组**。\n\n本项目发布了一系列代码和工具，用于使用 SincNet 进行说话人识别。我们提供了一个基于 TIMIT 数据集的说话人识别示例。如果您对 **SincNet 在语音识别中的应用感兴趣，可以查看 PyTorch-Kaldi GitHub 仓库（https:\u002F\u002Fgithub.com\u002Fmravanelli\u002Fpytorch-kaldi）**。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmravanelli_SincNet_readme_8f5a84d1c2af.png\" width=\"400\" img align=\"right\">\n\n[观看我们的 SincNet 介绍视频](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=mXQBObRGUgk&feature=youtu.be)\n\n## 引用我们\n如果您使用了此代码或其中的一部分，请引用我们！\n\n*Mirco Ravanelli, Yoshua Bengio, “Speaker Recognition from raw waveform with SincNet”* [Arxiv](http:\u002F\u002Farxiv.org\u002Fabs\u002F1808.00158)\n\n\n## 先决条件\n- Linux\n- Python 3.6\u002F2.7\n- PyTorch 1.0\n- PySoundFile（``` conda install -c conda-forge pysoundfile```）\n- 我们还建议使用 Anaconda 环境。\n\n## SpeechBrain\nSincNet 也在 SpeechBrain（https:\u002F\u002Fspeechbrain.github.io\u002F）项目中实现。我们也鼓励您了解一下！SpeechBrain 是一个基于 PyTorch 的一体化语音处理工具包，目前支持语音识别、说话人识别、任务型语言理解（SLU）、语音增强、语音分离以及多麦克风信号处理等功能。该工具包设计灵活、易于使用、模块化且文档完善。[立即查看](https:\u002F\u002Fspeechbrain.github.io\u002F)。\n\n## 更新\n2019年2月16日：\n- 我们已将旧的“sinc_conv”替换为“SincConv_fast”。后者速度提升了50%。\n- 在不久的将来，我们计划在 [PyTorch-Kaldi 项目](https:\u002F\u002Fgithub.com\u002Fmravanelli\u002Fpytorch-kaldi) 中支持基于 SincNet 的说话人识别功能（当前版本的项目仅支持 SincNet 用于语音识别实验）。这将使用户能够在更快速、更灵活的环境中进行说话人识别实验。不过，当前的代码库仍将继续作为示例展示。\n\n## 如何运行 TIMIT 实验\n尽管代码可以轻松适配任何语音数据集，但在文档的下一部分，我们提供了一个基于流行 TIMIT 数据集的示例。\n\n**1. 运行 TIMIT 数据准备。**\n\n此步骤是必要的，用于存储一个去除了起始和结束静音并归一化了每个语音片段幅度的 TIMIT 版本。为此，请运行以下代码：\n\n``\npython TIMIT_preparation.py $TIMIT_FOLDER $OUTPUT_FOLDER data_lists\u002FTIMIT_all.scp\n``\n\n其中：\n- *$TIMIT_FOLDER* 是原始 TIMIT 语料库的文件夹\n- *$OUTPUT_FOLDER* 是将存储归一化 TIMIT 的文件夹\n- *data_lists\u002FTIMIT_all.scp* 是用于训练\u002F测试说话人识别系统的 TIMIT 文件列表。\n\n**2. 运行说话人识别实验。**\n\n- 根据您的路径修改 *cfg\u002FSincNet_TIMIT.cfg* 文件中的 *[data]* 部分。特别是，将 *data_folder* 修改为在 TIMIT 准备过程中指定的 *$OUTPUT_FOLDER*。配置文件的其他参数属于以下部分：\n  1. *[windowing]*，定义如何将每句话分割成更小的块。\n  2. *[cnn]*，指定 CNN 架构的特征。\n  3. *[dnn]*，指定 CNN 层之后的全连接 DNN 架构的特征。\n  4. *[class]*，指定 softmax 分类部分。\n  5. *[optimization]*，报告用于训练架构的主要超参数。\n\n- 配置好 cfg 文件后，您可以使用以下命令运行说话人识别实验：\n\n``\npython speaker_id.py --cfg=cfg\u002FSincNet_TIMIT.cfg\n``\n\n网络可能需要几个小时才能收敛（取决于您的 GPU 卡的速度）。在我们的例子中，使用 *nvidia TITAN X* 显卡，整个训练大约花费了 24 小时。如果您在集群中使用该代码，务必将归一化的数据集复制到本地节点上，因为当前版本的代码需要频繁访问存储的 wav 文件。请注意，有几个可能的优化措施可以提高代码速度，但在此版本中并未实现，因为它们超出了本工作的范围。\n\n\n**3. 结果。**\n\n结果会保存到 cfg 文件中指定的 *output_folder* 中。在这个文件夹中，您可以找到一个文件 (*res.res*)，总结了训练和测试的错误率。模型 *model_raw.pkl* 是在最后一次迭代后保存的 SincNet 模型。\n使用上述配置文件，我们得到了以下结果：\n```\nepoch 0, loss_tr=5.542032 err_tr=0.984189 loss_te=4.996982 err_te=0.969038 err_te_snt=0.919913\nepoch 8, loss_tr=1.693487 err_tr=0.434424 loss_te=2.735717 err_te=0.612260 err_te_snt=0.069264\nepoch 16, loss_tr=0.861834 err_tr=0.229424 loss_te=2.465258 err_te=0.520276 err_te_snt=0.038240\nepoch 24, loss_tr=0.528619 err_tr=0.144375 loss_te=2.948707 err_te=0.534053 err_te_snt=0.062049\nepoch 32, loss_tr=0.362914 err_tr=0.100518 loss_te=2.530276 err_te=0.469060 err_te_snt=0.015152\nepoch 40, loss_tr=0.267921 err_tr=0.076445 loss_te=2.761606 err_te=0.464799 err_te_snt=0.023088\nepoch 48, loss_tr=0.215479 err_tr=0.061406 loss_te=2.737486 err_te=0.453493 err_te_snt=0.010823\nepoch 56, loss_tr=0.173690 err_tr=0.050732 loss_te=2.812427 err_te=0.443322 err_te_snt=0.011544\nepoch 64, loss_tr=0.145256 err_tr=0.043594 loss_te=2.917569 err_te=0.438507 err_te_snt=0.009380\nepoch 72, loss_tr=0.128894 err_tr=0.038486 loss_te=3.009008 err_te=0.438005 err_te_snt=0.019481\n....\nepoch 320, loss_tr=0.033052 err_tr=0.009639 loss_te=4.076542 err_te=0.416710 err_te_snt=0.006494\nepoch 328, loss_tr=0.033344 err_tr=0.010117 loss_te=3.928874 err_te=0.415024 err_te_snt=0.007215\nepoch 336, loss_tr=0.033228 err_tr=0.010166 loss_te=4.030224 err_te=0.410034 err_te_snt=0.005051\nepoch 344, loss_tr=0.033313 err_tr=0.010166 loss_te=4.402949 err_te=0.428691 err_te_snt=0.009380\nepoch 352, loss_tr=0.031828 err_tr=0.009238 loss_te=4.080747 err_te=0.414066 err_te_snt=0.006494\nepoch 360, loss_tr=0.033095 err_tr=0.009600 loss_te=4.254683 err_te=0.419954 err_te_snt=0.005772\n``` \n收敛最初非常迅速（见前 30 个 epoch）。此后，性能提升逐渐减缓，并且句子级错误率出现了波动。尽管存在这些波动，后续的各个 epoch 仍呈现出平均性能提升的趋势。在本次实验中，我们于第 360 个 epoch 停止了训练。\nres.res 文件中的字段含义如下：\n- loss_tr：是在每一帧上计算的平均训练损失（即交叉熵函数）。\n- err_tr：是训练数据的分类错误率（以帧为单位测量）。请注意，我们将语音信号分割成 200 毫秒的块，重叠 10 毫秒。错误率是对训练数据集中所有块的平均值。\n- loss_te：是在每一帧上计算的平均测试损失（即交叉熵函数）。\n- err_te：是测试数据的分类错误率（以帧为单位测量）。\n- err_te_snt：是测试数据的分类错误率（以句子为单位测量）。请注意，我们将语音信号分割成 200 毫秒的块，重叠 10 毫秒。对于每个块，我们的 SincNet 模型都会对一组说话人进行预测。为了计算这个错误率，我们对所有预测进行了平均，并根据每个句子中最高平均概率的说话人进行投票。\n\n[您可以在这里找到我们为 TIMIT 训练的模型。](https:\u002F\u002Fbitbucket.org\u002Fmravanelli\u002Fsincnet_models\u002F)\n\n## SincNet 在哪里实现？\n要查看 SincNet 的实现，您应该打开 *dnn_models.py* 文件，并阅读 *SincNet*、*sinc_conv* 类以及 *sinc* 函数。\n\n## 如何将 SincNet 应用到其他数据集？\n在本仓库中，我们使用 TIMIT 数据集作为教程，展示 SincNet 的工作原理。\n借助当前版本的代码，您可以轻松地使用其他语料库。为此，您需要提供特定于该语料库的输入文件（WAV 格式）以及您自己的标签。因此，您需要修改 `data_lists` 文件夹中的 `.scp` 文件中的路径。\n\n为了为每句话分配正确的标签，您还需要修改名为 `TIMIT_labels.npy` 的字典文件。\n标签以 Python 字典的形式指定，其中句子 ID 作为键（例如 `si1027`），说话人 ID 作为值。每个说话人 ID 是一个整数，范围从 0 到 N_spks-1。在 TIMIT 数据集中，您可以很容易地从文件路径中提取说话人 ID（例如，`train\u002Fdr1\u002Ffcjf0\u002Fsi1027.wav` 表示由说话人 `fcjf0` 发音的句子 ID 为 `si1027`）。对于其他数据集，您也应能以类似方式构建包含说话人和句子 ID 对应关系的字典。\n\n接下来，您需要根据新的路径修改配置文件 (`cfg\u002FSincNet_TIMIT.cfg`)。同时，请务必根据您数据集中说话人的数量 N_spks 修改 `class_lay=462` 这一字段。\n\n**论文中使用的 Librispeech 数据集版本可按需提供**。在我们的研究中，我们仅为每个说话人使用了 12–15 秒的训练材料，并对原始的 Librispeech 句子进行了处理以进行幅度归一化。此外，我们还使用了一个基于能量的简单 VAD 检测器，以去除每句话开头和结尾的静音，并将包含较长静音的句子拆分为多个片段。\n\n\n## 参考文献\n\n[1] Mirco Ravanelli, Yoshua Bengio, “Speaker Recognition from raw waveform with SincNet” [Arxiv](http:\u002F\u002Farxiv.org\u002Fabs\u002F1808.00158)","# SincNet 快速上手指南\n\nSincNet 是一种专为处理**原始音频样本**设计的神经架构。它基于参数化的 sinc 函数实现带通滤波器，仅需学习截止频率即可生成定制滤波器组，特别适用于说话人识别任务。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux\n*   **Python 版本**: 3.6 或 2.7 (推荐 Python 3.6+)\n*   **深度学习框架**: PyTorch 1.0\n*   **音频处理库**: `pysoundfile`\n*   **推荐环境**: 建议使用 Anaconda 管理依赖环境\n\n## 安装步骤\n\n建议使用 Conda 创建独立环境并安装依赖。\n\n1.  **创建并激活 Conda 环境**（如果尚未安装）：\n    ```bash\n    conda create -n sincnet python=3.6\n    conda activate sincnet\n    ```\n\n2.  **安装 PyTorch**：\n    *注：国内用户可使用清华源加速安装，以下为通用命令，具体版本请根据显卡驱动调整。*\n    ```bash\n    # 使用清华镜像源安装 PyTorch 1.0 (示例)\n    pip install torch==1.0.0 torchvision==0.2.1 -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n    ```\n\n3.  **安装音频依赖库**：\n    ```bash\n    conda install -c conda-forge pysoundfile\n    ```\n\n4.  **获取代码**：\n    克隆本仓库到本地：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fmravanelli\u002FSincNet.git\n    cd SincNet\n    ```\n\n## 基本使用\n\n以下以经典的 **TIMIT 数据集**为例，演示如何运行说话人识别实验。\n\n### 1. 数据预处理\n此步骤将移除静音片段并归一化音频幅度。请替换 `$TIMIT_FOLDER` 和 `$OUTPUT_FOLDER` 为您的实际路径。\n\n```bash\npython TIMIT_preparation.py $TIMIT_FOLDER $OUTPUT_FOLDER data_lists\u002FTIMIT_all.scp\n```\n\n*   `$TIMIT_FOLDER`: 原始 TIMIT 数据集路径\n*   `$OUTPUT_FOLDER`: 预处理后数据的存储路径\n*   `data_lists\u002FTIMIT_all.scp`: 训练\u002F测试文件列表\n\n### 2. 配置实验参数\n编辑配置文件 `cfg\u002FSincNet_TIMIT.cfg`：\n*   修改 `[data]` 部分中的 `data_folder` 为上一步生成的 `$OUTPUT_FOLDER` 路径。\n*   如需调整网络结构（CNN\u002FDNN）、窗口大小或优化器超参数，可分别修改 `[windowing]`, `[cnn]`, `[dnn]`, `[optimization]` 等章节。\n*   **注意**：若使用自定义数据集，需同步修改 `class_lay` 参数以匹配说话人数量。\n\n### 3. 运行训练\n执行以下命令启动说话人识别训练：\n\n```bash\npython speaker_id.py --cfg=cfg\u002FSincNet_TIMIT.cfg\n```\n\n*   **耗时提示**：模型收敛可能需要数小时（取决于 GPU 性能，如在 NVIDIA TITAN X 上约需 24 小时）。\n*   **集群建议**：若在集群运行，建议将归一化后的数据集复制到本地节点，以减少频繁读取 wav 文件的 I\u002FO 延迟。\n\n### 4. 查看结果\n训练完成后，结果将保存在配置文件中指定的 `output_folder` 目录下：\n*   `res.res`: 包含训练和测试的损失值及错误率总结。\n*   `model_raw.pkl`: 最后一次迭代保存的 SincNet 模型文件。\n\n**结果字段说明：**\n*   `loss_tr` \u002F `loss_te`: 帧级别的平均训练\u002F测试损失（交叉熵）。\n*   `err_tr` \u002F `err_te`: 帧级别的分类错误率。\n*   `err_te_snt`: 句子级别的分类错误率（通过对句子内所有片段的预测概率取平均并投票得出）。\n\n> **提示**：若需将 SincNet 应用于语音识别或其他更复杂的场景，推荐参考 [PyTorch-Kaldi](https:\u002F\u002Fgithub.com\u002Fmravanelli\u002Fpytorch-kaldi) 项目或全功能工具包 [SpeechBrain](https:\u002F\u002Fspeechbrain.github.io\u002F)。","某安防科技公司的算法团队正在开发一套基于声音的远程身份验证系统，需要从原始录音中精准识别说话人身份。\n\n### 没有 SincNet 时\n- **特征工程繁琐**：团队必须依赖人工设计的梅尔频率倒谱系数（MFCC）等手工特征，流程复杂且容易丢失原始波形中的细微鉴别信息。\n- **模型效率低下**：传统卷积神经网络需要学习滤波器中的每一个参数，导致模型参数量巨大，训练收敛慢且推理延迟高。\n- **泛化能力受限**：手工提取的特征往往针对特定噪声环境优化，一旦遇到未见过的新场景或背景噪音，识别准确率大幅下降。\n- **可解释性差**：黑盒式的滤波器学习过程让开发人员难以理解模型究竟捕捉了哪些频段的声音特征，调试困难。\n\n### 使用 SincNet 后\n- **端到端自动学习**：SincNet 直接处理原始音频样本，利用参数化的 sinc 函数自动发现最具意义的带通滤波器，无需任何人工特征提取步骤。\n- **计算高效紧凑**：仅需学习滤波器的低频和高频截止频率，大幅减少了可训练参数，使训练速度提升且更适合部署在资源受限的边缘设备上。\n- **定制化滤波更强**：生成的自定义滤波器组能根据数据自适应调整，专门捕捉对说话人区分度最高的频段，显著提升了复杂环境下的鲁棒性。\n- **物理意义明确**：由于滤波器基于明确的数学函数构建，开发人员可以直观地分析模型关注的频率范围，便于针对性优化。\n\nSincNet 通过将信号处理先验知识融入深度学习架构，实现了从原始波形到高精度说话人识别的高效、可解释的端到端解决方案。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmravanelli_SincNet_31a40308.png","mravanelli","Mirco Ravanelli","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmravanelli_cb71639f.jpg","I'm an Assistant Professor at Concordia University and Mila Associate Member working on deep learning for Conversational AI","Concordia University\u002FMila","Montreal",null,"https:\u002F\u002Fsites.google.com\u002Fsite\u002Fmircoravanelli\u002F","https:\u002F\u002Fgithub.com\u002Fmravanelli",[82],{"name":83,"color":84,"percentage":85},"Python","#3572A5",100,1238,269,"2026-04-13T12:10:30","MIT","Linux","需要 NVIDIA GPU（文中提及使用 nvidia TITAN X），具体显存大小和 CUDA 版本未说明","未说明",{"notes":94,"python":95,"dependencies":96},"建议使用 Anaconda 环境管理。代码在集群运行时，需将归一化后的数据集复制到本地节点以提高读取速度。训练时间较长（使用 TITAN X 约需 24 小时）。若用于其他数据集，需手动修改标签字典和配置文件中的类别数量。","3.6 或 2.7",[97,98],"pytorch 1.0","pysoundfile",[100,14],"音频",[102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"deep-learning","audio","waveform","filtering","cnn","convolutional-neural-networks","speaker-recognition","speaker-verification","speaker-identification","speech-recognition","asr","audio-processing","speech-processing","digital-signal-processing","signal-processing","neural-networks","artificial-intelligence","timit","pytorch","python","2026-03-27T02:49:30.150509","2026-04-18T09:19:35.598164",[125,130,135,140,145,149],{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},39610,"如何在 SincNet 中使用自定义数据库进行说话人识别训练？","您可以使用自己的训练和测试 WAV 文件。如果遇到输入维度不匹配的错误（例如 RuntimeError: The expanded size of the tensor (0) must match the existing size (2048)），请检查配置文件中的采样率（fs）和窗口长度（cw_len）。输入维度由公式 `wlen = int(fs * cw_len \u002F 1000.00)` 决定。如果输入维度发生变化（例如从 2048 变为 3200），您需要相应地修改模型中的全连接层（fc layer）输入维度以匹配新的特征大小。","https:\u002F\u002Fgithub.com\u002Fmravanelli\u002FSincNet\u002Fissues\u002F3",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},39611,"在无监督学习中，互信息（Mutual Information）计算中的联合分布和边缘分布是如何采样的？","在该方法中，(z_1, z_2) 代表来自同一个说话人的语音表示样本，这被视为联合分布 p(z_1, z_2) 的采样；而 (z_1, z_rnd) 代表来自两个不同说话人的语音表示样本，这被视为边缘分布乘积 p(z_1)p(z_2) 的采样。该方法基于一个合理的假设：从同一个语音信号中随机采样的两个片段属于同一个说话人（适用于大多数单说话人数据集如 Librispeech、TIMIT 等）。","https:\u002F\u002Fgithub.com\u002Fmravanelli\u002FSincNet\u002Fissues\u002F11",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},39612,"运行推理脚本时出现 KeyError，提示找不到大写字母的文件路径（如 'TRAIN\u002FDR1\u002F...WAV'），如何解决？","当前版本的代码期望文件名全部为小写（例如 \"train\u002Fdr1\u002Ffcjf0\u002Fsi1027.wav\"），而您的文件路径可能包含大写字母。解决方法有两种：一是将所有文件名和目录名改为小写；二是修改推理脚本（inference.py），在读取标签字典前将文件路径字符串转换为小写（使用 `.lower()` 方法）。","https:\u002F\u002Fgithub.com\u002Fmravanelli\u002FSincNet\u002Fissues\u002F23",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},39613,"在使用可训练的滤波器组（free filterbank）时遇到 NaN 损失或梯度爆炸怎么办？","如果在训练过程中出现 NaN 损失，通常是因为第一个卷积层爆炸导致的。建议在管道中加入梯度裁剪（gradient clipping），将其设置为较高的值（例如 100-200），这有助于防止梯度爆炸并促进收敛。此外，对于解析自由滤波器组（analytic free filterbank），如果输入带有噪声，可能需要显式地捕获并处理 NaN 梯度才能正常工作。注意：自由滤波器组输出不是复数，因此对其取幅度（magnitude）可能没有意义。","https:\u002F\u002Fgithub.com\u002Fmravanelli\u002FSincNet\u002Fissues\u002F74",{"id":146,"question_zh":147,"answer_zh":148,"source_url":144},39614,"SincNet 滤波器与传统的 STFT 或 MFCC 相比有什么特点？是否尝试过训练 STFT 滤波器？","SincNet 的滤波器参数量少于普通 CNN 层，本质上是受 DSP 启发的频率滤波器。关于是否尝试过训练 STFT 滤波器或使用分离卷积（separable convolutions），社区讨论指出，虽然 STFT 通常作为固定卷积实现，但可以尝试使其可训练。然而，实验表明在某些设置下（如可调谐 STFT），直接训练可能导致数值不稳定（如 NaN）。相比之下，SincNet 的参数化 sinc 滤波器在设计上更稳定且参数效率更高。",{"id":150,"question_zh":151,"answer_zh":152,"source_url":129},39615,"如何计算输入音频的窗口长度（window length）以匹配模型输入？","输入窗口长度取决于配置文件中的采样率（fs）和窗口时长（cw_len，单位为毫秒）。计算公式为：`wlen = int(fs * cw_len \u002F 1000.00)`。例如，如果 fs=16000 且 cw_len=200，则输入维度应为 3200。确保您的数据预处理步骤生成的张量尺寸与此计算结果一致，否则需要调整模型的全连接层以适应新的输入维度。",[]]