# Use Paxa with LibreChat

Read LibreChat replies aloud in English, Thai, and Mandarin, and transcribe what users say, by pointing LibreChat's OpenAI speech providers at Paxa.

Give LibreChat replies a voice that speaks English, Thai, and Mandarin, mixed sentences included, and let your users talk to their chats. LibreChat's OpenAI speech providers connect to Paxa from `librechat.yaml`.

## Add Paxa to librechat.yaml

Put your Paxa API key in LibreChat's `.env` file.

.env:

```bash
TTS_API_KEY=pxa_your_key_here
STT_API_KEY=pxa_your_key_here
```

Then add the speech section to `librechat.yaml` and restart LibreChat.

librechat.yaml:

```yaml
speech:
  tts:
    openai:
      url: 'https://api.paxalabs.com/v1/audio/speech'
      apiKey: '${TTS_API_KEY}'
      model: 'paxa-tts-flash-v2'
      voices: ['khanomkrok', 'nomyen', 'foithong']
  stt:
    openai:
      url: 'https://api.paxalabs.com/v1/audio/transcriptions'
      apiKey: '${STT_API_KEY}'
      model: 'paxa-stt-lite-v1-preview'
```

- Set `url` to the full endpoint path, as in the sample.
- List the voices your users can pick under `voices`. Any voice id from [GET /v1/voices](https://paxalabs.com/docs/api/voices) whose model is `paxa-tts-flash-v2` works.
- Keep one provider under each of `speech.tts` and `speech.stt`, and remove any other.
- OpenAI's model and voice names, such as `tts-1` and `alloy`, also work ([accepted voice names](https://paxalabs.com/docs/accepted-voice-names)).

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

## Turn it on for your users

Each user picks the speech engines in the speech tab of their own settings. To make Paxa the default for everyone, set `engineTTS` under `speech.speechTab.textToSpeech` and `engineSTT` under `speech.speechTab.speechToText` to `external`, and set `voice` under `speech.speechTab.textToSpeech` to a voice from your list.

Field names can differ between LibreChat versions. LibreChat's [speech settings page](https://www.librechat.ai/docs/configuration/stt_tts) documents the current ones.
