Skip to content

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

@groadabike

Description

@groadabike

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions