Skip to content

Configure Azure

Justin Weisz edited this page May 18, 2026 · 4 revisions

Important

The instructions below reflect the general steps needed to set up AI services on Azure. As cloud service providers redesign their user interfaces, the specific steps you need to perform may vary.

There are three AI services you can set up on Azure:

  1. Azure Speech (performs both Speech-to-Text and Text-to-Speech)
  2. Azure Vision

Sign up for Azure

To create your own instances of these services, you first need to sign up for an Azure account if you do not have one already. Visit Azure and click "Get started with Azure", then "Try Azure for Free" to create a new account. If you have an existing Microsoft account, you will still need to register for Azure.

Note

As part of the sign up process, you may be asked to enter credit card information for billing. Azure offers trial versions of many services, including Speech and Vision, so you should be able to try these services with your TJBot at no cost.

Create a project

Azure organizes service instances into resource groups. First, create a resource group for your TJBot's cloud services.

  1. In the Cloud sidebar, click "Resource groups."
  2. Click "+ Create" in the toolbar.
  3. Give your resource group a name, such as "TJBot."
  4. Click "Review + create" to create your new resource group.

Note

Resource groups are associated with geographic regions. Be sure to create your resource group in a geographic region close to where you are for the best service quality.

Create service instances

  1. In the Cloud sidebar, navigate to "All services."
  2. Click on "Microsoft Foundry" under "AI + machine learning."

There are two service instances you will need to create: one for "Computer vision" and one for "Speech services." The instructions below are specific to "Computer vision," but the steps are the same for "Speech services."

  1. In the left sidebar, click "Computer vision."
  2. Click "+ Create" in the toolbar.
  3. Choose your resource group in the dropdown list (e.g. "TJBot").
  4. Give your service a name, such as "tjbot-vision."
  5. Choose a pricing tier.
  6. Click "Review + create" to create your service instance.

Save authentication credentials

Azure uses secret keys for making authenticated API calls. You can view these keys in the Resource Manager by clicking on the name of your service and scrolling to the "Keys and endpoint" section.

  1. In the Cloud sidebar, click "All resources."
  2. Click the name of one of your services (e.g. "tjbot-vision").
  3. Scroll the side panel to "Keys and endpoint."

Next, create a file on your TJBot at ~/.tjbot/azure-credentials.env to store each API key, region, and/or endpoint. The file should contain these fields:

AZURE_SPEECH_KEY=
AZURE_SPEECH_REGION=
AZURE_VISION_KEY=
AZURE_VISION_ENDPOINT=

Copy each piece of information to your clipboard using the Copy buttons next to the text fields in the "Keys and endpoint" section, then paste it into your text editor after each corresponding equals sign.

Warning

The azure-credentials.env file contains authentication credentials for your Azure services. Keep this file secret and do not share it. Also, do not check it in to a GitHub repository or other source control system. Otherwise, others may be able to use your Azure services, including services for which you may be billed.

Configure TJBot to use Azure services

To enable Azure's AI services, update the following settings in your tjbot.toml file:

[listen.backend]
type = 'azure-stt'

[see.backend]
type = 'azure-vision'

[speak.backend]
type = 'azure-tts'

If you wish to store your credentials file in an alternative location, simply update your tjbot.toml configuration to specify that location. The relevant settings to update are:

[listen.backend.azure-stt]
credentialsPath = "<path to your azure-credentials.env file>"

[see.backend.azure-vision]
credentialsPath = "<path to your azure-credentials.env file>"

[speak.backend.azure-tts]
credentialsPath = "<path to your azure-credentials.env file>"

Azure-specific settings

Each Azure AI service has a number of service-specific settings you can configure, such as the voice used for Text-to-Speech and confidence thresholds for computer vision tasks. Please review tjbot.toml to learn more about these settings.

Clone this wiki locally