Is there a way to add a pause before the assistant...
# support
j
Is there a way to: 1. Add a delay before the assistant starts speaking at the beginning of the call with
firstMessageMode
set to
assistant-speaks-first
? 2. Or with
assistant-waits-for-user
mode, if the user does not respond within a certain number of seconds, the assistant starts speaking automatically? https://cdn.discordapp.com/attachments/1343915991670853654/1343915991821975663/image.png?ex=67bf02cd&is=67bdb14d&hm=20b0ba58145e394f0aa0df0072e502d8c888b2b87d006689c46ca4872666416d&
@User
s
1. Adding delay before assistant starts speaking at call start: Yes, there are two ways to achieve this: a. Using startSpeakingPlan.waitSeconds: const assistant: CreateAssistantDTO = { firstMessageMode: 'assistant-speaks-first', startSpeakingPlan: { waitSeconds: 2 // Waits 2 seconds before speaking } // ... other configurations };
Copy code
This is documented as:

   * This is how long assistant waits before speaking. Defaults to 0.4.
   *
   * This is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.
   *
   * Example:
   * - If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.
   *
   * Usage:
   * - If the customer is taking long pauses, set this to a higher value.
   * - If the assistant is accidentally jumping in too much, set this to a higher value.
   *
   * @default 0.4
   */
2. For assistant-waits-for-user mode with auto-speak timeout: You can use the silenceTimeoutSeconds and messagePlan.silenceTimeoutMessage configuration: const assistant: CreateAssistantDTO = { firstMessageMode: 'assistant-waits-for-user', silenceTimeoutSeconds: 15, // Will timeout after 15 seconds of silence messagePlan: { silenceTimeoutMessage: "Hello! I noticed you haven't said anything. How can I help you today?" } // ... other configurations }; This is documented as: * How many seconds of silence to wait before ending the call. Defaults to 30. * * @default 30 */ @IsOptional() @IsNumberWithHelpfulError() @Max(3600) @Min(10) @ApiPropertyOptional({ example: 30 }) silenceTimeoutSeconds?: number; ** Why this is the right solution:** 1. startSpeakingPlan.waitSeconds is specifically designed for controlling speech timing 2. silenceTimeoutSeconds with silenceTimeoutMessage provides a graceful fallback for when users don't respond Let me know if you need any clarification or have additional questions!
j
if i set the startSpeakingPlan.waitSeconds to 2 seconds for example it waits for 2 seconds every time the user stop speaking, I want this delay only at the beginning of the call
k
Hey JollyMask, yes, if you add a wait of 2 seconds, it will wait for 2 seconds before sending it to the LLM for processing. In case you only want it at the beginning of the call, you can use custom endpointing rules where it uses regex on either user or assistant speech to wait for configured seconds. Let me know if you require further help or you have more questions. Feel free to ask.
b
@JollyMask I don't know if you were able to fix this but I solved this by using ElevenLabs for the voice synth and adding at the beginning of the first message.
j
I'll try thank you
k
Hey JollyMask, checking if this is resolved for you.
11 Views