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 python | |
import glob, os | |
for file in sorted(glob.glob("*.wav")): | |
print("#"*40) | |
print(file) | |
os.system("python audioAnalysis.py silenceRemoval -i " + file + " --smoothing 0.2 --weight 0.1") |
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 r | |
## load pitch files extracted from Praat and pull key information | |
# take input from the command line | |
f <- argv | |
# load packages and hide messages | |
library(dplyr) | |
library(rPraat) |
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
clearinfo | |
# uncomment for a point-and-click version (then the next two lines should be commented out) | |
#inDir$ = chooseDirectory$: "Choose the folder containing your wav files" | |
wd$ = "./" | |
inDir$ = wd$ | |
# create a list of all wav files in the chosen directory | |
inDirWild$ = inDir$ + "*.wav" |
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
library(RCurl) | |
# download the R code | |
script <- getURL("https://raw.githubusercontent.com/usagi5886/dsp/master/Spectrogram().r", | |
ssl.verifypeer = FALSE) | |
# load it as a function | |
eval(parse(text = script)) | |
library(audio) | |
# download the wav file |
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
library(hht) | |
data(PortFosterEvent) | |
dt <- mean(diff(tt)) | |
ft <- list() | |
ft$nfft <- 4096 | |
ft$ns <- 30 | |
ft$nov <- 29 |
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
library(warbleR) | |
# load and save data | |
data(list = c("Phae.long1", "Phae.long2","selec.table")) | |
writeWave(Phae.long1, "Phae.long1.wav") | |
# make spectrograms (saves the files in the working directory) | |
specreator(X = selec.table, flim = c(0, 11), res = 300, mar = 0.05, wl = 300) |
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
library(soundgen) | |
# synthesize a sound 1 s long, with gradually increasing hissing noise | |
sound = soundgen(sylLen = 1000, | |
temperature = 0.001, | |
noiseAnchors = list( | |
time = c(0, 1300), | |
value = c(-120, 0)), | |
formantsNoise = list( | |
f1 = list( |
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
library(signal) | |
specgram(chirp(seq(-2, 15, by = 0.001), 400, 10, 100, 'quadratic')) |
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
library(ggplot2) | |
## first layer | |
v <- ggspectro(tico, ovlp = 50) | |
## using geom_tile ## | |
v + geom_tile(aes(fill = amplitude)) + stat_contour() |
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
library(seewave) | |
data(tico) | |
spectro(tico) |
NewerOlder