This guide will help you set up Azure OpenAI for language translation and Azure Computer Vision for analyzing image content (which can then be used for image-based translation) within Azure AI Foundry.
Prerequisites:
Start by creating an Azure AI Project, which serves as a central hub for managing your AI resources.
Go to https://ai.azure.com and sign in with your Azure account.
Click +Create to start a new project.
CoopTranslator-Project
).CoopTranslator-Hub
) (create a new one if needed).Within your project, you will deploy an Azure OpenAI model that will act as the backend for text translation.
If you aren’t already there, open your newly created project (e.g., CoopTranslator-Project
) in Azure AI Foundry.
From the left-hand menu under “My assets”, select “Models + endpoints”.
Click + Deploy model.
Choose Deploy Base Model.
You will see a list of available models. Filter or search for a suitable GPT model. We recommend gpt-4o
.
Select the model you want and click Confirm.
Click Deploy.
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 will need these details to integrate the translation model into your application.
[!NOTE] You can choose API versions from the API version deprecation page based on your needs. Keep in mind that the API version differs from the Model version shown on the Models + endpoints page in Azure AI Foundry.
To translate text within images, you need to locate the Azure AI Service API Key and Endpoint.
CoopTranslator-Project
). Make sure you are on the project overview page.Locate the API Key and Endpoint for the Azure AI Service.
Navigate to your Azure AI Project (e.g., CoopTranslator-Project
). Confirm you are on the project overview page.
Find the API Key and Endpoint under the Azure AI Service tab.
This connection enables the features of the linked Azure AI Services resource (including image analysis) for your AI Foundry project. You can then use this connection in your notebooks or applications to extract text from images, which can be sent to the Azure OpenAI model for translation.
By this point, you should have gathered the following:
For Azure OpenAI (Text Translation):
gpt-4o
)cooptranslator-gpt4o
)For Azure AI Services (Image Text Extraction via Vision):
When you build your application, you’ll likely configure it using these credentials. For example, you might set them 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
Penafian:
Dokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI Co-op Translator. Walaupun kami berusaha untuk ketepatan, sila maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang sahih. Untuk maklumat penting, terjemahan profesional oleh manusia adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.