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: ProviderTrue
This 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: 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<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 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more