Class LocalSourcePreparer
Local source file preparer.
Implements
Inherited Members
Namespace: AnalysisPrograms.SourcePreparers
Assembly: AnalysisPrograms.dll
Syntax
public class LocalSourcePreparer : ISourcePreparer
Constructors
| Improve this Doc View SourceLocalSourcePreparer(Boolean, Boolean)
Declaration
public LocalSourcePreparer(bool filterShortSegments = false, bool useOldNamingFormat = true)
Parameters
Methods
| Improve this Doc View SourceCalculateSegments<TSource>(IEnumerable<ISegment<TSource>>, AnalysisSettings)
Calculate the file segments for analysis.
Declaration
public IEnumerable<ISegment<TSource>> CalculateSegments<TSource>(IEnumerable<ISegment<TSource>> fileSegments, AnalysisSettings settings)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ISegment<TSource>> | fileSegments | The file segments. |
Analysis |
settings | The settings. |
Returns
Type | Description |
---|---|
IEnumerable<ISegment<TSource>> | Enumerable of sub-segments. |
Type Parameters
Name | Description |
---|---|
TSource |
PrepareFile(DirectoryInfo, String, String, TimeSpan, TimeSpan, Int32)
Prepare an audio file. This will be a single segment of a larger audio file, modified based on the analysisSettings.
Declaration
public async Task<FileSegment> PrepareFile(DirectoryInfo outputDirectory, string source, string outputMediaType, TimeSpan startOffset, TimeSpan endOffset, int targetSampleRateHz)
Parameters
Type | Name | Description |
---|---|---|
Directory |
outputDirectory | The analysis Base Directory. |
String | source | The source audio file. |
String | outputMediaType | The output Media Type. |
Time |
startOffset | The start Offset from start of entire original file. |
Time |
endOffset | The end Offset from start of entire original file. |
Int32 | targetSampleRateHz | The target Sample Rate Hz. |
Returns
Type | Description |
---|---|
Task<File |
The prepared file. The returned FileSegment will have the targetFile and OriginalFileDuration set - these are the path to the segmented file and the duration of the segmented file. The start and end offsets will not be set. |
PrepareFile<TSource>(DirectoryInfo, ISegment<TSource>, String, Nullable<Int32>, DirectoryInfo, Int32[], Nullable<Boolean>)
Prepare an audio file. This will be a single segment of a larger audio file, modified based on the analysisSettings.
Declaration
public async Task<FileSegment> PrepareFile<TSource>(DirectoryInfo outputDirectory, ISegment<TSource> source, string outputMediaType, int? targetSampleRateHz, DirectoryInfo temporaryFilesDirectory, int[] channelSelection, bool? mixDownToMono)
Parameters
Type | Name | Description |
---|---|---|
Directory |
outputDirectory | The analysis Base Directory. |
ISegment<TSource> | source | The source audio file. |
String | outputMediaType | The output Media Type. |
Nullable<Int32> | targetSampleRateHz | The target Sample Rate Hz. |
Directory |
temporaryFilesDirectory | |
Int32[] | channelSelection | |
Nullable<Boolean> | mixDownToMono |
Returns
Type | Description |
---|---|
Task<File |
The prepared file. The returned FileSegment will have the targetFile and OriginalFileDuration set - these are the path to the segmented file and the duration of the segmented file. The start and end offsets will not be set. |
Type Parameters
Name | Description |
---|---|
TSource |