pub struct CustomVoice {
pub provider: Provider,
pub chunk_plan: Option<Box<ChunkPlan>>,
pub server: Box<Server>,
pub fallback_plan: Option<Box<FallbackPlan>>,
}Fields§
§provider: ProviderThis is the voice provider that will be used. Use custom-voice for providers that are not natively supported.
chunk_plan: Option<Box<ChunkPlan>>This is the plan for chunking the model output before it is sent to the voice provider.
server: Box<Server>This 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<Box<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: Provider, 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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more