Search Results for

    Show / Hide Table of Contents

    Interface ISourcePreparer

    Interface for preparing source files.

    Namespace: AnalysisBase
    Assembly: AnalysisBase.dll
    Syntax
    public interface ISourcePreparer

    Methods

    | Improve this Doc View Source

    CalculateSegments<TSource>(IEnumerable<ISegment<TSource>>, AnalysisSettings)

    Calculate the file segments for analysis.

    Declaration
    IEnumerable<ISegment<TSource>> CalculateSegments<TSource>(IEnumerable<ISegment<TSource>> fileSegments, AnalysisSettings settings)
    Parameters
    Type Name Description
    IEnumerable<ISegment<TSource>> fileSegments

    The file segments.

    AnalysisSettings settings

    The settings.

    Returns
    Type Description
    IEnumerable<ISegment<TSource>>

    Enumerable of file segments.

    Type Parameters
    Name Description
    TSource
    Remarks

    This API does not fit with the other two. We should consider factoring it out.

    | Improve this Doc View Source

    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
    Task<FileSegment> PrepareFile(DirectoryInfo outputDirectory, string source, string outputMediaType, TimeSpan startOffset, TimeSpan endOffset, int targetSampleRateHz)
    Parameters
    Type Name Description
    DirectoryInfo outputDirectory

    The analysis Base Directory.

    String source

    The source audio file.

    String outputMediaType

    The output Media Type.

    TimeSpan startOffset

    The start Offset from start of entire original file.

    TimeSpan endOffset

    The end Offset from start of entire original file.

    Int32 targetSampleRateHz

    The target Sample Rate Hz.

    Returns
    Type Description
    Task<FileSegment>

    The prepared file.

    | Improve this Doc View Source

    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
    Task<FileSegment> PrepareFile<TSource>(DirectoryInfo outputDirectory, ISegment<TSource> source, string outputMediaType, int? targetSampleRateHz, DirectoryInfo temporaryFilesDirectory, int[] channelSelection, bool? mixDownToMono)
    Parameters
    Type Name Description
    DirectoryInfo 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.

    DirectoryInfo temporaryFilesDirectory

    The directory for temporary files.

    Int32[] channelSelection
    Nullable<Boolean> mixDownToMono
    Returns
    Type Description
    Task<FileSegment>

    The prepared file.

    Type Parameters
    Name Description
    TSource

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top