JYCKLP2EZJHX7QWMGN6TZZLRXOG7A4LUO64X2ORWDMSJX7LM7XIQC
scores.to_csv("scores-2024-08-04.csv")
preds.to_csv("preds-2024-08-04.csv")
os.chdir('../..')
scores.to_csv("scores-2024-08-29.csv")
preds.to_csv("preds-2024-08-29.csv")
os.chdir('../..') # Be careful this matches the glob on line 284
end
end
end
# 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, need ffmpeg to convert mp3's to wavs at 16000hz
#=
wavs = glob("*.wav")
for wav in wavs
Skraak.make_spectro_from_file(wav)
end
=#
function make_spectro_from_file(file::String)
signal, freq = wavread("$file")
freq = freq |> Float32
partitioned_signal = Iterators.partition(signal, 80000) #5s clips
for (index, part) in enumerate(partitioned_signal)
length(part) > 50000 && begin
outfile = "$(chop(file, head=0, tail=4))__$(index)"
image = get_image_from_sample(part, freq)
PNGFiles.save("$outfile.png", image)
=#
# 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
=#