This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env julia | |
## (c) David A. van Leeuwen | |
## routines for adding noise at the right level | |
import MFCC | |
import WAV | |
import ProgressMeter | |
import StatsBase | |
import LinearAlgebra | |
import DelimitedFiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## weirdness in innerloop optimization | |
## similar to sumabs2() | |
function mydot{T}(x::Array{T}) | |
s = zero(T) | |
for xx in x | |
s += xx*xx | |
end | |
s | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## make matrix symmetric by copying the upper triangle into the lower | |
## this should exist somewhere... | |
function symm!(m::Matrix) | |
for i=1:size(m,1) | |
for j=i+1:size(m,2) | |
m[j,i] = m[i,j] | |
end | |
end | |
m | |
end |