|
@@ -0,0 +1,10 @@
|
|
|
+import scipy.io.wavfile
|
|
|
+
|
|
|
+
|
|
|
+def wavfile_read_mono(path):
|
|
|
+
|
|
|
+ rate, data = scipy.io.wavfile.read(path)
|
|
|
+ data_first_channel = data[:, 0]
|
|
|
+ for channel_index in range(1, data.shape[1]):
|
|
|
+ assert (data_first_channel == data[:, channel_index]).all()
|
|
|
+ return rate, data_first_channel
|