# Use Paxa with AnythingLLM

Read AnythingLLM replies aloud in English, Thai, and Mandarin, dictate prompts, and transcribe uploaded recordings, through AnythingLLM's OpenAI-compatible providers.

Give AnythingLLM a voice that speaks English, Thai, and Mandarin, mixed sentences included. Paxa can also transcribe the prompts you dictate and the audio and video files you upload to a workspace.

Each feature has its own provider setting, and each takes the same base URL and API key. Menu and field names can differ between AnythingLLM versions.

## Read replies aloud

Open Settings > Voice & Speech. Under Text-to-speech Preference, choose OpenAI Compatible, set these fields, and save.

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

Left empty, the model and voice fall back to `tts-1` and `alloy`, which Paxa also accepts ([accepted voice names](https://paxalabs.com/docs/accepted-voice-names)). Any voice id from [GET /v1/voices](https://paxalabs.com/docs/api/voices) whose model is `paxa-tts-flash-v2` works.

## Dictate prompts

On the same page, under Speech-to-text Preference, choose Generic OpenAI and set these fields.

| Field | Value |
| --- | --- |
| Base URL | `https://api.paxalabs.com/v1` |
| API Key | Your Paxa API key |
| Transcription Model | `paxa-stt-lite-v1-preview` |

## Transcribe uploaded audio and video

Open Settings > Transcription, choose OpenAI Compatible, and set the same three fields: Base URL, API Key, and Transcription Model.

Set the model here. Left empty, AnythingLLM sends `whisper-small`, which Paxa answers with [400 unknown_model](https://paxalabs.com/docs/errors#unknown_model).

Paxa STT Lite is a Research preview, and a recording can run up to 60 minutes and 25 MiB.

## Set it with environment variables

To configure a Docker or bare-metal deployment, set these variables in AnythingLLM's `.env` file.

.env:

```bash
# Text to speech
TTS_PROVIDER="generic-openai"
TTS_OPEN_AI_COMPATIBLE_ENDPOINT="https://api.paxalabs.com/v1"
TTS_OPEN_AI_COMPATIBLE_KEY=pxa_your_key_here
TTS_OPEN_AI_COMPATIBLE_MODEL=paxa-tts-flash-v2
TTS_OPEN_AI_COMPATIBLE_VOICE_MODEL=khanomkrok

# Voice input in chat
STT_PROVIDER="generic-openai"
STT_OPEN_AI_COMPATIBLE_ENDPOINT="https://api.paxalabs.com/v1"
STT_OPEN_AI_COMPATIBLE_KEY=pxa_your_key_here
STT_OPEN_AI_COMPATIBLE_MODEL=paxa-stt-lite-v1-preview

# Uploaded audio and video
WHISPER_PROVIDER="generic-openai"
WHISPER_GENERIC_OPEN_AI_BASE_URL="https://api.paxalabs.com/v1"
WHISPER_GENERIC_OPEN_AI_API_KEY=pxa_your_key_here
WHISPER_GENERIC_OPEN_AI_MODEL=paxa-stt-lite-v1-preview
```
