pub struct ServerMessageVoiceRequest {
pub phone_number: Option<ClientMessageWorkflowNodeStartedPhoneNumber>,
pub type: TypeTrue,
pub timestamp: Option<f64>,
pub artifact: Option<Artifact>,
pub assistant: Option<CreateAssistantDto>,
pub customer: Option<CreateCustomerDto>,
pub call: Option<Call>,
pub chat: Option<Chat>,
pub text: String,
pub sample_rate: f64,
}
Fields§
§phone_number: Option<ClientMessageWorkflowNodeStartedPhoneNumber>
§type: TypeTrue
This is the type of the message. "voice-request" is sent when using assistant.voice={ \"type\": \"custom-voice\" }
. Here is what the request will look like: POST https://{assistant.voice.server.url} Content-Type: application/json { "messsage": { "type": "voice-request", "text": "Hello, world!", "sampleRate": 24000, …other metadata about the call… } } The expected response is 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); });
timestamp: Option<f64>
This is the timestamp of the message.
artifact: Option<Artifact>
This is a live version of the call.artifact
. This matches what is stored on call.artifact
after the call.
assistant: Option<CreateAssistantDto>
This is the assistant that the message is associated with.
customer: Option<CreateCustomerDto>
This is the customer that the message is associated with.
call: Option<Call>
This is the call that the message is associated with.
chat: Option<Chat>
This is the chat object.
text: String
This is the text to be synthesized.
sample_rate: f64
This is the sample rate to be synthesized.
Implementations§
Trait Implementations§
Source§impl Clone for ServerMessageVoiceRequest
impl Clone for ServerMessageVoiceRequest
Source§fn clone(&self) -> ServerMessageVoiceRequest
fn clone(&self) -> ServerMessageVoiceRequest
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more