# Personaplex

> PersonaPlex is a real-time, full-duplex speech-to-speech conversational model that enables persona control through text-based role prompts and audio-based voice conditioning.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/personaplex`
- **Model ID**: `fal-ai/personaplex`
- **Category**: audio-to-audio
- **Kind**: inference
**Tags**: audio



## Pricing

You will be charged **$0.001** per audio second

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _optional_):
  Text prompt describing the AI persona and conversation context. Default value: `"You are a wise and friendly teacher. Answer questions or provide advice in a clear and engaging way."`
  - Default: `"You are a wise and friendly teacher. Answer questions or provide advice in a clear and engaging way."`
  - Examples: "You work for SwiftPlex Appliances which is a appliance repair company and your name is Farhod Toshmatov. Information: The dishwasher model is out of stock for replacement parts; we can use an alternative part with a 3-day delay. Labor cost remains $60 per hour."

- **`voice`** (`VoiceEnum`, _optional_):
  Voice ID for the AI response. NAT = natural, VAR = variety. F = female, M = male. Ignored when voice_audio_url is provided. Default value: `"NATF2"`
  - Default: `"NATF2"`
  - Options: `"NATF0"`, `"NATF1"`, `"NATF2"`, `"NATF3"`, `"NATM0"`, `"NATM1"`, `"NATM2"`, `"NATM3"`, `"VARF0"`, `"VARF1"`, `"VARF2"`, `"VARF3"`, `"VARF4"`, `"VARM0"`, `"VARM1"`, `"VARM2"`, `"VARM3"`, `"VARM4"`

- **`voice_audio_url`** (`string`, _optional_):
  URL to a voice sample audio for on-the-fly voice cloning. When provided, the AI responds in the cloned voice instead of the preset 'voice'. 10+ seconds of clear speech recommended. Billed at 2x rate.

- **`temperature_audio`** (`float`, _optional_):
  Audio sampling temperature. Higher values produce more diverse outputs. Default value: `0.8`
  - Default: `0.8`
  - Range: `0` to `2`

- **`temperature_text`** (`float`, _optional_):
  Text sampling temperature. Higher values produce more diverse outputs. Default value: `0.7`
  - Default: `0.7`
  - Range: `0` to `2`

- **`top_k_audio`** (`integer`, _optional_):
  Top-K sampling for audio tokens. Default value: `250`
  - Default: `250`
  - Range: `1` to `2048`

- **`top_k_text`** (`integer`, _optional_):
  Top-K sampling for text tokens. Default value: `25`
  - Default: `25`
  - Range: `1` to `1000`

- **`seed`** (`integer`, _optional_):
  Random seed for reproducibility.

- **`audio_url`** (`string`, _required_):
  URL to the input audio file (user's speech).
  - Examples: "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav"



**Required Parameters Example**:

```json
{
  "audio_url": "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav"
}
```

**Full Example**:

```json
{
  "prompt": "You work for SwiftPlex Appliances which is a appliance repair company and your name is Farhod Toshmatov. Information: The dishwasher model is out of stock for replacement parts; we can use an alternative part with a 3-day delay. Labor cost remains $60 per hour.",
  "voice": "NATF2",
  "temperature_audio": 0.8,
  "temperature_text": 0.7,
  "top_k_audio": 250,
  "top_k_text": 25,
  "audio_url": "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav"
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated AI response audio (WAV, 24kHz).
  - Examples: "https://v3b.fal.media/files/b/0a8dd5a4/9vFUMdauY7vobpLtXq4Np_output.wav"

- **`text`** (`string`, _required_):
  Transcribed text of the AI's response.
  - Examples: " Thank you for calling SwiftPlex Appliances. This is Farhod, how can I help you today? I understand your concern. The replacement part is out of stock, so we can't ship it right away. We can use an alternative part that will arrive in 3 days. Would you like to proceed with that?"

- **`duration`** (`float`, _required_):
  Duration of the generated audio in seconds.
  - Examples: 20

- **`seed`** (`integer`, _required_):
  The seed used for generation.
  - Examples: 60112277



**Example Response**:

```json
{
  "audio": "https://v3b.fal.media/files/b/0a8dd5a4/9vFUMdauY7vobpLtXq4Np_output.wav",
  "text": " Thank you for calling SwiftPlex Appliances. This is Farhod, how can I help you today? I understand your concern. The replacement part is out of stock, so we can't ship it right away. We can use an alternative part that will arrive in 3 days. Would you like to proceed with that?",
  "duration": 20,
  "seed": 60112277
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/personaplex \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "audio_url": "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/personaplex",
    arguments={
        "audio_url": "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/personaplex", {
  input: {
    audio_url: "https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/personaplex)
- [API Documentation](https://fal.ai/models/fal-ai/personaplex/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/personaplex)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
