WhatsApp Voice Messages let WhatsApp users interact with your Agentforce agent using voice instead of text. Agentforce transcribes voice messages to text, processes them like typed messages, and automatically replies in the same format used for each message. WhatsApp users can switch between voice and text throughout the same conversation.
How Voice Messages Work
When a WhatsApp user sends a voice message, Agentforce processes it in these steps.
- Downloads the audio file and transcribes it to text through the Einstein Trust Layer.
- Processes the transcribed text using the agent's reasoning engine.
- Generates a response.
- Sends the response as:
- A voice message when voice replies are turned on.
- A text message, or another available response format, when voice replies aren't turned on.
How Voice and Text Replies Work
When voice replies are turned on, Agentforce automatically replies in the same format as each incoming message: a voice message in gets a voice message out, a text message in gets a text message out.
| WhatsApp user message | Agent response |
|---|---|
| Voice message | Voice message (when voice replies are turned on) |
| Voice message | Text message (when voice replies are turned off) |
WhatsApp users can switch between voice and text during the conversation, and Agentforce matches the reply type for each turn. There's no setting to make the agent always respond with voice.
If voice replies are turned off, the agent can still transcribe and process incoming voice messages but responds with text.
File Formats and Limits
Voice messages support the following file formats and limits.
| Property | WhatsApp user to Agent | Agent to WhatsApp user |
|---|---|---|
| Audio format | OGG (audio/ogg) | OGG (audio/ogg) |
| File size | Up to 2 MB | Up to 5 MB |
| Duration | About 1 minute | About 1 minute |
Voice messages use the OGG audio format with the audio/ogg MIME type. Supported file
extensions are .ogg, .oga, and .ogx.
If a voice message exceeds the supported file size or duration limits, Agentforce doesn't process it.
Voice messages support the following text limits.
| Property | WhatsApp user to Agent | Agent to WhatsApp user |
|---|---|---|
| Text length | 2,000 characters after transcription | 3,000 characters before speech synthesis |
If an agent response exceeds the supported text length, Agentforce sends the response as text instead of voice.
Considerations and Limitations
- Response time
-
Voice messages take longer to process than text messages because Agentforce transcribes the incoming audio and generates speech for the response. Typical response time is 12-17 seconds. Longer agent responses can take more than 20 seconds. Keep agent responses concise to reduce response time.
- Audio quality
-
Voice transcription and speech synthesis depend on audio quality. Background noise, long periods of silence, or unclear speech can reduce transcription accuracy. If Agentforce can't accurately transcribe a voice message, it asks the WhatsApp user to repeat the message or send it as text.
- Channel support
-
Voice messages work only on WhatsApp. Other messaging channels don't support voice messages.
- Language detection
-
Keep each conversation in a single language that matches the language the WhatsApp user uses and the language configured for the agent. Switching languages during a session can affect language detection for subsequent replies.
- Subagent language configuration
-
If your agent uses subagents, configure each subagent to use the same language as the agent. If a subagent responds in a different language, the agent uses its configured language for the voice reply, which can result in incorrect pronunciation or an unintended accent.
For example, if an English-language agent uses a subagent configured for Spanish, the agent can pronounce the subagent's Spanish response using English pronunciation.
- Agent requirements
-
Your agent must be created in Agentforce Builder and use the Atlas reasoning engine. Agents created in the legacy builder aren't supported.
- Escalation messages
-
When a conversation is successfully handed off to a human agent, the handoff message matches the WhatsApp user's input format. If the WhatsApp user sent a voice message, the handoff message is sent as voice. If the WhatsApp user sent a text message, the handoff message is sent as text. If the handoff fails, the message is always sent as text.
- Voice rendering on WhatsApp
-
Voice replies appear as audio attachments rather than voice messages because of WhatsApp format requirements.
- Turn-matched replies
-
Agentforce responds with a voice message only when the WhatsApp user sends a voice message. Text messages receive text responses. You can't configure the agent to always respond with voice.
- Transcript-based reasoning
-
Agentforce reasons over the transcribed text, not the original audio. It doesn't interpret tone, emotion, background sounds, or other non-speech cues.
- Voice message limits
-
WhatsApp users can send one voice message per conversation turn. Multiple voice messages in the same message aren't supported.
- Multimodal inputs
-
Voice messages support audio only. Images, files, and other multimodal inputs aren't supported in the same message.
- Data processing
-
Voice message transcription and speech synthesis use Agentforce Speech Foundations. For information about how your data is processed, see Infrastructure and Sub-processors.