> ## 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 zu Sprache)

> Rufe `/audio/speech` mit dem Ruby-SDK auf.

**Methode**: `client.generate_speech(...)` oder `client.create_speech(...)`.

### Beispiel

```ruby theme={null}
require 'phaseo_sdk'

client = PhaseoSdk::Phaseo.new(api_key: ENV.fetch("PHASEO_API_KEY"))
audio = client.generate_speech(
  model: 'openai/gpt-4o-mini-tts',
  input: 'Hello world',
  voice: 'alloy',
  format: 'mp3'
)
```

### Wichtige Parameter

* `model` (erforderlich): ID eines TTS-fähigen Modells.
* `input` (erforderlich): Zu synthetisierender Text.
* `voice`: Sprachvoreinstellung (modellabhängig, z. B. `alloy`).
* `format`: `mp3`, `wav`, `flac` usw.
* `speed`: Faktor für die Wiedergabegeschwindigkeit (typischerweise 0,25–4).

### Rückgabe

Audiodaten (Binärformat)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.