(spec,
                    n_fft=512,
                    hop_length=None,
                    mask=True,
                    log_mag=True,
                    re_im=False,
                    dphase=True,
                    mag_only=False,
                    num_iters=1000)
return np.array(res)
Computes inverse specgram in a batch.
Computes inverse specgram in a batch.
Computes inverse specgram in a batch .
def batch_ispecgram(spec,
                    n_fft=512,
                    hop_length=None,
                    mask=True,
                    log_mag=True,
                    re_im=False,
                    dphase=True,
                    mag_only=False,
                    num_iters=1000):
  """Computes inverse specgram in a batch."""
  assert len(spec.shape) == 4
  batch_size = spec.shape[0]
  res = []
  for b in range(batch_size):
    res.append(
        ispecgram(spec[b, :, :, :], n_fft, hop_length, mask, log_mag, re_im,
                  dphase, mag_only, num_iters))
  return np.array(res)
def batch_ispecgram ( spec , n_fft = 512 , hop_length = None , mask = True , log_mag = True , re_im = False , dphase = True , mag_only = False , num_iters = 1000 ) : assert len ( spec . shape ) == 4 batch_size = spec . shape [ 0 ] res = [ ] for b in range ( batch_size ) : res . append ( ispecgram ( spec [ b , : , : , : ] , n_fft , hop_length , mask , log_mag , re_im , dphase , mag_only , num_iters ) ) return np . array ( res )