Giter Site home page Giter Site logo

Comments (2)

YTR76 avatar YTR76 commented on June 18, 2024

your wavs aren't mono

from fakeyou-tacotron2-notebook.

elmehdihammouch avatar elmehdihammouch commented on June 18, 2024

To address this issue in my situation, I resolved it by modifying the code within the 'create_mels' function to the following:
import librosa
import glob

def create_mels():
print("Generating Mels")

def save_mel_librosa(filename):
    # Load audio file
    audio, sampling_rate = librosa.load(filename, sr=None)

    # Compute mel spectrogram
    melspec = librosa.feature.melspectrogram(y=audio, sr=sampling_rate, n_mels=128)

    # Convert to decibels (log scale)
    melspec_db = librosa.power_to_db(melspec, ref=np.max)

    # Save mel spectrogram as NumPy file
    output_filename = filename.replace('.wav', '')
    np.save(output_filename, melspec_db)

wavs = glob.glob('wavs/*.wav')
for i in tqdm(wavs):
    save_mel_librosa(i)

I hope that be helpful for you.

from fakeyou-tacotron2-notebook.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.