JeremyCCHsu/Python-Wrapper-for-World-Vocoder

malloc error

williamFalcon opened this issue · 4 comments

python3.6(25625,0x7fff8b877380) malloc: *** error for object 0x7fa1eea2bc00: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

Not sure what's happening, but I'm getting a crash here (randomly and after a few tries succeed...)

        prev_audio_seq = 2 * quantization.linear_dequantize(prev_audio_seq, self.q_levels)
        prev_audio_seq = prev_audio_seq.cpu().double().numpy()
        voc_feats = []

        for batch_i in range(nb_seqs):
            audio_seq = prev_audio_seq[batch_i]
            dec_input = np.copy(audio_seq)

            # CRASH HERE....
            f0_contour, spectral_envelope, aperiodicity = pw.wav2world(dec_input, 16000, frame_period=1)

Hmm... I'm not sure what part went wrong. According to the message, you could've messed up prev_audio_seq. Make sure that you didn't modify prev_audio_seq and that nb_seq is the length of it. You may also want to try normalizing your signal dec_input to the range [-1, 1].

Yeah, could be. But double checked a lot on the prev_audio_seq (i even did a full copy of it and still found the bug).

I managed to make it crash left often by doing this instead:

    def __wav2world(self, x, sample_rate, frame_period):
        f0_contour, timeaxis = pw.harvest(x, sample_rate, frame_period=frame_period)
        spectral_envelope = pw.cheaptrick(x, f0_contour, timeaxis, sample_rate)
        aperiodicity = pw.d4c(x, f0_contour, timeaxis, sample_rate)

May you provide some audio files (along with a minimalist code snippet) that cause the program to crash?

You might also want to report this issue to WORLD repo. The author know much more than I do.

closed due to inactivity.