arXiv:2507.15007cs.PLcs.CL2025-07被引 1

让Python错误发声,听觉提示加速找错

Hear Your Code Fail, Voice-Assisted Debugging for Python

  • 用语音播报错误类型和后果,配合可视化堆栈跟踪
  • 错误识别速度提升78%,认知负荷降低37%
  • 适合视障开发者、新手程序员及多任务开发场景

本研究提出一种面向Python的语音辅助调试插件,将无声的运行时错误转化为可操作的听觉诊断信息。通过全局异常钩子架构结合pyttsx3文本转语音与Tkinter图形界面,实现音视频双通道反馈。实证评估显示,相比传统堆栈追踪,认知负荷降低37%(p<0.01,n=50),错误识别速度提升78%。系统在异常处理中实现低于1.2秒的语音延迟,CPU开销低于18%,可实时播报错误类型与影响,并展示带文档跳转链接的交互式堆栈追踪。验证支持Python 3.7+在Windows、macOS和Linux平台的兼容性。仅需两行代码即可集成,显著提升视障设计师的可用性,支持无手操作调试。教学应用效果显著,试点表明新手编程者调试技能掌握速度提升45%。未来将引入GPT修复建议与实时多语言翻译,推动听觉调试范式发展。该方案标志着向以人为中心的错误诊断的根本转变,弥合编程可访问性鸿沟,建立软件开发认知效率新标准。

原文摘要 · Abstract (English)

This research introduces an innovative voice-assisted debugging plugin for Python that transforms silent runtime errors into actionable audible diagnostics. By implementing a global exception hook architecture with pyttsx3 text-to-speech conversion and Tkinter-based GUI visualization, the solution delivers multimodal error feedback through parallel auditory and visual channels. Empirical evaluation demonstrates 37% reduced cognitive load (p<0.01, n=50) compared to traditional stack-trace debugging, while enabling 78% faster error identification through vocalized exception classification and contextualization. The system achieves sub-1.2 second voice latency with under 18% CPU overhead during exception handling, vocalizing error types and consequences while displaying interactive tracebacks with documentation deep links. Criteria validate compatibility across Python 3.7+ environments on Windows, macOS, and Linux platforms. Needing only two lines of integration code, the plugin significantly boosts availability for aesthetically impaired designers and supports multitasking workflows through hands-free error medical diagnosis. Educational applications show particular promise, with pilot studies indicating 45% faster debugging skill acquisition among novice programmers. Future development will incorporate GPT-based repair suggestions and real-time multilingual translation to further advance auditory debugging paradigms. The solution represents a fundamental shift toward human-centric error diagnostics, bridging critical gaps in programming accessibility while establishing new standards for cognitive efficiency in software development workflows.

语音调试Python无障碍编程人机交互

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。