> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TTS (Text to Speech)

> Call /audio/speech with the Java SDK.

**Method**: `client.createSpeech(...)`

```java theme={null}
import app.phaseo.sdk.Phaseo;

Phaseo client = new Phaseo(System.getenv("PHASEO_API_KEY"));

String body = """
{
  "model": "openai/gpt-4o-mini-tts",
  "input": "Hello from Java",
  "voice": "alloy",
  "format": "mp3"
}
""";

Object response = client.createSpeech(body);
System.out.println(String.valueOf(response));
```
