MMG2PLXK54U7GEVNK65SALH3BZEKWTP6ZSNBELMO3CZJP25MGZ5QC
ROFI4OLA7JABVWRTJTZQ5GHKYLSO5QKFUDQHWHWP7OEYTGNBCLPQC
SMODB47PJBBRRAXJNDWX4LTSNUW3BUILYGSQQ2ZKLYGT6OLO722AC
BOPNWZL4RWF4UGC2LUEVONNQFSKYJ2Q5W747GH3UURZLBJFFEBUQC
NV7FXZ5QETWHE7EQHET5ZZUKH4UIAIRGQ42MR2IT5JCZDPRNEZRQC
PQ6OQCBQUJMAGTITCWSBFIKCGW3BO7ZOBQ2AB7DQOIUNZH2KICYAC
EDYR5C55YKPEMJOS4O6YEUK5JYUWSX4NTPQGG4GLH5QL2O62GTPQC
E3Y55MPRKKDPTGI56RSA7YCGB33NSZYKHGCVHEUKRM2KJ2RNM5IQC
4BTZNCRM7R6SZPE5W7UENKS2LNXXRWVXGGZAM7QOWDIPEGW3LQ6AC
NMQCXLNGPIKUKMNKEIVUBYUNJQDM63IVKRVMQHVV5TLH6OBNF3IAC
2UBDFCJH2BG6U6SY2YDJ7QK4JOLUJAHOYZS3YRQ7E7U4UGP4YR5QC
RBXUHIO2WALXMYGFRWNDLVHFH4OOMCODI3K4HKZNWGWUX6INB6LAC
length(audio_files) > 0 ? predict_audio_folder(audio_files, model, folder) : @info "No png, flac, wav, WAV files present in $folder"
length(audio_files) > 0 ? predict_audio_folder(audio_files, model, folder) :
@info "No png, flac, wav, WAV files present in $folder"
=#
=#
# Convert mp3's with: for file in *.mp3; do ffmpeg -i "${file}" -ar 16000 "${file%.*}.wav"; done
# Requires 16000hz wav's, works in current folder
#=
wavs = glob("*.wav")
for wav in wavs
Skraak.make_spectro_from_sample(wav)
end
=#
function make_spectro_from_sample(file::String)
signal, freq = wavread("$file")
freq = freq |> Float32
partitioned_signal = Iterators.partition(signal, 80000) #5s clips
for (index, part) in enumerate(partitioned_signal)
outfile = "$(index)__$(chop(file, head=0, tail=4))"
image = get_image_from_sample(part, freq)
PNGFiles.save("$outfile.png", image)
end
end