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
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?