# Use Paxa with Open WebUI

Read Open WebUI chat replies aloud in English, Thai, and Mandarin, and dictate messages, through Open WebUI's built-in OpenAI audio engines.

Give your Open WebUI chats a voice that speaks English, Thai, and Mandarin, mixed sentences included, and dictate messages by voice.

Open WebUI's built-in OpenAI engines for text to speech and speech to text connect to Paxa with a base URL and an API key. Both live under Admin Panel > Settings > Audio. Menu and field names can differ between Open WebUI versions.

## Read replies aloud

Under Text-to-Speech, set these fields and click Save.

| Field | Value |
| --- | --- |
| Text-to-Speech Engine | `OpenAI` |
| API Base URL | `https://api.paxalabs.com/v1` |
| API Key | Your Paxa API key |
| TTS Model | `paxa-tts-flash-v2` |
| TTS Voice | A Paxa voice id, such as `khanomkrok` |

Choosing the OpenAI engine fills in `tts-1` and `alloy`. Both work on Paxa, and `alloy` speaks in a Paxa voice ([accepted voice names](https://paxalabs.com/docs/accepted-voice-names)). Set your own model and voice to choose the voice that speaks.

The TTS Voice suggestions list the Paxa TTS Flash v2 voices, which Open WebUI reads from [GET /v1/audio/voices](https://paxalabs.com/docs/api/audio-voices), and the TTS Model suggestions list `paxa-tts-flash-v2` from [GET /v1/audio/models](https://paxalabs.com/docs/api/audio-models). A voice set on a model, or in a user's own settings, takes priority over this default. Change those too if a chat keeps an old voice.

Leave Additional Parameters empty. Open WebUI sends no `response_format`, and Paxa answers with MP3. To test, play any reply with the speaker icon under it.

## Dictate messages

Under Speech-to-Text, set these fields and click Save.

| Field | Value |
| --- | --- |
| Speech-to-Text Engine | `OpenAI` |
| API Base URL | `https://api.paxalabs.com/v1` |
| API Key | Your Paxa API key |
| Request Format | `Multipart Upload` |
| STT Model | `paxa-stt-lite-v1-preview` |

STT Model starts empty, and a request without a model answers 400. Paxa does not accept the JSON Base64 request format. Paxa STT Lite is a Research preview, and a recording can run up to 60 minutes and 25 MiB. To test, click the microphone in the message box and speak.

## Set it with environment variables

To configure a deployment, set these variables on the Open WebUI container.

.env:

```bash
AUDIO_TTS_ENGINE=openai
AUDIO_TTS_OPENAI_API_BASE_URL=https://api.paxalabs.com/v1
AUDIO_TTS_OPENAI_API_KEY=pxa_your_key_here
AUDIO_TTS_MODEL=paxa-tts-flash-v2
AUDIO_TTS_VOICE=khanomkrok
AUDIO_STT_ENGINE=openai
AUDIO_STT_OPENAI_API_BASE_URL=https://api.paxalabs.com/v1
AUDIO_STT_OPENAI_API_KEY=pxa_your_key_here
AUDIO_STT_MODEL=paxa-stt-lite-v1-preview
```

Open WebUI reads these variables on its first start. After that, settings saved in the Admin Panel take precedence, unless `ENABLE_PERSISTENT_CONFIG` is set to `false`.

## When speech or dictation fails

Open WebUI shows a generic message, such as a server connection error, when Paxa refuses a request. [Send the same request with curl](https://paxalabs.com/docs/integrations#check) to read the cause. Look first for a mistyped model or voice, an old voice set on a model or a user, and anything in Additional Parameters.
