<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/tasks/python/audio/text_to_speech.py#L354-L408) |

Options for MediaPipe TextToSpeech task.

```python
mp.tasks.audio.TextToSpeechOptions(
    base_options: `mp.tasks.BaseOptions`,
    default_voice_id: str = '',
    default_locale: Optional[str] = None,
    speaking_rate: float = 1.0,
    target_bucket: int = 0,
    cache_dir: Optional[str] = None,
    *,
    cache_directory: Optional[str] = None
)
```

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `base_options` | Base options for the MediaPipe task (model path and delegate). |
| `default_voice_id` | Default speaker voice ID when not overridden per call. |
| `default_locale` | Default BCP-47 locale tag when not overridden per call; when `None`, the language is inferred from the selected voice. |
| `speaking_rate` | Playback speaking rate multiplier (`1.0` is normal speed). |
| `target_bucket` | Fixed phoneme token bucket length (`0` selects adaptive bucketing). |
| `cache_dir` | Optional directory path for compiled weight/program caches; `None` disables disk caching. |
| `cache_directory` | Deprecated alias for `cache_dir`. |

<br />

## Methods

### `__eq__`

```python
__eq__(
    other
)
```

Return self==value.

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| cache_dir | `None` |
| default_locale | `None` |
| default_voice_id | `''` |
| speaking_rate | `1.0` |
| target_bucket | `0` |

<br />