Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions api-reference/server/services/tts/azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Before using Azure TTS services, you need:
### Required Environment Variables

- `AZURE_SPEECH_API_KEY`: Your Azure Speech service API key
- `AZURE_SPEECH_REGION`: Your Azure Speech service region (e.g., "eastus")
- `AZURE_SPEECH_REGION`: Your Azure Speech service region (e.g., "eastus") _or_ a custom endpoint URL when using Private Link

## Configuration

Expand All @@ -70,8 +70,16 @@ Before using Azure TTS services, you need:
Azure Cognitive Services subscription key.
</ParamField>

<ParamField path="region" type="str" required>
Azure region identifier (e.g., `"eastus"`, `"westus2"`).
<ParamField path="region" type="str">
Azure region identifier (e.g., `"eastus"`, `"westus2"`). Required unless
`private_endpoint` is provided.
</ParamField>

<ParamField path="private_endpoint" type="str">
Custom endpoint URL for Azure Speech Services (e.g.,
`"https://my-resource.cognitiveservices.azure.com/"`). Use this when
connecting via Private Link or a custom domain. See [Azure Private Link
documentation](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-services-private-link).
</ParamField>

<ParamField path="voice" type="str" default="en-US-SaraNeural" deprecated>
Expand Down Expand Up @@ -116,8 +124,14 @@ The HTTP service accepts the same parameters as the streaming service except `te
Azure Cognitive Services subscription key.
</ParamField>

<ParamField path="region" type="str" required>
Azure region identifier.
<ParamField path="region" type="str">
Azure region identifier. Required unless `private_endpoint` is provided.
</ParamField>

<ParamField path="private_endpoint" type="str">
Custom endpoint URL for Azure Speech Services. Use this when connecting via
Private Link or a custom domain. See [Azure Private Link
documentation](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-services-private-link).
</ParamField>

<ParamField path="voice" type="str" default="en-US-SaraNeural" deprecated>
Expand Down Expand Up @@ -201,6 +215,20 @@ tts = AzureHttpTTSService(
)
```

### With Private Endpoint

```python
from pipecat.services.azure import AzureTTSService

tts = AzureTTSService(
api_key=os.getenv("AZURE_SPEECH_API_KEY"),
private_endpoint="https://my-resource.cognitiveservices.azure.com/",
settings=AzureTTSService.Settings(
voice="en-US-SaraNeural",
),
)
```

<Tip>
The `InputParams` / `params=` pattern is deprecated as of v0.0.105. Use
`Settings` / `settings=` instead. See the [Service Settings
Expand Down
Loading