Skip to content

VoiceAudioFormats

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The audio formats that the client can send.

public static class VoiceAudioFormats

objectVoiceAudioFormats

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Both are supported. The default is VoiceAudioFormats.WebmOpus: every browser can produce it with MediaRecorder, its bandwidth is low, and the concatenated chunks form a valid file.

The AudioWorklet output: raw 16-bit little-endian PCM, mono.

public const string Pcm16 = "pcm16"

string

Raw PCM has no header and is not a valid file on its own. Before the audio goes to the transcription provider the server writes a WAV header.

The MediaRecorder output: Opus in a WebM container.

public const string WebmOpus = "webm-opus"

string

Determines whether the format is known.

public static bool IsKnown(string? format)

format string?

The format name; an empty value means the default.

bool

true when the format is known.