@@ -66,8 +66,16 @@ def __init__(
6666 If omitted, Entra ID auth via ``DefaultAzureCredential`` is used automatically.
6767 azure_speech_resource_id (str, Optional): The resource ID for accessing the service when using
6868 Entra ID auth. Required when using a callable token provider or when no API key is available.
69- use_entra_auth (bool, Optional): **Deprecated.** Will be removed in v0.15.0.
70- Authentication is now auto-detected from the provided credentials.
69+ use_entra_auth (bool, Optional): **Deprecated.** Will be removed in 0.15.0.
70+ Authentication is now selected automatically based on what you pass to
71+ ``azure_speech_key`` (and ``AZURE_SPEECH_KEY`` env var):
72+
73+ - Pass a **string** API key (or set ``AZURE_SPEECH_KEY``) to use API-key auth.
74+ - Pass a **callable token provider** (sync or async returning a token string)
75+ to use Entra ID with a custom token; ``azure_speech_resource_id`` must also
76+ be set.
77+ - Omit ``azure_speech_key`` entirely to use Entra ID via
78+ ``DefaultAzureCredential``; ``azure_speech_resource_id`` must be set.
7179 recognition_language (str): Recognition voice language. Defaults to "en-US".
7280 For more on supported languages, see the following link:
7381 https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support
@@ -79,9 +87,8 @@ def __init__(
7987 print_deprecation_message (
8088 old_item = "AzureSpeechAudioToTextConverter(use_entra_auth=...)" ,
8189 new_item = (
82- "AzureSpeechAudioToTextConverter(...) with automatic auth detection: "
83- "pass a key string for key auth, a callable token provider for token auth, "
84- "or omit for automatic Entra ID auth"
90+ "AzureSpeechAudioToTextConverter("
91+ "azure_speech_key=<api-key-string-or-callable-token-provider-or-omit>)"
8592 ),
8693 removed_in = "0.15.0" ,
8794 )
0 commit comments