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

# SpeechInputReference

Reference content part for stateless voice cloning

## Supported Types

### SpeechInputReferenceAudio

```go theme={null}
speechInputReference := components.CreateSpeechInputReferenceInputAudio(components.SpeechInputReferenceAudio{/* values here */})
```

### SpeechInputReferenceText

```go theme={null}
speechInputReference := components.CreateSpeechInputReferenceText(components.SpeechInputReferenceText{/* values here */})
```

## Union Discrimination

Use the `Type` field to determine which variant is active, then access the corresponding field:

```go theme={null}
switch speechInputReference.Type {
	case components.SpeechInputReferenceTypeInputAudio:
		// speechInputReference.SpeechInputReferenceAudio is populated
	case components.SpeechInputReferenceTypeText:
		// speechInputReference.SpeechInputReferenceText is populated
}
```
