diff --git a/openFile.py b/openFile.py new file mode 100644 index 0000000..36d4cb2 --- /dev/null +++ b/openFile.py @@ -0,0 +1,14 @@ +from scipy.io import wavfile +import scipy.io + +# file name would need to be read and saved to this variable +wav_fname = "" + +# opens the .wav file +samplerate, data = wavfile.read(wav_fname) + +print(f"number of channels = {data.shape[len(data.shape) - 1]}") +print(f"sample rate = {samplerate}Hz") + +length = data.shape[0] / samplerate +print(f"length = {length}s") \ No newline at end of file