Page 1 of 1

playing a wav file that is current being recorded via python

Posted: 15 Nov 2024 09:50
by f7f5
Hello,

I am writing a python programme which will record audio into a .wav file.

I need to play the .wav file with VLC while it is still being recorded.

Have you any suggestions what python functions I should use to write to the file so that VLC sees that the file has been updated and load the new audio into the playout stream?

Thanks,
Jim

Re: playing a wav file that is current being recorded via python

Posted: 15 Nov 2024 12:02
by Lotesdelere
On Windows I'm quite sure you can't read a file which is actually open for writing.
Not to mention in the case of a WAV file the header is written down at the end, when the file is completed, so no header no playback.