[Python] Generating Silence with pyDub

Discussão em 'Python' iniciado por Stack, Abril 6, 2025.

  1. Stack

    Stack Membro Participativo

    I've found pyDub, and it seems like just what I need:

    http://pydub.com/

    The only issue is with generating silence. Can pyDub do this?

    Essentially the workflow I want is:

    1. Take all the WAV files in a directory
    2. Piece them together in filename order with 1 sec of silence in between
    3. Generate a single MP3 of the result

    Is this possible? I realize I could create a WAV of silence and do it that way (spacer GIF flashback, anyone?), but I'd prefer to generate the silence programmatically, because I may want to experiment with the duration of silence and/or the bitrate of the MP3.

    I greatly appreciate any responses.

    Continue reading...

Compartilhe esta Página