Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python generate_spectrogram.py --audio-dir /path/to/audio_dir/ --spectrogram-dir /path/to/spectrogram_dir/ | |
import argparse | |
from __future__ import division, print_function | |
from os import listdir | |
from os.path import isfile, join | |
from matplotlib import pyplot as plt | |
import scipy.io.wavfile as wav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydub import AudioSegement | |
def load_audio(audio_path, ext): | |
return AudioSegement.from_file(audio_path, format=ext) | |
def speed_change(audio, speed): | |
audio_with_altered_frame_rate = audio._spawn( | |
audio.raw_data, overrides={ | |
"frame_rate": int(audio.frame_rate * speed) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import librosa | |
import numpy as np | |
import os | |
import scipy | |
import scipy.io.wavfile | |
import sys | |
from glob import glob | |
from tqdm import tqdm |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer