@@ -1513,10 +1513,14 @@ def compute_wrapper(
15131513 )
15141514
15151515 if 'waveplot' in segments :
1516- cv2 .imwrite (join (debug_path , 'spectrogram.compressed.waveplot.png' ), segments ['waveplot' ])
1516+ cv2 .imwrite (
1517+ join (debug_path , 'spectrogram.compressed.waveplot.png' ), segments ['waveplot' ]
1518+ )
15171519
15181520 if 'stft_db' in segments and 'waveplot' in segments :
1519- temp_top = np .stack ((segments ['stft_db' ], segments ['stft_db' ], segments ['stft_db' ]), axis = 2 )
1521+ temp_top = np .stack (
1522+ (segments ['stft_db' ], segments ['stft_db' ], segments ['stft_db' ]), axis = 2
1523+ )
15201524 temp_bot = cv2 .resize (
15211525 segments ['waveplot' ], temp_top .shape [:2 ][::- 1 ], interpolation = cv2 .INTER_LINEAR
15221526 )
@@ -1611,10 +1615,12 @@ def compute_wrapper(
16111615 'segments' : metas ,
16121616 }
16131617 if 'stft_db' in segments :
1614- metadata ['size' ]['compressed' ] = {
1615- 'width.px' : segments ['stft_db' ].shape [1 ],
1616- 'height.px' : segments ['stft_db' ].shape [0 ],
1617- },
1618+ metadata ['size' ]['compressed' ] = (
1619+ {
1620+ 'width.px' : segments ['stft_db' ].shape [1 ],
1621+ 'height.px' : segments ['stft_db' ].shape [0 ],
1622+ },
1623+ )
16181624
16191625 metadata_path = join (output_folder , f'{ base } .metadata.json' )
16201626 with open (metadata_path , 'w' ) as metafile :
0 commit comments