Class GenericRecognizer
This class calls algorithms for generic syllable/component types.
Inherited Members
Namespace: AnalysisPrograms.Recognizers
Assembly: AnalysisPrograms.dll
Syntax
public class GenericRecognizer : RecognizerBase, IEventRecognizer, IAnalyser2, ICiteable, IHasStatus
Properties
| Improve this Doc View SourceAuthor
Declaration
public override string Author { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceCommonName
Declaration
public override string CommonName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceDescription
Gets a user friendly string describing the analyzer. Intending for printing in the console.
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceSpeciesName
Declaration
public override string SpeciesName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceStatus
Declaration
public override Status Status { get; }
Property Value
Type | Description |
---|---|
Status |
Overrides
Methods
| Improve this Doc View SourceParseConfig(FileInfo)
Declaration
public override AnalyzerConfig ParseConfig(FileInfo file)
Parameters
Type | Name | Description |
---|---|---|
File |
file |
Returns
Type | Description |
---|---|
Analyzer |
Overrides
| Improve this Doc View SourceRecognize(AudioRecording, Config, TimeSpan, Lazy<IndexCalculateResult[]>, DirectoryInfo, Nullable<Int32>)
Do your analysis. This method is called once per segment (typically one-minute segments).
Declaration
public override RecognizerResults Recognize(AudioRecording audioRecording, Config genericConfig, TimeSpan segmentStartOffset, Lazy<IndexCalculateResult[]> getSpectralIndexes, DirectoryInfo outputDirectory, int? imageWidth)
Parameters
Type | Name | Description |
---|---|---|
Audio |
audioRecording | The audio recording to process - it should be a minute or two long. |
Config | genericConfig | |
Time |
segmentStartOffset | In analyze long recording scenarios this is the time from the start of the original audio recording for this segment. |
Lazy<Index |
getSpectralIndexes | Invoke this lazy function to get indices for the current segment. |
Directory |
outputDirectory | The current output directory. |
Nullable<Int32> | imageWidth | The expected width of output images. |
Returns
Type | Description |
---|---|
Recognizer |
A recognizer results object. |
Overrides
| Improve this Doc View SourceRunOneProfile(SpectrogramStandard, String, CommonParameters, Nullable<Double>, TimeSpan)
Gets the events for one profile at one decibel threshold.
Declaration
public static RecognizerResults RunOneProfile(SpectrogramStandard spectrogram, string profileName, CommonParameters profileConfig, double? decibelThreshold, TimeSpan segmentStartOffset)
Parameters
Type | Name | Description |
---|---|---|
Spectrogram |
spectrogram | Spectrogram derived from audio segment. |
String | profileName | Profile name in the config file. |
Common |
profileConfig | |
Nullable<Double> | decibelThreshold | Threshold for this pass. |
Time |
segmentStartOffset | The same for any given recording segment. |
Returns
Type | Description |
---|---|
Recognizer |
A results object. |
RunProfiles(AudioRecording, GenericRecognizer.GenericRecognizerConfig, TimeSpan)
Declaration
public static RecognizerResults RunProfiles(AudioRecording audioRecording, GenericRecognizer.GenericRecognizerConfig configuration, TimeSpan segmentStartOffset)
Parameters
Type | Name | Description |
---|---|---|
Audio |
audioRecording | |
Generic |
configuration | |
Time |
segmentStartOffset |
Returns
Type | Description |
---|---|
Recognizer |
SaveDebugSpectrogram(RecognizerResults, Config, DirectoryInfo, String)
THis method can be modified if want to do something non-standard with the output spectrogram.
Declaration
public static string SaveDebugSpectrogram(RecognizerResults results, Config genericConfig, DirectoryInfo outputDirectory, string baseName)
Parameters
Type | Name | Description |
---|---|---|
Recognizer |
results | |
Config | genericConfig | |
Directory |
outputDirectory | |
String | baseName |
Returns
Type | Description |
---|---|
String |
ValidateProfileTagsMatchAlgorithms(Dictionary<String, Object>, FileInfo)
Declaration
public static void ValidateProfileTagsMatchAlgorithms(Dictionary<string, object> profiles, FileInfo file)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<String, Object> | profiles | |
File |
file |