Skip to content

Conversation

@Maheidem
Copy link

@Maheidem Maheidem commented Jan 7, 2026

Summary

  • Fix WinError 32 on Windows when uploading audio for STT
  • Temp files must be closed before reopening due to Windows file locking

Problem

On Windows, tempfile.NamedTemporaryFile keeps the file handle open. When trying to reopen the file with open(tmp_file.name, 'rb'), Windows throws:

[WinError 32] The process cannot access the file because it is being used by another process

Solution

Close the temp file handle before reopening it for the STT upload.

Test plan

  • Tested on Windows 11 with Python 3.13
  • Voice mode converse works end-to-end

Closes #135

🤖 Generated with Claude Code

On Windows, temp files cannot be reopened while still held open by
the original handle due to file locking. This fixes WinError 32:
"The process cannot access the file because it is being used by
another process"

Closes mbailey#135

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@mbailey
Copy link
Owner

mbailey commented Jan 9, 2026

Thanks @Maheidem , will review soon.

@mbailey mbailey merged commit da74bbe into mbailey:master Jan 14, 2026
6 checks passed
@mbailey
Copy link
Owner

mbailey commented Jan 14, 2026

Many thanks @Maheidem

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.

[BUG] WinError 32 on Windows - temp file not closed before STT`

2 participants