def METHOD_NAME(self, model, args, inputs, nsamples):
    decode_do_segment = False
    with torch.no_grad():       
        out = []
        window = args.sample_rate * args.decode_window  # decoding window length
        stride = int(window*0.75)  # decoding stride if segmentation is used
        b, t = inputs.shape
        if t > window * args.one_time_decode_length:
            decode_do_segment = True  # set segment decoding to true for very long sequence
        if t < window:
            inputs = np.concatenate([inputs, np.zeros((inputs.shape[0], window-t))], 1)
        elif t < window + stride:
            padding = window + stride - t
            inputs = np.concatenate([inputs, np.zeros((inputs.shape[0], padding))], 1)
        else:
            if (t - window) % stride != 0:
                padding = t - (t-window)//stride * stride
                inputs = np.concatenate([inputs, np.zeros((inputs.shape[0], padding))], 1)
        inputs = torch.from_numpy(np.float32(inputs))
        inputs = to_device(inputs, device=self.device)
        b, t = inputs.shape
        if decode_do_segment:
            outputs = np.zeros((args.num_spks, t))
            give_up_length = (window - stride)//2
            current_idx = 0
            while current_idx + window <= t:
                tmp_input = inputs[:, current_idx:current_idx+window]
                tmp_out_list = model(tmp_input,)
                for spk in range(args.num_spks):
                    tmp_out_list[spk] = tmp_out_list[spk][0, :].cpu().numpy()
                    if current_idx == 0:
                        outputs[spk, current_idx:current_idx+window-give_up_length] = \
                            tmp_out_list[spk][:-give_up_length]
                    else:
                        outputs[spk, current_idx+give_up_length:current_idx+window-give_up_length] = \
                            tmp_out_list[spk][give_up_length:-give_up_length]
                current_idx += stride
            for spk in range(args.num_spks):
                out.append(outputs[spk, :])
        else:
            out_list = model(inputs)
            for spk in range(args.num_spks):
                out.append(out_list[spk][0, :].cpu().numpy())
        max_abs = 0
        for spk in range(args.num_spks):
            if max_abs < max(abs(out[spk])):
                max_abs = max(abs(out[spk]))
        for spk in range(args.num_spks):
            out[spk] = out[spk][:nsamples]
            out[spk] = out[spk]/max_abs
    return out