AudioAsset
class VideoKit.Assets.AudioAsset : MediaAsset
An AudioAsset
refers to an encoded audio file.
Creating an Audio Asset
Audio assets can be created from files or audio clips using the MediaAsset
factory methods.
From a File
An audio asset can be created using the MediaAsset.FromFile
method. The path
should point to any encoded audio file.
From an Audio Clip
An audio asset can be created using the MediaAsset.FromAudioClip
method.
Inspecting the Audio Format
The AudioAsset
reports the audio format of the audio file it refers to:
Audio Sample Rate
The AudioAsset
reports the audio sampleRate
is specified in Hertz.
Audio Channel Count
The AudioAsset
reports the number of channels in the audio file.
Audio Duration
The AudioAsset
reports the duration of the audio file in seconds.
Generating Audio Captions
The AudioAsset
can generate captions of the audio file, allowing you to do things like speech-to-text.
This requires an active VideoKit AI plan.
Last updated