[Python] Python saving audio streamed to node input as speedup and pitchshifted .wav

Discussão em 'Python' iniciado por Stack, Fevereiro 21, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to create a ComfyUI node that would take image sequence and audio from respective node inputs ("IMAGE", "AUDIO") and saving it to an uncopmpressed AVI, but for some reason it is speeding up and pitchshifting the audio.

    This is the relevant code that I use for saving temporary wav file:

    a_waveform = audio['waveform']
    temp_audio_path = self.get_unique_filename(output_dir, filename_prefix, "wav")
    waveform_data = a_waveform.cpu().numpy()
    sample_rate = audio['sample_rate']
    write(temp_audio_path, sample_rate, waveform_data)

    Continue reading...

Compartilhe esta Página