time format correction to date

This commit is contained in:
babakounine 2024-09-06 19:02:09 +02:00
parent 4ae3750184
commit 3c474ea1b0

View File

@ -119,7 +119,7 @@ def chunk(outfolder, length):
samplerate*length+samplerate*length]
time_file = datetime.strptime(time, "%Y%m%d_%H%M%S") + timedelta(seconds = 5 * i)
time_file = str(time_file.time().__format__("%Y%m%d_%H%M%S"))
time_file = str(time_file.__format__("%Y%m%d_%H%M%S"))
filename = infile.replace(f'{time}.wav', f'{time_file}_000.wav')
try:
sf.write(filename, temp, samplerate)