Skip to content

Commit

Permalink
删除临时文件
Browse files Browse the repository at this point in the history
  • Loading branch information
lemisky committed Jan 8, 2025
1 parent 17d5d00 commit b649256
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pilk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import tempfile
import wave

Expand Down Expand Up @@ -48,3 +49,7 @@ def silk_to_wav(silk: str, wav: str, rate: int = 24000):
# noinspection PyTypeChecker
f.setparams((1, 2, rate, 0, 'NONE', 'NONE'))
f.writeframes(pcm.read())
try:
os.remove(pcm_path)
except: # noqa
pass

0 comments on commit b649256

Please sign in to comment.