# tfio.audio.encode_mp3

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/ops/audio_ops.py#L596-L607) |

Encode MP3 audio into string.

    tfio.audio.encode_mp3(
        input, rate, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input` | A `Tensor` of the audio input. |
| `rate` | The sample rate of the audio. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `output` | Encoded audio. |

<br />