Table of Contents

Class VoiceRefObject

Namespace
Mabs.AudioCpp.Models
Assembly
AudioCpp.dll

A voice_ref object: {"type":"path","path":…} or {"type":"base64","data":…} (decoded payload limited to 5 MiB by the server). Plain server-local path strings are also accepted by the wire; see VoiceRef.

public sealed class VoiceRefObject
Inheritance
VoiceRefObject
Inherited Members

Properties

Data

Base64 payload; set when Type is base64.

public string? Data { get; set; }

Property Value

string

Path

Server-local path; set when Type is path.

public string? Path { get; set; }

Property Value

string

Type

path or base64.

public string Type { get; set; }

Property Value

string

Methods

FromBase64(string)

Creates an inline Base64 WAV reference (bare Base64 or a data-URI; a data-URI is also accepted by the server).

public static VoiceRefObject FromBase64(string data)

Parameters

data string

Base64 text.

Returns

VoiceRefObject

The reference.

FromBytes(byte[])

Creates an inline reference from WAV bytes.

public static VoiceRefObject FromBytes(byte[] wavBytes)

Parameters

wavBytes byte[]

WAV bytes to Base64-encode.

Returns

VoiceRefObject

The reference.

FromPath(string)

Creates a server-local path reference.

public static VoiceRefObject FromPath(string path)

Parameters

path string

Server-local WAV path.

Returns

VoiceRefObject

The reference.