# openai_speech

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: openai_speech
latest-connect-version: 4.93.0
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-redpanda-tag: v26.1.9
docname: processors/openai_speech
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: processors/openai_speech.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/processors/openai_speech.adoc
page-git-created-date: "2024-08-15"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/connect/components/processors/openai_speech.md -->

**Available in:** [Cloud](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/openai_speech/%20%22View%20the%20Cloud%20version%20of%20this%20component%22), Self-Managed

Generates audio from a text description and other attributes, using OpenAI API.

Introduced in version 4.32.0.

#### Common

```yml
processors:
  label: ""
  openai_speech:
    server_address: https://api.openai.com/v1
    api_key: "" # No default (required)
    model: "" # No default (required)
    input: "" # No default (optional)
    voice: "" # No default (required)
```

#### Advanced

```yml
processors:
  label: ""
  openai_speech:
    server_address: https://api.openai.com/v1
    api_key: "" # No default (required)
    model: "" # No default (required)
    input: "" # No default (optional)
    voice: "" # No default (required)
    response_format: "" # No default (optional)
```

This processor sends a text description and other attributes, such as a voice type and format to the OpenAI API, which generates audio. By default, the processor submits the entire payload of each message as a string, unless you use the `input` configuration field to customize it.

To learn more about turning text into spoken audio, see the [OpenAI API documentation](https://platform.openai.com/docs/guides/text-to-speech).

## [](#fields)Fields

### [](#api_key)`api_key`

The API key for OpenAI API.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Secrets](https://docs.redpanda.com/connect/configuration/secrets/).

**Type**: `string`

### [](#input)`input`

A text description of the audio you want to generate. The `input` field accepts a maximum of 4096 characters.

**Type**: `string`

### [](#model)`model`

The name of the OpenAI model to use.

**Type**: `string`

```yaml
# Examples:
model: tts-1

# ---

model: tts-1-hd
```

### [](#response_format)`response_format`

The format to generate audio in. Default is `mp3`. This field supports [interpolation functions](https://docs.redpanda.com/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

```yaml
# Examples:
response_format: mp3

# ---

response_format: opus

# ---

response_format: aac

# ---

response_format: flac

# ---

response_format: wav

# ---

response_format: pcm
```

### [](#server_address)`server_address`

The Open API endpoint that the processor sends requests to. Update the default value to use another OpenAI compatible service.

**Type**: `string`

**Default**: `[https://api.openai.com/v1](https://api.openai.com/v1)`

### [](#voice)`voice`

The type of voice to use when generating the audio. This field supports [interpolation functions](https://docs.redpanda.com/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

```yaml
# Examples:
voice: alloy

# ---

voice: echo

# ---

voice: fable

# ---

voice: onyx

# ---

voice: nova

# ---

voice: shimmer
```