跳到主内容
@wquguru
精选88GitHub 新爆发仓库(GitHub)技巧与观点

GitHub热榜earshot:让AI编码Agent通过听觉反馈优化声音生成

Leonxlnx/earshot: Ears for coding agents: let AI hear, review and make sound. CPU-only, open source.

原文
发到 X
推荐理由

Agent开发者的实用利器,解决了多模态闭环中‘听’的缺失,提供了从分析到生成的完整工程方案。

Ears for coding agents: let AI hear, review and make sound. CPU-only, open source.

编码代理的耳朵:让 AI 聆听、审查并生成声音。仅支持 CPU,开源。

GitHub repository created 2026-10-15 · 1068 stars in 4.1 days (about 260 a day) · Python

GitHub 仓库创建于 2026-10-15 · 4.1 天内获得 1068 颗星(约每天 260 颗)· Python

earshot

Ears for coding agents.

编码代理的耳朵。

Watch the 22 s launch film - every sound in it was made in code by `earshot forge`; no recordings, no music track.

观看 22 秒的发布影片——其中的每一个声音均由 `earshot forge` 在代码中生成;无录音,无音轨。

AI coding agents can now write the code that renders a film, a product demo or a game. They still cannot hear what they made. They cannot tell a premium key press from a cheap one, notice that a hit lands 80 ms after the cut, or hear that the music swells in the wrong place.

AI 编码代理现在可以编写渲染影片、产品演示或游戏的代码。但它们仍无法听到自己制作的声音。它们无法区分高级按键声与廉价按键声,无法注意到击打声比剪辑晚了 80 毫秒,也无法察觉音乐在错误的位置高潮迭起。

earshot turns sound into evidence an agent can reason about: what a file sounds like in words, how well it fits a description, the best moment inside a long recording, whether it is a real recording or code-synthesized, a second-by-second listening transcript of a whole film, an annotated picture of it, and a scorecard against professional launch films. It runs locally on CPU, as a CLI, a Python API and an MCP server.

earshot 将声音转化为代理可推理的证据:以文字描述文件听起来的样子、其与描述的契合度、长录音中的最佳时刻、是真实录音还是代码合成、整部影片的逐秒听写转录、其带注释的图片,以及与专业发布影片对比的评分卡。它在本地 CPU 上运行,提供 CLI、Python API 和 MCP 服务器。

With ears, an agent can also make its own sounds in code and improve them by listening (`earshot forge`), and translate a recording into code it can vary (`earshot fit`). Both below.

拥有耳朵后,代理还可以用代码生成自己的声音并通过聆听来改进它们(`earshot forge`),并将录音转换为可调整的代码(`earshot fit`)。两者见下文。

New in 0.3: sound for code-made films. A bank of 201 sound effects stored as code that render by id in seconds, with no models and no network: `earshot sfx` aims a whoosh, hit, click or note at a moment in the picture, and `earshot kit` renders a whole film's effects with measured sync points (below).

0.3 版新增:为代码制作的影片添加声音。一个包含 201 个音效的代码库,通过 ID 在秒级时间内渲染,无需模型和网络:`earshot sfx` 可将呼啸、撞击、点击或音符精准定位到画面的某一时刻,而 `earshot kit` 则使用精确的同步点渲染整部影片的所有音效(见下文)。

What it does

功能介绍

commandwhat an agent gets
`describe FILE`what it sounds like: calibrated tags (z) with the closest alternative readings, AudioSet labels, measurements
`match FILE QUERY [--alts ...]`how well a description fits: cosine, z among the vocabulary, a verdict (strong / plausible / weak / no match) with held-out evidence
`rank QUERY PATHS...`many candidate files sorted by a description (pick the best download)
`find FILE QUERY`the best moments inside a long recording, as sample trims (start / end seconds)
`compare FILE --refs DIR` / `ab A B`nearest reference recordings and typicality; A/B two sounds or two trims, the differences in words
`realness FILE...`real recording / pro-produced vs code-synthesized, with evidence and per-window scores
`timeline FILE [--video V] [--cues C]`the listening transcript: events (time, level, tag), sections, loudness, beat grid, sync of sound to picture cuts and cue frames
`sheet FILE -o out.png`an annotated PNG (video frames, sections, labelled events, spectrogram, waveform, loudness, sync markers) for agents that read images
`critique FILE [--video V]`a launch-video scorecard against a profile of 7 professional launch films, with timestamped fixes
`profile REFS... -o p.json`build your own reference profile from films you admire
`measure FILE`objective measurements only (no models): LUFS, true peak, LRA, envelope, spectrum, tempo / key
`forge RECIPE --refset CAT`make a sound in code and improve it by listening (see below)
`fit FILE -o recipe.py`translate a recording into a forge recipe module that re-renders it, with knobs and morphs (see below)
`sfx render ID -o x.wav`a sound from the shipped bank of 201, aimed at the picture (`--dur`, `--apex`, `--pitch`) and audited; `sfx list`, `sfx check` (no models)
`kit init / render / check`a film's sound kit: one bank sound per role, rendered into cached takes with measured onset / peak / end (no models)
`gallery DIR -o page.html`one static HTML listening page of forge outputs: players, spectrograms, numbers
`llm FILE --yes-upload`optional audio-LLM critique (Gemini), only with your own key and explicit consent
`mcp`the same tools as an MCP server for Claude Code and other agents
`doctor [--load]`check the install, models, data files and CPU settings
命令智能体获取的内容
`describe FILE`听起来像什么:校准标签 (z) 与最接近的替代读数、AudioSet 标签、测量值
`match FILE QUERY [--alts ...]`描述匹配度如何:词汇表中的余弦相似度、z 值,以及基于保留证据的判断(强匹配 / 合理 / 弱匹配 / 无匹配)
`rank QUERY PATHS...`按描述对多个候选文件排序(选择最佳下载)
`find FILE QUERY`长录音中的最佳片段,以采样修剪形式呈现(起始/结束秒数)
`compare FILE --refs DIR` / `ab A B`最近的参考录音及典型性;A/B 比较两种声音或两个修剪片段,用文字描述差异
`realness FILE...`真实录音 / 专业制作 vs 代码合成,附带证据和逐窗口评分
`timeline FILE [--video V] [--cues C]`聆听转录本:事件(时间、电平、标签)、章节、响度、节拍网格、声音与画面剪辑及提示帧的同步
`sheet FILE -o out.png`带注释的 PNG 图像(视频帧、章节、标注事件、频谱图、波形、响度、同步标记),供能读取图像的代理使用
`critique FILE [--video V]`针对 7 部专业发布影片的档案进行评分卡对比,并附带带时间戳的修复建议
`profile REFS... -o p.json`从你欣赏的影片中构建你自己的参考档案
`measure FILE`仅客观测量(无模型):LUFS、真峰值、LRA、包络、频谱、节奏/调性
`forge RECIPE --refset CAT`用代码生成声音并通过聆听改进(见下文)
`fit FILE -o recipe.py`将录音转换为 forge 配方模块以重新渲染它,包含旋钮控制和形态变化(见下文)
`sfx render ID -o x.wav`来自 shipped 201 个声音库的声音,针对画面定制(`--dur`, `--apex`, `--pitch`)并经审计;`sfx list`, `sfx check`(无模型)
`kit init / render / check`影片的声音套件:每个角色一个库声音,渲染为带有测量的起始/峰值/结束时间的缓存版本(无模型)
`gallery DIR -o page.html`单个静态 HTML 聆听页面,展示 forge 输出:播放器、频谱图、数值
`llm FILE --yes-upload`可选的音频 LLM 批评(Gemini),仅在使用你自己的密钥并明确同意的情况下
`mcp`与 Claude Code 及其他代理使用的 MCP 服务器相同的工具
`doctor [--load]`检查安装、模型、数据文件和 CPU 设置

Every command prints a plain-language summary first; `--json` gives the full result, `--out f.json` saves it. Errors are one line on stderr (`earshot : error: ...`, exit 1). Each CLI call is a new process and loads the models (~20-40 s) before it answers (`measure`, `sfx` and `kit` load none): for more than a few calls use the MCP server (models stay loaded) or one Python script with `from earshot import api`.

每条命令都会先打印一份自然语言摘要;`--json` 会输出完整结果,`--out f.json` 将其保存。错误信息为一行 stderr 输出(格式为 `earshot : error: ...`),退出码为 1。每次 CLI 调用都是一个新进程,在回答之前需要加载模型(约需 20-40 秒)(`measure`、`sfx` 和 `kit` 不加载任何模型):如果需要进行多次调用,请使用 MCP 服务器(模型保持加载状态)或包含 `from earshot import api` 的单个 Python 脚本。

What an agent sees when it listens to that film with `earshot sheet` (frames, labelled sound events, spectrogram, loudness, sync to the beat):

当代理使用 `earshot sheet` 聆听该影片时所见的内容(帧、带标签的声音事件、频谱图、响度、与节拍同步):

Make sounds: earshot forge

生成声音:earshot forge

Listening makes iteration possible. The agent writes a sound as code: a recipe of physical synthesis (modal resonators, contact excitations, filtered noise, a computed room and a microphone; no recorded audio inside). The forge renders candidates from the recipe's parameters, and a critic built from earshot scores each one: description match against named confusions, realness, closeness to real reference recordings and measured shape, then model-free penalties against the references: 1/3-octave tonal balance, the spectro-temporal envelope (a tail that dies too fast shows here), artifacts (clicks, aliasing, DC / infrasound, harsh resonances, comb ring, cut tails, clipping) and polish (attack, onset snap, tail smoothness). A cheap model-free pre-screen ranks many renders with the same measurements, so the models only hear the best; an evolutionary search keeps the best and mutates them. Then the agent reads the critic's words ("sounds like: a cork pop, a glass ting", "decay +2.4 outside the refs", "bumpy tail"), looks at spectrograms next to the references, rewrites the recipe, and runs it again.

聆听使得迭代成为可能。代理将声音编写为代码:一种物理合成的配方(包括模态谐振器、接触激励、滤波噪声、计算出的房间混响以及麦克风;内部不包含录音)。Forge 根据配方的参数渲染候选声音,并由基于 earshot 构建的评论家对每个候选进行评分:描述匹配度(针对命名混淆项)、真实感、与真实参考录音的接近程度以及测量形状,然后是与参考值无关的惩罚项:1/3 倍频程音调平衡、谱包络(衰减过快会在其中显现)、伪影(咔哒声、混叠、直流/次声波、刺耳的共振、梳状滤波效应、截断的尾部、削波)以及打磨程度(起音、起始瞬态、尾部平滑度)。一个廉价的无模型预筛选步骤会使用相同的测量指标对大量渲染结果进行排名,因此模型只需听取最佳结果;进化搜索保留最佳结果并对其进行变异。随后,代理阅读评论家的评语(例如“听起来像:瓶塞弹出声、玻璃叮当声”、“衰减比参考值多 2.4”、“尾部不平滑”),对照参考值的频谱图,重写配方,并再次运行。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

关联讨论

同一事件的更多信源

相似阅读

关联信息,但可能不是同一事件