dslee2601 commited on
Commit
49a6a3d
·
1 Parent(s): 5da3ad4

bug fig on last step processing

Browse files
Files changed (1) hide show
  1. model.py +4 -0
model.py CHANGED
@@ -177,6 +177,10 @@ class DAC(PreTrainedModel):
177
  chunk = zq[:,:, start:end] # (b, d, chunk_size)
178
  waveform = self.dac.decode(chunk.to(self.device)) # (b, 1, chunk_size*self.downsampling_rate)
179
  waveform = waveform.cpu()
 
 
 
 
180
 
181
  if isinstance(waveform_concat, type(None)):
182
  waveform_concat = waveform.clone()
 
177
  chunk = zq[:,:, start:end] # (b, d, chunk_size)
178
  waveform = self.dac.decode(chunk.to(self.device)) # (b, 1, chunk_size*self.downsampling_rate)
179
  waveform = waveform.cpu()
180
+
181
+ waveform_len = waveform.shape[-1]
182
+ if waveform_len < overlap_size_in_data_space:
183
+ overlap_size_in_data_space = waveform_len
184
 
185
  if isinstance(waveform_concat, type(None)):
186
  waveform_concat = waveform.clone()