Skip to content

AudioFormat

Namespace: Vercel.AI.Operations

public sealed class AudioFormat

The format of raw input audio. Maps to SharedV4AudioFormat.

Inheritance: object

View source

public AudioFormat(string type, double? rate = null)

Creates an audio format.

Parameters

Name Type Description
type string
rate double?

View source

public double? Rate { get; }

Sample rate in Hz, when the format needs one.

Value: double?

View source

public string Type { get; }

Media type of the audio, such as audio/pcm.

Value: string

View source

public static implicit operator AudioFormat(string type)

Creates a format with no sample rate.

Parameters

Name Type Description
type string

Returns: AudioFormat

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product