MLAudioType
class NatML.Types.MLAudioType : MLArrayType
The audio type describes audio buffers.
Creating the Type
The audio type can be created with audio information, or by inspecting an audio or video file:
From Audio Info
/// <summary>
/// Create an audio feature type.
/// <summary>
/// <param name="sampleRate">Sample rate</param>
/// <param name="channelCount">Channel count</param>
/// <param name="sampleCount">Total sample count.</param>
/// <param name="name">Feature name.</param>
MLAudioType (int sampleRate, int channelCount, int sampleCount, string name = default);The audio type can be created with a sampleRate, channelCount, total sampleCount, and optional name.
From an Audio File
/// <summary>
/// Get the audio type for an audio file at a given path.
/// </summary>
/// <param name="path">Audio path.</param>
/// <returns>Corresponding audio type or `null` if the file is not a valid audio file.</returns>
static MLAudioType FromFile (string path);INCOMPLETE.
From an AudioClip
AudioClipINCOMPLETE.
From a VideoClip
VideoClipINCOMPLETE.
From Streaming Assets
INCOMPLETE.
Inspecting the Type
Refer to the MLFeatureType class for more information.
Inspecting the Format
Sample Rate
The audio type provides information about the audio feature's sample rate.
Channel Count
The audio type provides information about the audio feature's channel count.
Last updated
Was this helpful?