ImportError: Datasets needs to be installed if not passing speaker embeddings.
### System Info

- `transformers` version: 4.29.0
- Platform: macOS-13.3.1-arm64-arm-64bit
- Python version: 3.10.10
- Huggingface_hub version: 0.14.1
- Safetensors version: 0.3.1
- PyTorch version (GPU?): 2.0.0 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: NO
- Using distributed or parallel set-up in script?: NO

### Who can help?

@sanchit-gandhi ?

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Maybe not a bug but lacking documentation:

Following the simple exampe https://huggingface.co/docs/transformers/transformers_agents

```
from transformers import OpenAiAgent
from transformers import HfAgent
...
text="A beaver is swimming in the water"
audio=agent.run("Read the following text out loud", text=text)
```

```
==Explanation from the agent==
I will use the following  tool: `text_reader` to read the text out loud.


==Code generated by the agent==
audio = text_reader(text)


==Result==


│ /Users/me/.pyenv/versions/3.10.10/lib/python3.10/site-packages/transformers/tools/text_to_speech.py:52 in encode                                                                                 
│   50 │   │   if speaker_embeddings is None:                                                      │
│   51 │   │   │   if not is_datasets_available():                                                 │
│ ❱ 52 │   │   │   │   raise ImportError("Datasets needs to be installed if not passing speaker    │
```



@sanchit-gandhi ?

### Expected behavior

The example should work out of the box, or add information on how to download the required dataset in the documentation and error message.
Thanks @pannous! Indeed, we should show what are the requirements. The error you're getting is due to `datasets` not being installed.<|||||>This PR should fix it: https://github.com/huggingface/transformers/pull/23301