# Using Kokoro TTS

Navigate to [Kokoro TTS GitHub repository](https://github.com/hexgrad/kokoro).

### Setting Up Kokoro TTS Server

#### Clone the Repository

```bash
git clone https://github.com/flukexp/kokoro-tts.git
cd kokoro-tts
```

#### Create a Virtual Environment

```bash
python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
```

#### Install Dependencies

```bash
pip install -r requirements.txt
```

### Running the Server

#### Start the FastAPI Server

```bash
python server.py
```

### Make sure Kokoro is enabled for TTS:

```bash
Settings -> Text-to-Speech -> TTS Backend -> Kokoro
```

### Set the voice

```bash
Settings -> Text-to-Speech -> Kokoro -> Voice
```

### Using Kokoro with OpenAI TTS

You can use Kokoro by choosing OpenAI and configuring your Kokoro endpoint and voice.

#### Notes

* Kokoro TTS can be used as a local text-to-speech backend in your application.
* If you want to explore more models or functionalities, refer to the official [Kokoro TTS GitHub repository](https://github.com/hexgrad/kokoro).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.heyamica.com/connecting-speech-options-tts/using-kokoro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
