# Conversation Text

Voice Agent

The `ConversationText` message is a JSON message that will be sent as a user interacts with the agent.

## Purpose

The `ConversationText` message facilitates real-time communication by relaying spoken statements from both the user and the assistant. This ensures that the conversation can be dynamically displayed on the client side, enhancing transparency and providing a clear, synchronized view of the interaction as it unfolds.

## Example Payload

The server will send a `ConversationText` message every time the agent hears the user say something, and every time the agent speaks something. These can be used on the client side to display the conversation messages as they happen in real-time.

**`JSON`**

```json JSON
{
  "type": "ConversationText",
  "role": "", // The speaker of this statement, either "user" or "assistant"
  "content": "" // The statement that was spoken
}
```

## Multilingual Fields (Flux Multilingual)

When the `listen.provider.model` is set to `flux-general-multi`, user-role `ConversationText` messages include two additional fields surfaced from the STT [TurnInfo](/guides/streaming-audio-flux-language-prompting#language-detection-in-turninfo-events) response:

| Field              | Type                  | Description                                                                 |
| ------------------ | --------------------- | --------------------------------------------------------------------------- |
| `languages_hinted` | string array (BCP-47) | The language hints that were active at the time of the turn.                |
| `languages`        | string array (BCP-47) | Languages detected in the user's speech, sorted by word count (descending). |

### Example

```json
{
  "type": "ConversationText",
  "role": "user",
  "content": "Hello, how are you amigo?",
  "languages_hinted": [
    "en",
    "es",
    "de"
  ],
  "languages": [
    "en",
    "es"
  ]
}
```

These fields allow your client to adapt downstream behavior — for example, selecting the correct TTS voice or LLM prompt language based on what the user actually spoke. For full details on language hints and detection, see [Flux Multilingual & Language Prompting](/guides/streaming-audio-flux-language-prompting).

## Related pages

- [Outputs: Server Events](./self-hosted-deployments-3-voice-agent-outputs.md)
- [Welcome](./self-hosted-deployments-3-voice-agent-welcome-message.md)
- [Settings Applied](./self-hosted-deployments-3-voice-agent-setting-applied-message.md)
- [User Started Speaking](./self-hosted-deployments-3-voice-agent-user-started-speaking.md)
- [Agent Thinking](./self-hosted-deployments-3-voice-agent-agent-thinking.md)
- [Function Call Cancelled](./self-hosted-deployments-3-voice-agent-function-call-cancelled.md)
- [Acknowledgements](./self-hosted-deployments-3-voice-agent-acknowledgements.md)
- [Agent Audio Done](./self-hosted-deployments-3-voice-agent-agent-audio-done.md)
- [Errors & Warnings](./self-hosted-deployments-3-voice-agent-errors-warnings.md)
- [Latency Report](./self-hosted-deployments-3-voice-agent-latency-report.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
