diff --git a/Acoustics/Acoustics.Shared/ConfigFile/ConfigFile.cs b/Acoustics/Acoustics.Shared/ConfigFile/ConfigFile.cs index 20088ea3f..3f8ad4916 100644 --- a/Acoustics/Acoustics.Shared/ConfigFile/ConfigFile.cs +++ b/Acoustics/Acoustics.Shared/ConfigFile/ConfigFile.cs @@ -143,6 +143,11 @@ public static FileInfo ResolveConfigFile(FileInfo file, params DirectoryInfo[] s public static FileInfo ResolveConfigFile(string file, params DirectoryInfo[] searchPaths) { + if (file.IsNullOrEmpty()) + { + throw new ArgumentException("Try to resolve config failed, because supplied file argument was null or empty.", nameof(file)); + } + var success = TryResolveConfigFile(file, searchPaths.Select(x => x.ToDirectoryEntry()), out FileEntry configFile); if (success) diff --git a/AudioAnalysis/AnalysisConfigFiles/Ecosounds.StandardizedFeatures.yml b/AudioAnalysis/AnalysisConfigFiles/Ecosounds.StandardizedFeatures.yml new file mode 100644 index 000000000..e01541eb2 --- /dev/null +++ b/AudioAnalysis/AnalysisConfigFiles/Ecosounds.StandardizedFeatures.yml @@ -0,0 +1,54 @@ +--- +# Summary: Calculates standardized features for machine learning tasks + +AnalysisName: Ecosounds.StandardizedFeatures +#SegmentDuration: units=minutes; +SegmentDuration: 1 +#SegmentOverlap: units=seconds; +SegmentOverlap: 0 + +# BgNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds) +# BG noise for any location is calculated by extending the region of index calculation from 5 seconds before start to 5 sec after end of current index interval. +# Ten seconds is considered a minimum interval to obtain a reliable estimate of BG noise. +# The BG noise interval is not extended beyond start or end of recording segment. +# Consequently for a 60sec Index calculation duration, the BG noise is calculated form the 60sec segment only. +BgNoiseNeighbourhood: 5 + +# Resample rate must be 2 X the desired Nyquist +ResampleRate: 22050 + +# FRAME LENGTH. units=samples +# FrameWidth is used without overlap to calculate the spectral indices. Typical value=512 +FrameLength: 512 + + +#Default values in code are LowFreqBound=1000Hz & MidFreqBound=8000 +LowFreqBound: 1000 +MidFreqBound: 8000 +HighFreqBound: 11000 + +# FrequencyScale options are currently only Linear and Octave +# Octave scale is to be used only for Jasco Marine recordings @ sample rate = 64000 +FrequencyScale: Linear + +# SAVE INTERMEDIARY FILES +# Available options (case-sensitive): [False/Never | True/Always | WhenEventsDetected] +SaveIntermediateWavFiles: Never +SaveIntermediateCsvFiles: false +# One-minute spectrograms can be saved in any analysis task. +# Available options (case-sensitive): [False/Never | True/Always | WhenEventsDetected] +SaveSonogramImages: Never + +# if true, an unambiguous date time must be provided in the source file's name. +# if true, an exception will be thrown if no such date is found +# if false, and a valid date is still found in file name, it will still be parsed +# supports formats like: +# prefix_20140101T235959+1000.mp3 +# prefix_20140101T235959+Z.mp3 +# prefix_20140101-235959+1000.mp3 +# prefix_20140101-235959+Z.mp3 +RequireDateInFilename: false + +IndexPropertiesConfig: './IndexPropertiesConfig.yml' +... + diff --git a/AudioAnalysis/AnalysisPrograms/AnalysisPrograms.csproj b/AudioAnalysis/AnalysisPrograms/AnalysisPrograms.csproj index 41a0119ca..dc89f5962 100644 --- a/AudioAnalysis/AnalysisPrograms/AnalysisPrograms.csproj +++ b/AudioAnalysis/AnalysisPrograms/AnalysisPrograms.csproj @@ -285,7 +285,7 @@ - + @@ -415,6 +415,7 @@ +