Skip to content

AttributeError: module 'librosa' has no attribute 'output' #36

@stephane-archer

Description

@stephane-archer
Traceback (most recent call last):
  File "main.py", line 105, in <module>
    audio_output_prediction, sample_rate, min_duration, frame_length, hop_length_frame, n_fft, hop_length_fft)
  File "C:\Users\steph\Programs\Speech-enhancement\prediction_denoise.py", line 55, in prediction
    librosa.output.write_wav(dir_save_prediction + audio_output_prediction, denoise_long[0, :], sample_rate)
AttributeError: module 'librosa' has no attribute 'output'

replace the following line in your code:

librosa.output.write_wav(dir_save_prediction + audio_output_prediction, denoise_long[0, :], sample_rate)

with this:

import soundfile as sf
sf.write(dir_save_prediction + audio_output_prediction, denoise_long[0, :], sample_rate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions