@@ -0,0 +1,1591 @@
+import os%0Aimport re%0Aimport wave, struct%0Aimport librosa%0Aimport numpy as np%0A%0Acorpus = os.path.expanduser('/media/share/datasets/aligner_benchmarks/2_French_2000files')%0A%0Aconfreeufr = %5B%5D%0Aconfrefr = %5B%5D%0Afiller = %5B%5D%0Asenf = %5B%5D%0Awillf = %5B%5D%0Awillf2 = %5B%5D%0Aunused = %5B%5D%0Afor root, dirs, files in os.walk(corpus):%0A%09for f in files:%0A%09%09if os.path.exists('quebecfrench/' + f):%0A%09%09%09if re.search('confreeufr', f):%0A%09%09%09%09confreeufr.append(f)%0A%09%09%09if re.search('confrefr', f):%0A%09%09%09%09confrefr.append(f)%0A%09%09%09if re.search('filler', f):%0A%09%09%09%09filler.append(f)%0A%09%09%09if re.search('senf', f):%0A%09%09%09%09senf.append(f)%0A%09%09%09if re.search('willf', f):%0A%09%09%09%09willf.append(f)%0A%09%09%09if re.search('willf2', f):%0A%09%09%09%09willf2.append(f)%0Asubspeaker = %5B%5D%0Asubjectids = %7B%7D%0Aexperiments = %5Bconfreeufr, confrefr, filler, senf, willf, willf2%5D%0Afor experiment in experiments:%0A%09for i in experiment:%0A%09%09dog = i.split('_')%0A%09%09subid = dog%5B0%5D + '_' + dog%5B1%5D%0A%09%09if len(list(dog%5B2%5D)) == 1:%0A%09%09%09cat = re.sub(i, '0' + dog%5B2%5D + '_' + dog%5B3%5D, i)%0A%09%09else:%0A%09%09%09cat = re.sub(i, dog%5B2%5D + '_' + dog%5B3%5D, i)%0A%09%09if subid not in subjectids:%0A%09%09%09subjectids%5Bsubid%5D = %5B(i, cat)%5D%0A%09%09else:%0A%09%09%09subjectids%5Bsubid%5D.append((i, cat))%0A%0Aif not os.path.exists('/media/share/datasets/aligner_benchmarks/sorted_quebec_french'):%0A%09os.makedirs('/media/share/datasets/aligner_benchmarks/sorted_quebec_french')%0A%0Afor i in subjectids.keys():%0A%09if not os.path.exists('/media/share/datasets/aligner_benchmarks/sorted_quebec_french/' + i):%0A%09   %09os.makedirs('/media/share/datasets/aligner_benchmarks/sorted_quebec_french/' + i)%0A%09for j in subjectids%5Bi%5D:%0A%09%09os.rename(corpus + '/' + j%5B0%5D, 'sorted_quebec_french/' + i + '/' + j%5B1%5D)%0A

set corpus for french model