Skip to content

fix: missing f-string prefix and temp file cleanup in voice.py#4901

Open
gambletan wants to merge 1 commit intoAider-AI:mainfrom
gambletan:fix/voice-fstring-and-tempfile-cleanup
Open

fix: missing f-string prefix and temp file cleanup in voice.py#4901
gambletan wants to merge 1 commit intoAider-AI:mainfrom
gambletan:fix/voice-fstring-and-tempfile-cleanup

Conversation

@gambletan
Copy link
Copy Markdown

Summary

  • Fix missing f prefix on warning string (line 149) — currently prints literal {temp_wav} instead of the variable value
  • Replace deprecated tempfile.mktemp() with tempfile.mkstemp() to fix TOCTOU race condition
  • Add proper temp file cleanup to prevent file leaks on both success and error paths

Test plan

  • Verify f-string now interpolates correctly
  • Verify temp files are cleaned up after transcription
  • Verify behavior unchanged for both wav and mp3 paths

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants