pub struct CustomVoice {
pub caching_enabled: Option<bool>,
pub provider: ProviderTrue,
pub chunk_plan: Option<ChunkPlan>,
pub server: Server,
pub fallback_plan: Option<FallbackPlan>,
}Fields§
§caching_enabled: Option<bool>This is the flag to toggle voice caching for the assistant.
provider: ProviderTrueThis is the voice provider that will be used. Use custom-voice for providers that are not natively supported.
chunk_plan: Option<ChunkPlan>This is the plan for chunking the model output before it is sent to the voice provider.
server: ServerThis is where the voice request will be sent. Request Example: POST https://{server.url} Content-Type: application/json { "message": { "type": "voice-request", "text": "Hello, world!", "sampleRate": 24000, …other metadata about the call… } } Response Expected: 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport: response.on('data', (chunk: Buffer) => { outputStream.write(chunk); });
fallback_plan: Option<FallbackPlan>This is the plan for voice provider fallbacks in the event that the primary voice provider fails.
Implementations§
Source§impl CustomVoice
impl CustomVoice
pub fn new(provider: ProviderTrue, server: Server) -> CustomVoice
Trait Implementations§
Source§impl Clone for CustomVoice
impl Clone for CustomVoice
Source§fn clone(&self) -> CustomVoice
fn clone(&self) -> CustomVoice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CustomVoice
impl Debug for CustomVoice
Source§impl Default for CustomVoice
impl Default for CustomVoice
Source§fn default() -> CustomVoice
fn default() -> CustomVoice
Source§impl<'de> Deserialize<'de> for CustomVoice
impl<'de> Deserialize<'de> for CustomVoice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CustomVoice
impl PartialEq for CustomVoice
Source§fn eq(&self, other: &CustomVoice) -> bool
fn eq(&self, other: &CustomVoice) -> bool
self and other values to be equal, and is used by ==.