> ## 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 (टेक्स्ट से वाणी)

> Ruby SDK से `/audio/speech` कॉल करें।

**मेथड**: `client.generate_speech(...)` या `client.create_speech(...)`।

### उदाहरण

```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'
)
```

### मुख्य पैरामीटर

* `model` (ज़रूरी): TTS-सक्षम मॉडल ID।
* `input` (ज़रूरी): संश्लेषित किया जाने वाला टेक्स्ट।
* `voice`: आवाज़ प्रीसेट (मॉडल पर निर्भर, जैसे `alloy`)।
* `format`: `mp3`, `wav`, `flac` आदि।
* `speed`: प्लेबैक गति का गुणक (आमतौर पर 0.25–4)。

### रिटर्न वैल्यू

बाइनरी ऑडियो डेटा


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