Class VoiceRefObject
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
Path
Server-local path; set when Type is path.
public string? Path { get; set; }
Property Value
Type
path or base64.
public string Type { get; set; }
Property Value
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
datastringBase64 text.
Returns
- VoiceRefObject
The reference.
FromBytes(byte[])
Creates an inline reference from WAV bytes.
public static VoiceRefObject FromBytes(byte[] wavBytes)
Parameters
wavBytesbyte[]WAV bytes to Base64-encode.
Returns
- VoiceRefObject
The reference.
FromPath(string)
Creates a server-local path reference.
public static VoiceRefObject FromPath(string path)
Parameters
pathstringServer-local WAV path.
Returns
- VoiceRefObject
The reference.