> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# OpenAI TTS voices

OpenAI, the organization that specializes in artificial intelligence researches, in addition to [ChatGPT](https://voximplant.com/docs/guides/integrations/chatgpt), provides realistic [text-to-speech voices](https://voximplant.com/docs/guides/speech/tts), that you can use *easily* with your Voximplant application.

## Setup

The only requirement to use the Open AI voices with Voximplant applications is having [an Open AI account](https://platform.openai.com/) and have a working **API key**.

After you receive an API key, to use the voices, create [a URL player](https://voximplant.com/docs/references/voxengine/voxengine/createurlplayer) in your [VoxEngine scenario](/platform/voxengine/scenarios) and prepare a POST request as it is explained in the [Media players](https://voximplant.com/docs/guides/speech/media-player) guide.

Take a look at the following example with comments:

```javascript title="Using OpenAI TTS"
// prepare your openAI API key
const openaiApiKey = 'API_KEY';

// prepare the url player request and parameters
const urlPlayerRequest = {
  method: URLPlayerRequestMethod.POST,
  url: 'https://api.openai.com/v1/audio/speech',
  headers: [
    { name: 'Authorization', value: 'Bearer ' + openaiApiKey },
    { name: 'Content-Type', value: 'application/json' }
  ],
  body: {
    text: JSON.stringify({
      model: 'tts-1',
      input: 'Today is a wonderful day to build something people love!',
      voice: 'alloy'
    })
  }
};

const urlPlayerParameters = {
  progressivePlayback: true
};

// create the url player
player = VoxEngine.createURLPlayer(urlPlayerRequest, urlPlayerParameters);

// send the generated audio to the call
player.sendMediaTo(call);

```

To modify the voice parameters, modify the body of your URL player request according to the [OpenAI TTS documentation](https://platform.openai.com/docs/guides/text-to-speech).

## See also

* [Speech synthesis](https://voximplant.com/docs/guides/speech/tts)
* [Media players](https://voximplant.com/docs/guides/speech/media-player)