Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# ============================================================================
# Azure AI Video Translation Agent - Environment Configuration
# ============================================================================
# This file contains all the environment variables needed to run the video
# translation agent. Copy this file to .env and fill in your values.
# ============================================================================

# ----------------------------------------------------------------------------
# Azure AI Project Configuration (REQUIRED)
# ----------------------------------------------------------------------------
# These settings configure the AI agent's connection to Azure AI services.

# Azure AI Project Endpoint
# This is the full endpoint URL to your Azure AI project.
#
# How to find it:
# 1. Go to https://ai.azure.com
# 2. Select your project
# 3. Click "Settings" → "Project properties"
# 4. Copy the "Project endpoint" URL
#
# Format: https://your-ai-project.services.ai.azure.com/api/projects/your-project
AZURE_AI_PROJECT_ENDPOINT=https://your-ai-project.services.ai.azure.com/api/projects/your-project

# AI Model Deployment Name
# The name of your deployed AI model (typically GPT-4 or GPT-3.5).
#
# How to find it:
# 1. Go to https://ai.azure.com
# 2. Select your project
# 3. Click "Deployments"
# 4. Copy the deployment name
#
# Common values: gpt-4, gpt-4-turbo, gpt-35-turbo
AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4

# ----------------------------------------------------------------------------
# Azure Cognitive Services Configuration (REQUIRED)
# ----------------------------------------------------------------------------
# Configuration for the Video Translation service.

# Cognitive Services Endpoint
# This is the endpoint for your Azure Cognitive Services resource that
# provides the Video Translation API.
#
# How to find it:
# 1. Go to https://portal.azure.com
# 2. Navigate to your Azure AI services resource
# 3. Select "Keys and Endpoint" from the left menu
# 4. Copy the "Endpoint" URL
#
# Format: https://your-region.cognitiveservices.azure.com/
COGNITIVE_SERVICES_ENDPOINT=https://your-region.cognitiveservices.azure.com/

# ----------------------------------------------------------------------------
# Azure Storage Configuration (REQUIRED for local file uploads)
# ----------------------------------------------------------------------------
# Configuration for uploading local video files to Azure Blob Storage.

# Storage Account Name
# The name of your Azure Storage account (not the full URL).
#
# How to find it:
# 1. Go to https://portal.azure.com
# 2. Navigate to your Storage account
# 3. The name is shown at the top of the overview page
#
# Example: if your storage URL is https://mystorageacct.blob.core.windows.net/
# then your storage account name is: mystorageacct
AZURE_STORAGE_ACCOUNT_NAME=your-storage-account-name

# ----------------------------------------------------------------------------
# Authentication
# ----------------------------------------------------------------------------
# This sample uses Azure CLI authentication by default.
# Before running, ensure you're logged in:
#
# az login
#
# To verify your authentication:
#
# az account show
#
# The account shown should have access to all the resources configured above.
# ----------------------------------------------------------------------------
34 changes: 34 additions & 0 deletions python/samples/getting_started/agents/video-translation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Azure AI Video Translation Agent

This sample demonstrates how to build an AI agent that helps users translate videos from one language to another using Azure AI Speech's Video Translation services. The agent handles video uploads, long-running translation operations, and status monitoring with a conversational interface.

## Files

| File | Description |
|------|-------------|
| [`agent.py`](agent/src/azure_ai_video_translation.py) | Main agent implementation with video translation tools including upload, download, translation, and status checking functionality. Demonstrates long-running operation handling with pull-based status updates. |
| [`video_translation_client.py`](agent/src/video_translation_client.py) | API client for Azure Video Translation service with methods for creating, listing, and managing translations. |
| [`video_translation_dataclass.py`](agent/src/video_translation_dataclass.py) | Data models for API request and response structures. |
| [`video_translation_enum.py`](agent/src/video_translation_enum.py) | Enumerations for voice kinds, WebVTT file types, and translation status values. |
| [`video_translation_util.py`](agent/src/video_translation_util.py) | Utility functions for API interactions and data processing. |

## Environment Variables

Make sure to set the following environment variables before running the example:

- `AZURE_AI_PROJECT_ENDPOINT`: Your Azure AI project endpoint
- `AZURE_AI_MODEL_DEPLOYMENT_NAME`: The name of your Azure AI model deployment (e.g., `gpt-4`)
- `COGNITIVE_SERVICES_ENDPOINT`: Your Azure Cognitive Services endpoint for video translation
- `AZURE_STORAGE_ACCOUNT_NAME`: Your Azure Storage account name (for uploading video files)

You can set these in a `.env` file in the `agent/src` directory (copy from `.env.sample`).

## Authentication

This sample uses `AzureCliCredential` for authentication. Run `az login` in your terminal before running the example, or replace `AzureCliCredential` with your preferred authentication method.

## Additional Resources

For more information about Azure Video Translation and related services, see:
- [Azure Video Translation Overview](https://learn.microsoft.com/azure/ai-services/speech-service/video-translation-overview)
- [Azure Video Translation Language Support](https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=video-translation)
Loading
Loading