From 8729f98aa21e2e6c5de3cd014f5de3c87f052a47 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Tue, 28 Mar 2017 17:44:09 +0200 Subject: [PATCH] annotated another song --- preprocess.sh | 38 ++-- textgrid/13.TextGrid | 446 +++++++++++++++++++++++++++++++++++++++++++ train.py | 4 +- 3 files changed, 468 insertions(+), 20 deletions(-) create mode 100644 textgrid/13.TextGrid diff --git a/preprocess.sh b/preprocess.sh index 6886139..e426821 100644 --- a/preprocess.sh +++ b/preprocess.sh @@ -5,25 +5,25 @@ MAXPROCS=4 FREQUENCY=44100 #FREQUENCY=22050 -rm -rf wav mfcc -mkdir -p wav mfcc -i=0 -for f in orig/*/*.flac; do - while [ $(jobs -p | wc -l) -ge $MAXPROCS ]; do sleep 1; done - - echo $f - BN="$(echo $f | grep -Po "(?<=/[0-9][0-9]_-_).*(?=\.flac)")" - NUM="$(printf '%02d' "$i")" - WAV="wav/$NUM.wav" - MFCC="mfcc/$NUM.mfcc" - - ( echo "Processing $f" && - sox "$f" -V1 -c 1 -r $FREQUENCY $WAV && - python mfcc.py < "$WAV" > "$MFCC" - ) & - i=$((i+1)) -done -wait +#rm -rf wav mfcc +#mkdir -p wav mfcc +#i=0 +#for f in orig/*/*.flac; do +# while [ $(jobs -p | wc -l) -ge $MAXPROCS ]; do sleep 1; done +# +# echo $f +# BN="$(echo $f | grep -Po "(?<=/[0-9][0-9]_-_).*(?=\.flac)")" +# NUM="$(printf '%02d' "$i")" +# WAV="wav/$NUM.wav" +# MFCC="mfcc/$NUM.mfcc" +# +# ( echo "Processing $f" && +# sox "$f" -V1 -c 1 -r $FREQUENCY $WAV && +# python mfcc.py < "$WAV" > "$MFCC" +# ) & +# i=$((i+1)) +#done +#wait python segment.py python train.py python test.py diff --git a/textgrid/13.TextGrid b/textgrid/13.TextGrid new file mode 100644 index 0000000..e5c7558 --- /dev/null +++ b/textgrid/13.TextGrid @@ -0,0 +1,446 @@ +File type = "ooTextFile" +Object class = "TextGrid" + +xmin = 0 +xmax = 245.38666666666666 +tiers? +size = 1 +item []: + item [1]: + class = "IntervalTier" + name = "lyrics" + xmin = 0 + xmax = 245.38666666666666 + intervals: size = 108 + intervals [1]: + xmin = 0 + xmax = 4.684193484768569 + text = "" + intervals [2]: + xmin = 4.684193484768569 + xmax = 12.292231944525476 + text = "They have slept for centuries" + intervals [3]: + xmin = 12.292231944525476 + xmax = 12.749614282542357 + text = "" + intervals [4]: + xmin = 12.749614282542357 + xmax = 24.133500026932218 + text = "They have slept for centuries. Rising to enthrone the abominations" + intervals [5]: + xmin = 24.133500026932218 + xmax = 31.447266059074135 + text = "" + intervals [6]: + xmin = 31.447266059074135 + xmax = 37.83799411155627 + text = "Realm" + intervals [7]: + xmin = 37.83799411155627 + xmax = 45.15257274170521 + text = "" + intervals [8]: + xmin = 45.15257274170521 + xmax = 45.76278419445834 + text = "of" + intervals [9]: + xmin = 45.76278419445834 + xmax = 46.092628222973545 + text = "" + intervals [10]: + xmin = 46.092628222973545 + xmax = 46.85126948855852 + text = "deca-" + intervals [11]: + xmin = 46.85126948855852 + xmax = 47.01619150281613 + text = "" + intervals [12]: + xmin = 47.01619150281613 + xmax = 50.82589003216676 + text = "y malignant stench slowly escapes" + intervals [13]: + xmin = 50.82589003216676 + xmax = 51.17956992663734 + text = "" + intervals [14]: + xmin = 51.17956992663734 + xmax = 52.828790069213376 + text = "From the sufferance" + intervals [15]: + xmin = 52.828790069213376 + xmax = 53.19986460129299 + text = "" + intervals [16]: + xmin = 53.19986460129299 + xmax = 54.79960813959174 + text = "below" + intervals [17]: + xmin = 54.79960813959174 + xmax = 55.156282885823 + text = "" + intervals [18]: + xmin = 55.156282885823 + xmax = 55.659295029308694 + text = "Mutilated" + intervals [19]: + xmin = 55.659295029308694 + xmax = 55.95615465497239 + text = "" + intervals [20]: + xmin = 55.95615465497239 + xmax = 57.25079246689457 + text = "servants of a truthless" + intervals [21]: + xmin = 57.25079246689457 + xmax = 57.572390394696896 + text = "" + intervals [22]: + xmin = 57.572390394696896 + xmax = 58.067156437469706 + text = "God" + intervals [23]: + xmin = 58.067156437469706 + xmax = 58.4052465666978 + text = "" + intervals [24]: + xmin = 58.4052465666978 + xmax = 63.26646664719944 + text = "god" + intervals [25]: + xmin = 63.26646664719944 + xmax = 65.08060880403308 + text = "" + intervals [26]: + xmin = 65.08060880403308 + xmax = 65.68257415607333 + text = "Awaken" + intervals [27]: + xmin = 65.68257415607333 + xmax = 65.94644937888549 + text = "" + intervals [28]: + xmin = 65.94644937888549 + xmax = 67.89252914712522 + text = "they begin to thirst" + intervals [29]: + xmin = 67.89252914712522 + xmax = 68.28834198134348 + text = "" + intervals [30]: + xmin = 68.28834198134348 + xmax = 68.71713921841324 + text = "the" + intervals [31]: + xmin = 68.71713921841324 + xmax = 68.95229679898908 + text = "" + intervals [32]: + xmin = 68.95229679898908 + xmax = 71.43437311356601 + text = "blood. Of what is holy" + intervals [33]: + xmin = 71.43437311356601 + xmax = 71.6075412285365 + text = "" + intervals [34]: + xmin = 71.6075412285365 + xmax = 74.46893817590592 + text = "And reclaim the throne" + intervals [35]: + xmin = 74.46893817590592 + xmax = 74.79053610370825 + text = "" + intervals [36]: + xmin = 74.79053610370825 + xmax = 75.98224136697822 + text = "of a beheaded" + intervals [37]: + xmin = 75.98224136697822 + xmax = 76.69140602828591 + text = "" + intervals [38]: + xmin = 76.69140602828591 + xmax = 82.02265384942172 + text = "messiah. Thrones of blood. They" + intervals [39]: + xmin = 82.02265384942172 + xmax = 82.26179077009523 + text = "" + intervals [40]: + xmin = 82.26179077009523 + xmax = 82.88677099059464 + text = "shall" + intervals [41]: + xmin = 82.88677099059464 + xmax = 83.10116960912953 + text = "" + intervals [42]: + xmin = 83.10116960912953 + xmax = 90.60549060782841 + text = "perish. They shall perish" + intervals [43]: + xmin = 90.60549060782841 + xmax = 93.16178182882128 + text = "" + intervals [44]: + xmin = 93.16178182882128 + xmax = 96.51224204518633 + text = "Visions of butchery" + intervals [45]: + xmin = 96.51224204518633 + xmax = 107.00981555050701 + text = "" + intervals [46]: + xmin = 107.00981555050701 + xmax = 108.27146895957767 + text = "their eyes start" + intervals [47]: + xmin = 108.27146895957767 + xmax = 108.71675839807321 + text = "" + intervals [48]: + xmin = 108.71675839807321 + xmax = 113.42483074838283 + text = "to bleed. Penance of this cleansing" + intervals [49]: + xmin = 113.42483074838283 + xmax = 113.95258119400717 + text = "" + intervals [50]: + xmin = 113.95258119400717 + xmax = 123.35432586339137 + text = "*" + intervals [51]: + xmin = 123.35432586339137 + xmax = 123.82435360402555 + text = "" + intervals [52]: + xmin = 123.82435360402555 + xmax = 124.3650657365496 + text = "Born" + intervals [53]: + xmin = 124.3650657365496 + xmax = 124.67841756363904 + text = "" + intervals [54]: + xmin = 124.67841756363904 + xmax = 126.72345054043333 + text = "to indigenous" + intervals [55]: + xmin = 126.72345054043333 + xmax = 127.20172438178038 + text = "" + intervals [56]: + xmin = 127.20172438178038 + xmax = 130.50841076764533 + text = "sacrilege" + intervals [57]: + xmin = 130.50841076764533 + xmax = 135.7984280852167 + text = "" + intervals [58]: + xmin = 135.7984280852167 + xmax = 141.649180251264 + text = "Awaiting the invocation" + intervals [59]: + xmin = 141.649180251264 + xmax = 145.10031710986308 + text = "" + intervals [60]: + xmin = 145.10031710986308 + xmax = 150.23763785398742 + text = "forgotten scriptures" + intervals [61]: + xmin = 150.23763785398742 + xmax = 153.86666324010233 + text = "" + intervals [62]: + xmin = 153.86666324010233 + xmax = 156.71156798604596 + text = "Covenant of the loathing" + intervals [63]: + xmin = 156.71156798604596 + xmax = 157.18984182739302 + text = "" + intervals [64]: + xmin = 157.18984182739302 + xmax = 157.77133563790989 + text = "oppressors" + intervals [65]: + xmin = 157.77133563790989 + xmax = 157.98943968806668 + text = "" + intervals [66]: + xmin = 157.98943968806668 + xmax = 163.23441113014906 + text = "of the plague. For they are seven" + intervals [67]: + xmin = 163.23441113014906 + xmax = 163.72482842822015 + text = "" + intervals [68]: + xmin = 163.72482842822015 + xmax = 169.51439101419015 + text = "larvae of the ancients" + intervals [69]: + xmin = 169.51439101419015 + xmax = 169.98818399707238 + text = "" + intervals [70]: + xmin = 169.98818399707238 + xmax = 177.78928868507256 + text = "*" + intervals [71]: + xmin = 177.78928868507256 + xmax = 178.13438801087312 + text = "" + intervals [72]: + xmin = 178.13438801087312 + xmax = 181.42600241826554 + text = "*" + intervals [73]: + xmin = 181.42600241826554 + xmax = 182.0660385530363 + text = "" + intervals [74]: + xmin = 182.0660385530363 + xmax = 183.46248102889973 + text = "*" + intervals [75]: + xmin = 183.46248102889973 + xmax = 183.98614695734855 + text = "" + intervals [76]: + xmin = 183.98614695734855 + xmax = 188.08834151582943 + text = "*" + intervals [77]: + xmin = 188.08834151582943 + xmax = 194.86485916054835 + text = "" + intervals [78]: + xmin = 194.86485916054835 + xmax = 197.02602013509895 + text = "*" + intervals [79]: + xmin = 197.02602013509895 + xmax = 197.3751307540648 + text = "" + intervals [80]: + xmin = 197.3751307540648 + xmax = 198.57208144766204 + text = "*" + intervals [81]: + xmin = 198.57208144766204 + xmax = 199.06679961016232 + text = "" + intervals [82]: + xmin = 199.06679961016232 + xmax = 199.63202632658323 + text = "*" + intervals [83]: + xmin = 199.63202632658323 + xmax = 199.96451263036025 + text = "" + intervals [84]: + xmin = 199.96451263036025 + xmax = 202.49140853906556 + text = "*" + intervals [85]: + xmin = 202.49140853906556 + xmax = 202.8987042611924 + text = "" + intervals [86]: + xmin = 202.8987042611924 + xmax = 206.97596234689 + text = "*" + intervals [87]: + xmin = 206.97596234689 + xmax = 210.74968189475908 + text = "" + intervals [88]: + xmin = 210.74968189475908 + xmax = 215.81608673419325 + text = "Awaken they begin to thirst the blood" + intervals [89]: + xmin = 215.81608673419325 + xmax = 216.3231283474532 + text = "Of" + intervals [90]: + xmin = 216.3231283474532 + xmax = 216.64730249363578 + text = "" + intervals [91]: + xmin = 216.64730249363578 + xmax = 219.01626740804699 + text = "what is holy" + intervals [92]: + xmin = 219.01626740804699 + xmax = 219.19913487512434 + text = "" + intervals [93]: + xmin = 219.19913487512434 + xmax = 222.0545057944414 + text = "And reclaim the throne" + intervals [94]: + xmin = 222.0545057944414 + xmax = 222.4784258317571 + text = "" + intervals [95]: + xmin = 222.4784258317571 + xmax = 223.72524947092091 + text = "of a beheaded" + intervals [96]: + xmin = 223.72524947092091 + xmax = 223.96630204115925 + text = "" + intervals [97]: + xmin = 223.96630204115925 + xmax = 230.28784267735165 + text = "messiah" + intervals [98]: + xmin = 230.28784267735165 + xmax = 233.89130778016695 + text = "" + intervals [99]: + xmin = 233.89130778016695 + xmax = 234.9137031642813 + text = "They have slept" + intervals [100]: + xmin = 234.9137031642813 + xmax = 235.42074477754122 + text = "" + intervals [101]: + xmin = 235.42074477754122 + xmax = 236.7922507806214 + text = "for centuries" + intervals [102]: + xmin = 236.7922507806214 + xmax = 237.2494194483148 + text = "" + intervals [103]: + xmin = 237.2494194483148 + xmax = 238.42143366912876 + text = "purification" + intervals [104]: + xmin = 238.42143366912876 + xmax = 238.7289835001225 + text = "" + intervals [105]: + xmin = 238.7289835001225 + xmax = 241.84467916081323 + text = "Of the parallels. Enthroned" + intervals [106]: + xmin = 241.84467916081323 + xmax = 242.38496940445089 + text = "" + intervals [107]: + xmin = 242.38496940445089 + xmax = 242.98344475124952 + text = "abominations" + intervals [108]: + xmin = 242.98344475124952 + xmax = 245.38666666666666 + text = "" diff --git a/train.py b/train.py index 2f6bc91..4d5e361 100644 --- a/train.py +++ b/train.py @@ -4,7 +4,9 @@ from keras.layers import Dense, Dropout # , Activation model = Sequential() -model.add(Dense(2000, input_shape=(13,), activation='relu')) +model.add(Dense(50, input_shape=(13,), activation='relu')) +model.add(Dense(50, activation='relu')) +model.add(Dense(50, activation='relu')) model.add(Dense(1, activation='sigmoid')) model.compile( -- 2.20.1