Simon Willison用语音构建博客功能:GPT-6
A new feature for my blog, built using my voice
这是一篇极具参考价值的一手工程实践复盘,详细记录了如何利用语音交互驱动AI Agent完成全栈开发任务,其中的取舍权衡对探索新型人机协作工作流的开发者很有启发。
I shipped a new feature for my blog today: the Newsletters page, which offers an index of all of the newsletters I've sent out, both my free weekly Substack and my monthly sponsors-only updates. I built the feature almost entirely using my voice, chatting away to my laptop while I cooked dinner.
我今天为我的博客发布了一个新功能:Newsletter 页面,该页面提供了我发送的所有通讯的索引,包括我的免费每周 Substack 和仅面向赞助者的每月更新。我几乎完全通过语音构建了这一功能,在烹饪晚餐时与笔记本电脑聊天。
Codex voice mode
Codex 语音模式
I used the ChatGPT desktop app for this, in the Codex tab, using the voice conversation mode, running against a local development environment. Here's what that looks like:
为此我使用了 ChatGPT 桌面应用中的 Codex 标签页,采用语音对话模式,并连接到本地开发环境。以下是具体操作界面:
I started the session against my local simonwillisonblog checkout by typing:
我通过对本地 simonwillisonblog 代码库执行 checkout 操作来启动会话,输入了以下内容:
Start dev server and open in browser
启动开发服务器并在浏览器中打开
This gave me a preview of the site that it would be working on, and meant that I could later ask it to show me the new pages so I could visually track its progress.
这为我预览了网站即将工作的效果,并且意味着我可以稍后要求它向我展示新页面,以便直观地跟踪其进度。
Then I clicked the "Start new voice chat" button - that's not the microphone button, it's the one to the right of it - and set my laptop up in the kitchen so I could talk to it while I cooked.
然后我点击了“开始新的语音聊天”按钮——这不是麦克风按钮,而是它右侧的那个按钮——并将笔记本电脑放在厨房里,以便我在做饭时能与它交谈。
Talking to my computer
与计算机对话
I had a pretty good idea of what I wanted to build, and it's a simple enough Django feature that I was certain the model (in this case GPT-6 Astra High) would be able to do it. A new model, a migration, some view code, templates, and a couple of import functions to populate the database from external sources.
我对想要构建的内容有了相当清晰的想法,而且这是一个足够简单的 Django 功能,我确信模型(在本例中是 GPT-6 Astra High)能够完成它。需要创建一个新的模型、一次迁移、一些视图代码、模板,以及几个从外部源填充数据库的导入函数。
Here's an extract of my voice transcript that was captured by Codex:
以下是 Codex 捕获的我的一段语音转录内容:
Um, they do not. Um, this is going to be a new type of content. Um, it's not going to show up... Oh, hold on. Yeah, no- I do not want this to show up in my, um, tag pages and date archive pages and... Actually, no, I think... I don't want it on the tag pages. I don't want it on the, um, blog index page. But I think I do want it to show up on the date-based pages. You know, if you navigate to September the 19th, and I sent a newsletter on that page, I think I want that to show up. So... this is- so I think we probably need a new model. The other thing is that I want them searchable, uh the Substack ones are not searchable, because those are actually just copies of other s- on content on my blog. These monthly ones do contain unique content, and spe- and once they're... published, like once they're made public a month after they've gone out, I want them to show up on my search results.
嗯,它们不会显示。嗯,这将是一种新的内容类型。嗯,它不会出现在……哦,等一下。是的,不——我不希望它出现在我的标签页面和日期归档页面中……实际上,不,我想……我不希望它出现在标签页面中。我也不希望它出现在博客索引页面中。但我认为我希望它出现在基于日期的页面中。你知道,如果你导航到 9 月 19 日,而我在当天发送了一份通讯,我认为我希望它显示出来。所以……这个——所以我想我们可能需要一个新的模型。另一件事是我希望它们可搜索,Substack 的那些不可搜索,因为它们实际上只是我博客上其他内容的副本。这些月度通讯包含独特内容,并且一旦它们……发布,比如发出一个月后公开时,我希望它们出现在我的搜索结果中。
Apparently this was clear enough that the model knew what I wanted to build! You can read the full transcript, disfluencies and all, in this Gist.
显然这已经足够清晰,以至于模型知道了我想要构建什么!你可以在这个 Gist 中阅读完整的转录文本,包括所有口误。
We went on like this for about half an hour (the time it took to cook dinner). The model would reply and occasionally ask clarifying questions, then get to work modifying the code.
我们就这样持续了大约半小时(也就是做晚饭所需的时间)。模型会回复,偶尔提出澄清性问题,然后开始修改代码。
What we built
我们构建的内容
We got a surprisingly long way entirely by voice:
仅通过语音,我们就取得了令人惊讶的进展:
- A new model and migration to represent imported newsletters in Django, plus Django Admin configuration for that
- Four working imports:
- The most recent Substack items via RSS
- Every other Substack item via their undocumented API, which GPT-6 Astra either knew about or found via search
- All of my published monthly newsletters from my simonw/monthly-newsletter-archive GitHub repository
- My most recent private sponsors-only newsletter from a private repository
- The /newsletters/ and /newsletters/2026/ public archive pages
- Newsletters showing up on day and month archive pages too, but not on tag pages or my homepage
- Weekly Substack newsletters link to Substack; archived monthly newsletters have their own pages
- Integration with my site search engine
- 一个新的模型和迁移,用于在 Django 中表示导入的新闻通讯,以及针对该模型的 Django Admin 配置
- 四个可用的导入功能:
- 通过 RSS 获取最新的 Substack 内容
- 通过其未记录的 API 获取其他所有 Substack 内容,GPT-6 Astra 要么知道这个 API,要么是通过搜索找到的
- 我在 simonw/monthly-newsletter-archive GitHub 仓库中发布的所有月度新闻通讯
- 来自私有仓库的我最近一份仅限私人赞助者的新闻通讯
- /newsletters/ 和 /newsletters/2026/ 公共存档页面
- 新闻通讯也出现在按日和按月归档的页面上,但未出现在标签页面或我的主页上
- 每周的 Substack 新闻通讯链接到 Substack;存档的月度新闻通讯拥有自己的页面
- 与我的站点搜索引擎集成
It was almost ready to ship. The catch was the imports: Astra offered to export data from my local copy so I could import that into production, but I wanted it to work like my other import scripts. Since some of the data lived in a private GitHub repository, this would involve creating a new API key, and for that I knew I'd have to sit at the keyboard for a while.
它几乎已经准备好发布了。问题在于导入功能:Astra 提议从我的本地副本导出数据,以便我将其导入生产环境,但我希望它能像我的其他导入脚本一样工作。由于部分数据存储在私有 GitHub 仓库中,这需要创建一个新的 API 密钥,而我知道为此我必须坐在键盘前操作一段时间。
Finishing it with a review
通过审查完成最后步骤
Once I had finished cooking and judged it mostly feature-complete, I had Codex create a branch and open a pull request.
一旦我做完饭并判断功能基本齐全,我便让 Codex 创建一个分支并打开一个拉取请求(Pull Request)。
I reviewed the code in the GitHub PR interface. It was nearly what I needed, except it had chosen to use Git in a subprocess for one of the import scripts. I needed one of the imports to pull from a private Git repository, so I figured the API would be a better bet. I switched to typing and had Codex swap that out for an API-based import instead.
我在 GitHub PR 界面中审查了代码。它几乎符合我的需求,只是它选择在一个导入脚本中使用子进程调用 Git。我需要其中一个导入功能从私有 Git 仓库拉取数据,因此我认为使用 API 会是更好的选择。我切换回打字模式,让 Codex 将其替换为基于 API 的导入方式。
You can see the changes I made during the review in the extra commits on the PR. I fixed the import mechanism and made a few tweaks to the display of those public pages. It took an additional half hour of typing-based prompting to get to the point where I was happy to deploy it to production by landing the PR.
你可以在 PR 中的额外提交里看到我审查期间所做的更改。我修复了导入机制,并对这些公共页面的显示进行了一些调整。又花了半小时基于打字的提示,才达到让我满意并将 PR 合并部署到生产环境的程度。
The end result
最终结果
You can see the end result at the new newsletters index page, or view the page for a previous monthly newsletter.
你可以在新的新闻通讯索引页面查看最终结果,或者查看之前某个月度新闻通讯的页面。
The index page shows my most recent Substack weekly newsletters and GitHub sponsors monthly newsletters mixed together in reverse chronological order. Further down the page are links to my by-year archive pages.
索引页面以时间倒序混合展示了我最近的 Substack 周更新闻通讯和 GitHub Sponsors 月更新闻通讯。页面下方是按年份归档的链接。
GPT-6 Astra designed the page, and then tweaked that design based on my vocal feedback from glancing at the local preview across the kitchen.
GPT-6 Astra 设计了页面,然后根据我在厨房各处瞥见本地预览时的语音反馈,对该设计进行了调整。
Better for multi-tasking than as a daily driver
作为多任务处理工具比作为日常主力工具更好
OpenAI love using voice-driven demos like this one for things like DevDay - and they do work well in that environment. I don't think this is going to be a daily driver for me though.
OpenAI 喜欢使用这种语音驱动的演示(例如在 DevDay 上),而且在这种环境下效果确实不错。不过我认为这不会成为我的日常主力工具。
I've written before about how much "work" I get done using ChatGPT voice mode on my phone while walking the dog - mostly research and brainstorming, but occasionally actual development work by having ChatGPT write and test out snippets of code.
我之前曾写过,我在使用手机上的 ChatGPT 语音模式遛狗时完成了多少“工作”——主要是研究和头脑风暴,偶尔也让 ChatGPT 编写和测试代码片段来进行实际的开发工作。
This feels different. The addition of the visual preview, plus being able to type or paste things in via the keyboard when I need to communicate something that doesn't work vocally, makes this a much more powerful way of interacting with a coding agent.
感觉有所不同。增加了视觉预览功能,并且当我需要传达语音无法表达的内容时,可以通过键盘输入或粘贴文本,这使得与编码代理交互的方式强大得多。
I still switch back to typing once I get down to the details of things though. Being able to paste in examples and error messages, or directly highlight the code or feature that needs changing, remains more efficient than trying to describe it in words.
不过,一旦我开始深入细节,我还是会切回打字模式。能够粘贴示例和错误信息,或者直接高亮显示需要更改的代码或功能,仍然比试图用语言描述要高效得多。
I mainly work from home, which is good because there's no way I'd want to talk to my computer like this in a shared workspace!
我主要在家办公,这很好,因为如果是在共享工作空间里,我绝对不想像这样对着电脑说话!
The killer feature for me is the ability to multi-task. I usually cook with a podcast or TikTok running; now I can actually build stuff instead.
对我来说杀手级功能是能够进行多任务处理。我通常一边听播客或刷 TikTok 一边做饭;现在我可以真正动手构建东西了。
Tags: text-to-speech, ai, openai, generative-ai, llms, newsletter, coding-agents, codex, speech-to-text, site-upgrades
标签:text-to-speech, ai, openai, generative-ai, llms, newsletter, coding-agents, codex, speech-to-text, site-upgrades
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力