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

# TTS (Text to Speech)

> Call /audio/speech with the Go wrapper.

Use the wrapper method:

* `client.CreateSpeech(ctx, req)`

```go theme={null}
import (
  "context"
  "fmt"
  aistats "github.com/AI-Stats/AI-Stats/packages/sdk/sdk-go"
)

client := aistats.New(apiKey, "https://api.phaseo.app/v1")
resp, err := client.CreateSpeech(context.Background(), map[string]interface{}{
  "model": "openai/gpt-4o-mini-tts",
  "input": "Hello from AI Stats",
  "voice": "alloy",
  "format": "mp3",
})
if err != nil {
  panic(err)
}
fmt.Println(resp)
```
