Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Decoder creates temporal files and doesn't delete them #30

Open
groadabike opened this issue Jan 8, 2025 · 0 comments
Open

File Decoder creates temporal files and doesn't delete them #30

groadabike opened this issue Jan 8, 2025 · 0 comments

Comments

@groadabike
Copy link

When you decode a FLAC file into WAV, the method FlacDecoder.process() creates a temporal wav file.
Then, it uses soundfile to read the decoded file and return it.
However, it never deletes the temporal file, which is problematic when you need to process several files at the same time.
Is it possible to avoid the use of the temporal file? Or, perhaps would be better if we delete the temp file before the return?

signal, sample_rate = sf.read(
    str(self.__output_file), always_2d=False
)
self.__output_file.unlink()
return signal, sample_rate
@groadabike groadabike changed the title File Decoder creates temporal file and doesn't delete it File Decoder creates temporal files and doesn't delete them Jan 9, 2025
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

No branches or pull requests

1 participant