co-op-translator

Set Up Azure AI for Co-op Translator (Azure OpneAI & Azure AI Vision)

This guide explains how to set up Azure OpenAI for language translation and Azure Computer Vision for image content analysis (which can then be used for image-based translation) within Azure AI Foundry.

Prerequisites:

Create an Azure AI Project

Begin by creating an Azure AI Project, which serves as a central hub for managing your AI resources.

  1. Go to https://ai.azure.com and sign in with your Azure account.

  2. Click +Create to start a new project.

  3. Complete the following:
    • Enter a Project name (e.g., CoopTranslator-Project).
    • Choose the AI hub (e.g., CoopTranslator-Hub) (Create a new one if necessary).
  4. Click “Review and Create” to finalize your project setup. You will be directed to the project overview page.

Set up Azure OpenAI for Language Translation

Inside your project, deploy an Azure OpenAI model to handle text translation.

If you’re not already there, open your newly created project (e.g., CoopTranslator-Project) in Azure AI Foundry.

Deploy an OpenAI Model

  1. From the project’s left menu, under “My assets”, select “Models + endpoints”.

  2. Click + Deploy model.

  3. Choose Deploy Base Model.

  4. A list of available models will appear. Filter or search for an appropriate GPT model. We recommend gpt-4o.

  5. Select your preferred model and click Confirm.

  6. Click Deploy.

Azure OpenAI configuration

After deployment, select the deployment from the “Models + endpoints” page to find its REST endpoint URL, Key, Deployment name, Model name, and API version. You’ll need these details to integrate the translation model into your application.

[!NOTE] You can select API versions on the API version deprecation page according to your needs. Note that the API version is different from the Model version shown on the Models + endpoints page in Azure AI Foundry.

Set up Azure Computer Vision for Image Translation

To translate text within images, locate the Azure AI Service API Key and Endpoint.

  1. Go to your Azure AI Project (e.g., CoopTranslator-Project). Make sure you are on the project overview page.

Azure AI Service configuration

Retrieve the API Key and Endpoint from the Azure AI Service.

  1. Navigate to your Azure AI Project (e.g., CoopTranslator-Project). Confirm you’re on the project overview page.

  2. Find the API Key and Endpoint under the Azure AI Service tab.

    Find API Key and Endpoint

This connection enables the features of the linked Azure AI Services resource (including image analysis) within your AI Foundry project. You can then use this connection in notebooks or applications to extract text from images, which can be forwarded to the Azure OpenAI model for translation.

Consolidating Your Credentials

At this point, you should have gathered the following:

For Azure OpenAI (Text Translation):

For Azure AI Services (Image Text Extraction via Vision):

Example: Environment Variable Configuration (Preview)

Later, when building your application, you’ll likely set these credentials as environment variables like this:

# Azure AI Service Credentials (Required for image translation)
AZURE_AI_SERVICE_API_KEY="your_azure_ai_service_api_key" # e.g., 21xasd...
AZURE_AI_SERVICE_ENDPOINT="https://your_azure_ai_service_endpoint.cognitiveservices.azure.com/"

# Azure OpenAI Credentials (Required for text translation)
AZURE_OPENAI_API_KEY="your_azure_openai_api_key" # e.g., 21xasd...
AZURE_OPENAI_ENDPOINT="https://your_azure_openai_endpoint.openai.azure.com/"
AZURE_OPENAI_MODEL_NAME="your_model_name" # e.g., gpt-4o
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME="your_deployment_name" # e.g., cooptranslator-gpt4o
AZURE_OPENAI_API_VERSION="your_api_version" # e.g., 2024-12-01-preview

Further Reading

Prohlášení o vyloučení odpovědnosti:
Tento dokument byl přeložen pomocí AI překladatelské služby Co-op Translator. Přestože usilujeme o přesnost, mějte prosím na paměti, že automatizované překlady mohou obsahovat chyby nebo nepřesnosti. Původní dokument v jeho mateřském jazyce by měl být považován za autoritativní zdroj. Pro důležité informace se doporučuje profesionální lidský překlad. Nejsme odpovědní za jakákoliv nedorozumění nebo chybné výklady vzniklé použitím tohoto překladu.