Commit b7670439 authored by Jared Lincenberg's avatar Jared Lincenberg

Convert files to waveish

parent 8407297f
import time
import matplotlib.pyplot as plt
import numpy as np
import as wavfile
import sounddevice
import time
import librosa
def getWave(fileName=None,b=None,sample_rate=44100):
if b is not None:
fileName=input("File Name: ")
start=input("Start time: ")
end=input("End time: ")
sample_rate=input("Sample rate: ")
samples, sample_rate =librosa.load(fileName,offset=float(start),duration=float(end)-float(start), sr=int(sample_rate))
elif fileName is not None:
samples, sample_rate =librosa.load(fileName,sr=int(sample_rate))
fileName=input("File Name: ")
samples, sample_rate =librosa.load(fileName, sr=int(sample_rate)),sr),sr)
return samples, sample_rate
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment