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 |
---|---|---|
FileInfo | file |
Returns
Type | Description |
---|---|
AnalyzerConfig |
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 |
---|---|---|
AudioRecording | audioRecording | The audio recording to process - it should be a minute or two long. |
Config | genericConfig | |
TimeSpan | segmentStartOffset | In analyze long recording scenarios this is the time from the start of the original audio recording for this segment. |
Lazy<IndexCalculateResult[]> | getSpectralIndexes | Invoke this lazy function to get indices for the current segment. |
DirectoryInfo | outputDirectory | The current output directory. |
Nullable<Int32> | imageWidth | The expected width of output images. |
Returns
Type | Description |
---|---|
RecognizerResults | 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 |
---|---|---|
SpectrogramStandard | spectrogram | Spectrogram derived from audio segment. |
String | profileName | Profile name in the config file. |
CommonParameters | profileConfig | |
Nullable<Double> | decibelThreshold | Threshold for this pass. |
TimeSpan | segmentStartOffset | The same for any given recording segment. |
Returns
Type | Description |
---|---|
RecognizerResults | A results object. |
RunProfiles(AudioRecording, GenericRecognizer.GenericRecognizerConfig, TimeSpan)
Declaration
public static RecognizerResults RunProfiles(AudioRecording audioRecording, GenericRecognizer.GenericRecognizerConfig configuration, TimeSpan segmentStartOffset)
Parameters
Type | Name | Description |
---|---|---|
AudioRecording | audioRecording | |
GenericRecognizer.GenericRecognizerConfig | configuration | |
TimeSpan | segmentStartOffset |
Returns
Type | Description |
---|---|
RecognizerResults |
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 |
---|---|---|
RecognizerResults | results | |
Config | genericConfig | |
DirectoryInfo | 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 | |
FileInfo | file |