diff --git a/api-reference/server/services/tts/azure.mdx b/api-reference/server/services/tts/azure.mdx index 6bb48731..2dbdd7d9 100644 --- a/api-reference/server/services/tts/azure.mdx +++ b/api-reference/server/services/tts/azure.mdx @@ -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 @@ -70,8 +70,16 @@ Before using Azure TTS services, you need: Azure Cognitive Services subscription key. - - Azure region identifier (e.g., `"eastus"`, `"westus2"`). + + Azure region identifier (e.g., `"eastus"`, `"westus2"`). Required unless + `private_endpoint` is provided. + + + + 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). @@ -116,8 +124,14 @@ The HTTP service accepts the same parameters as the streaming service except `te Azure Cognitive Services subscription key. - - Azure region identifier. + + Azure region identifier. Required unless `private_endpoint` is provided. + + + + 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). @@ -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", + ), +) +``` + The `InputParams` / `params=` pattern is deprecated as of v0.0.105. Use `Settings` / `settings=` instead. See the [Service Settings