You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sure it works for me, so i guess you are facing a diferent use case with
different data layout. Which one?
2017-09-18 3:32 GMT+02:00 kujikuji <notifications@github.com>:
def saveWave(filename, data, samplerate, verbose=False) :
if verbose: print("Saving wave file:",filename)
blockSize = 512
channels, frames = data.shape # data.shape -> (channels, frames)
fullblocks = frames // blockSize
lastBlockSize = frames % blockSize
with WaveWriter(filename, channels=channels, samplerate=samplerate) as w :
for i in range(fullblocks) :
w.write(data[blockSize*i:blockSize*(i+1)]) # blockSize for 'frames' dimension, not for 'channels' dimension..
if lastBlockSize :
w.write(data[fullblocks*blockSize:])
in line w.write(data[blockSize*i:blockSize*(i+1)])
it may be w.write(data[:, blockSize*i : blockSize*(i+1)])
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#20>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAge0pQAdebe0wgfdGpBAUE--9eUtSSpks5sjchLgaJpZM4PaWss>
.
in line
w.write(data[blockSize*i:blockSize*(i+1)])
it may be
w.write(data[:, blockSize*i : blockSize*(i+1)])
The text was updated successfully, but these errors were encountered: