Skip to content

Commit

Permalink
Add link to AAD token docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed May 28, 2024
1 parent a6b2b23 commit fcf250f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ async def speech():
request_json = await request.get_json()
text = request_json["text"]
try:
# Construct a token as described in documentation:
# https://learn.microsoft.com/azure/ai-services/speech-service/how-to-configure-azure-ad-auth?pivots=programming-language-python
auth_token = (
"aad#" + current_app.config[CONFIG_SPEECH_SERVICE_ID] + "#" + current_app.config[CONFIG_SPEECH_TOKEN].token
)
Expand Down

0 comments on commit fcf250f

Please sign in to comment.