Skip to content

fix: Speech service API issue fixed#2202

Open
AjitPadhi-Microsoft wants to merge 1 commit intoAzure-Samples:devfrom
AjitPadhi-Microsoft:PSL-BUG-42333
Open

fix: Speech service API issue fixed#2202
AjitPadhi-Microsoft wants to merge 1 commit intoAzure-Samples:devfrom
AjitPadhi-Microsoft:PSL-BUG-42333

Conversation

@AjitPadhi-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

  • This pull request updates how Azure Speech tokens are acquired, adding support for Azure RBAC authentication in addition to key-based authentication. The main logic in speech_config is updated to use a managed identity and AAD token when AZURE_AUTH_TYPE is set to "rbac". Corresponding tests are refactored to cover this new authentication flow.

Authentication logic updates:

  • code/create_app.py: The speech_config function now supports both key-based and RBAC (Azure Active Directory) authentication. When AZURE_AUTH_TYPE is "rbac", it retrieves an AAD token using a managed identity and uses it to request a speech token, instead of a subscription key.

Test updates:

  • code/tests/test_create_app.py: The test setup (env_helper_mock) and the test_returns_speech_token_using_rbac test are updated to mock the new RBAC authentication flow, including checking that the correct credential and token retrieval calls are made. [1] [2] [3]

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant