[Python] Can't hear Librosa chirp

Discussão em 'Python' iniciado por Stack, Março 31, 2025.

  1. Stack

    Stack Membro Participativo

    I am using python under VS. When running the following code

    import librosa
    from IPython.display import Audio
    sr = 22050

    y_sweep = librosa.chirp(fmin=librosa.note_to_hz('C3'),
    fmax=librosa.note_to_hz('C5'),
    sr=sr,
    duration=5)

    Audio(data=y_sweep, rate=sr)`


    I CAN NOT hear any sound. The windows speakers are OK Volume is set loud. and the default player is Windows media player (works OK). I don't get any error message. On another similar code when using the

    img = librosa.display.specshow


    (.... it works OK, but again with no actual sound.)

    I was expecting to hear. The code is taken from https://librosa.org/doc/main/auto_e...sphx-glr-auto-examples-plot-audio-playback-py. When using the play button on the above site, sound is correctly heard.

    Continue reading...

Compartilhe esta Página