Class AnalysisSettings
The analysis settings for processing one audio file.
Implements
Inherited Members
Namespace: AnalysisBase
Assembly: AnalysisBase.dll
Syntax
public class AnalysisSettings : ICloneable
Remarks
All members in this class are prefixed either with.
Segment
or. Analysis
.
Members prefixed with Segment change per segment.
Members prefixed with Analysis are invariant for the Analysis.
This class MUST be deeply serializable as it crosses serialization boundaries.
The only files and folders an analysis may access are the audio file, configuration file and any file or folder in the working directory. The working directory may be deleted after the analysis is complete.
Constructors
| Improve this Doc View SourceAnalysisSettings()
Initializes a new instance of the AnalysisSettings class.
Declaration
public AnalysisSettings()
Properties
| Improve this Doc View SourceAnalysisAnalyzerSpecificConfiguration
Gets or sets an object that can be used to store arbitrary configuration or options. This is useful for passing information between BeforeAnalyze and Analyze. DO NOT STORE MUTABLE STATE IN THIS OBJECT. The object provided must be serializable!.
Declaration
public object AnalysisAnalyzerSpecificConfiguration { get; set; }
Property Value
Type | Description |
---|---|
Object |
AnalysisChannelSelection
Gets or sets the ChannelSelection array - a list of channels to extract from the audio.
Declaration
public int[] AnalysisChannelSelection { get; set; }
Property Value
Type | Description |
---|---|
Int32[] |
AnalysisDataSaveBehavior
Gets or sets a value indicating whether intermediate data files should be saved. The save behavior defines whether intermediate results generated by the segment should be saved or not.
Declaration
public bool AnalysisDataSaveBehavior { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
AnalysisImageSaveBehavior
Gets or sets the AnalysisImageSaveBehavior for images The save behavior defines whether intermediate results generated by the segment should be saved or not.
Declaration
public SaveBehavior AnalysisImageSaveBehavior { get; set; }
Property Value
Type | Description |
---|---|
SaveBehavior |
AnalysisMaxSegmentDuration
Gets or sets the maximum audio file duration the analysis can process. This is the max duration without including overlap. Overlap will be added. This means that a segment may be larger than this value. This should be set to an initial value by an analysis.
Declaration
public TimeSpan? AnalysisMaxSegmentDuration { get; set; }
Property Value
Type | Description |
---|---|
Nullable<TimeSpan> |
AnalysisMinSegmentDuration
Gets or sets the minimum audio file duration the analysis can process. This is the min duration without including overlap. Overlap will be added. This should be set to an initial value by an analysis. This value is used in AnalysisBase.AnalysisCoordinator.PrepareAnalysisSegments``1(AnalysisBase.ISourcePreparer,AnalysisBase.Segment.ISegment{``0}[],AnalysisBase.AnalysisSettings) TODO: a chunk of audio without the overlap is a 'segment step'.
Declaration
public TimeSpan AnalysisMinSegmentDuration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
AnalysisMixDownToMono
Gets or sets a value indicating whether to mix all selected channels down into one mono channel.
Declaration
public bool AnalysisMixDownToMono { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
AnalysisOutputDirectory
Gets or sets the output directory that is the base of the folder structure that analyses can use. Analysis implementations must not set this.
Declaration
public DirectoryInfo AnalysisOutputDirectory { get; set; }
Property Value
Type | Description |
---|---|
DirectoryInfo |
AnalysisTargetSampleRate
Gets or sets the audio sample rate the analysis expects (in hertz).
This is initially set to the value of the DefaultTargetSampleRateKey
setting in the AP.Settings.json.
This used to be set by a constant in each implementation of an analysis.
A null value indicates that no sample rate modification will be done.
Declaration
public int? AnalysisTargetSampleRate { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
AnalysisTempDirectory
Gets or sets the temp directory that is the base of the folder structure that analyses can use. The contents of this directory may be deleted after the analysis is finished. If this value is null, AnalysisCoordinator will fallback to AnalysisTempDirectoryFallback. Analysis implementations must not set this.
Declaration
public DirectoryInfo AnalysisTempDirectory { get; set; }
Property Value
Type | Description |
---|---|
DirectoryInfo |
AnalysisTempDirectoryFallback
Gets a base temp directory. The directory will exist and it will be unique. Anything put here will be deleted when the analysis is complete.
Declaration
public DirectoryInfo AnalysisTempDirectoryFallback { get; }
Property Value
Type | Description |
---|---|
DirectoryInfo |
ConfigDict
Gets or sets the config dictionary.
Declaration
[Obsolete]
public Dictionary<string, string> ConfigDict { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, String> |
ConfigFile
Gets or sets the configuration file to use to run the analysis.
Declaration
public FileInfo ConfigFile { get; set; }
Property Value
Type | Description |
---|---|
FileInfo |
Configuration
Gets or sets the object of other configuration properties. Should be mutually exclusive with ConfigFile.
Declaration
public Config Configuration { get; set; }
Property Value
Type | Description |
---|---|
Config |
InstanceId
Gets the instance tracking integer.
Declaration
public int InstanceId { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsAnalysisTempDirectoryValid
Gets a value indicating whether AnalysisTempDirectory is not null and exists.
Declaration
public bool IsAnalysisTempDirectoryValid { get; }
Property Value
Type | Description |
---|---|
Boolean |
SegmentMediaType
Gets or sets the media type the analysis expects. This should be set to an initial value by an analysis.
Declaration
public string SegmentMediaType { get; set; }
Property Value
Type | Description |
---|---|
String |
SegmentOverlapDuration
Gets or sets the duration for segments to overlap. This should be set to an initial value by an analysis.
Declaration
public TimeSpan SegmentOverlapDuration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
| Improve this Doc View SourceClone()
Declaration
public object Clone()
Returns
Type | Description |
---|---|
Object |
Remarks
Does a deep clone.
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |