语音识别与GPT纠错:技术实践与效果对比

本文探讨了iOS 17语音识别技术的改进,并通过GPT-3.5-turbo对识别结果进行纠错的技术实践。文章详细介绍了处理流程、提示词优化及成本考量,展示了AI在提升语音识别准确性方面的潜力。

ImperialViolet - 语音识别

更新:Evan告诉我Whisper已经解决了语音识别问题。他有一个封装程序,可以从麦克风录制并打印转录结果在此处。Whisper非常令人印象深刻,唯一的注意事项是它有时会在末尾插入整句伪造的内容。这些词语在上下文中总是有点合理,但没有任何声音可能导致这种情况。根据我的经验,它总是在最末尾,删除它没有问题。因此,注意到这一点后,你应该忽略下面的一切,因为Whisper是更好的答案。

上周的博客文章相当长,并且有比平常更多的拼写错误。(感谢指出错误的人。我认为我已经修复了所有被报告的错误。)
这是因为我在评测中看到iOS 17的语音识别应该有很大改进,我想尝试一下。我一直觉得iOS的识别优于Google Docs,并且我有一台旧的iPad Pro,适合测试版。
iOS的性能仍然很好,是的,我认为它比iOS 16更好。但它仍然远未达到“魔法”的水平,尤其是在使用技术术语时。以下是直接取自上周文章原始输出的一段(我用斜体标出了错误):

It is integrated into the W3C credential management specification and so it is called via navigator . credentials . create and navigator .credentials. get. This document is about understanding the deeper structures that underpin web orphan rather than being a guy as to its details. So we will leave a great many details to the numerous guides to Web Oran that already exist on the web and instead focus on how structures from UF were carried over into Web orphan and updated.

尽管很多词语都在那里很好,但错误密度如此之高,进行所有修正意味着它并不明显优于打字。然而,如今全世界都对LLMs(大型语言模型)兴奋不已。它们能帮忙吗?
我写了一个脚本来分块文本段落,使块至少为500字节,然后将它们发送到gpt-3.5-turbo,并前缀以下指令,温度为0.6:

The following is the output of a poor speech recognition system. Please correct its errors and reply with the corrected version without any preamble. Some of the uncommon words that the system can’t recognise are U2F, CTAP, FIDO, CTAP2, JSON, FIDO2, WebAuthn, bearer token, hash, phishing, RP ID, passkey, caBLE, and password manager.

以下是该段落的清理版本:

It is integrated into the W3C credential management specification and so it is called via navigator.credentials.create and navigator.credentials.get. This document is about understanding the deeper structures that underpin web authentication rather than being a guide as to its details. So we will leave a great many details to the numerous guides to WebAuthn that already exist on the web and instead focus on how structures from U2F were carried over into WebAuthn and updated.

有一个情况是它写了“web authentication”而不是“WebAuthn”,但它修复了所有其他问题!
这就是我尝试的方法:我对iOS口述长段落,然后运行脚本用GPT清理,然后在Obsidian中手动编辑。从Obsidian,pandoc转换为HTML和EPUB格式。
该提示是一些实验的结果。最初,我要求GPT修复“错误和语法”,但在阅读结果时,一些句子不正确,我发现它“修复”成了无意义的内容。因此,我删除了“和语法”。你可以要求它以Markdown格式输出,我可能应该这样做,但当我想到时,我已经深入手动编辑了。
一个奇怪之处是,我用“recognise”(英式拼写)写了指令,但后来认为用更常见的美式拼写(“recognize”)可能更好。但这似乎让它更糟!
一个明显的尝试是使用GPT 4。然而,我误读了OpenAI API的成本,认为他们的收费是按令牌,而不是每1000个令牌。因此,估计偏差了三个数量级,GPT 4对于一个随机实验来说似乎有点太贵,我使用GPT 3.5处理所有内容。
我没有用同样的方式写这篇文章,但这个实验效果足够好,我将来可能会尝试用于更长的公开写作。

comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计