Automated summary
This skill guides the use of the Azure AI Transcription Python SDK to run real-time or batch speech-to-text transcription with timestamps and speaker diarization.
Strengths
- Provides complete, copy-ready samples for both batch and streaming transcription
- Consistently enforces both auth modes (key or DefaultAzureCredential) and context-manager usage
- Covers enabling diarization and capturing timestamps for subtitle generation
- Includes concrete best practices such as keeping sync/async consistent and closing sessions
Limitations
- Assumes audio is already reachable via a storage URL for batch mode and does not explain Azure resource setup
- Does not describe the exact shape of results (segment format, API error handling)
- The reference files table is truncated in the provided document, so those references cannot be used as-is
Use it when writing Python code that transcribes audio through Azure AI Transcription, either in real time or in batch.
Avoid it if you need a non-Azure transcription service or a guide to capacity planning and pricing rather than implementation help.
Security analysis
SafeThis skill is purely instructional documentation for using the Azure AI Transcription Python SDK. It contains code snippets that reference environment variables for credentials and explicitly advises against hardcoding secrets, with no destructive commands, network exfiltration, obfuscated payloads, or disabling of safety features.
No concerns found
How this analysis is madeExamples
Write a Python script using azure-ai-transcription that submits a batch transcription job for https://mystorage.blob.core.windows.net/audio/meeting.wav in en-US with diarization enabled, and prints the job status and timestamps.Show me how to stream a local audio file through begin_stream_transcription with the Azure AI Transcription SDK and print each transcribed event as it arrives.Refactor my TranscriptionClient code to use DefaultAzureCredential instead of a hardcoded key and wrap the client in a context manager.name: azure-ai-transcription-py description: "| Azure AI Transcription SDK for Python. Use for real-time and batch speech-to-text transcription with timestamps and diarization. Triggers: "transcription", "speech to text", "Azure AI Transcription", "TranscriptionClient"." category: devops-and-infra source_repo: microsoft/skills source_path: ".github/plugins/azure-sdk-python/skills/azure-ai-transcription-py/SKILL.md" source_url: https://github.com/microsoft/skills/blob/HEAD/.github/plugins/azure-sdk-python/skills/azure-ai-transcription-py/SKILL.md
Azure AI Transcription SDK for Python
Client library for Azure AI Transcription (speech-to-text) with real-time and batch transcription.
Installation
pip install azure-ai-transcription
Environment Variables
TRANSCRIPTION_ENDPOINT=https://<resource>.cognitiveservices.azure.com
TRANSCRIPTION_KEY=<your-key> # For key auth; not needed when using DefaultAzureCredential/TokenCredential
Authentication & Lifecycle
🔑 Two rules apply to every code sample below:
- Two auth modes are supported:
AzureKeyCredential(os.environ["TRANSCRIPTION_KEY"])for key-based auth, orDefaultAzureCredential()/ anyTokenCredentialfor Entra ID. PreferDefaultAzureCredentialin production; never hardcode credentials in code.- Wrap every client in a context manager so HTTP transports and sockets are released deterministically:
- Sync:
with <Client>(...) as client:- Async:
async with <Client>(...) as client:Snippets may abbreviate this setup, but production code should always follow both rules.
Use subscription key authentication:
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.transcription import TranscriptionClient
with TranscriptionClient(
endpoint=os.environ["TRANSCRIPTION_ENDPOINT"],
credential=AzureKeyCredential(os.environ["TRANSCRIPTION_KEY"]),
) as client:
transcriptions = list(client.list_transcriptions())
Transcription (Batch)
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.transcription import TranscriptionClient
with TranscriptionClient(
endpoint=os.environ["TRANSCRIPTION_ENDPOINT"],
credential=AzureKeyCredential(os.environ["TRANSCRIPTION_KEY"]),
) as client:
job = client.begin_transcription(
name="meeting-transcription",
locale="en-US",
content_urls=["https://<storage>/audio.wav"],
diarization_enabled=True,
)
result = job.result()
print(result.status)
Transcription (Real-time)
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.transcription import TranscriptionClient
with TranscriptionClient(
endpoint=os.environ["TRANSCRIPTION_ENDPOINT"],
credential=AzureKeyCredential(os.environ["TRANSCRIPTION_KEY"]),
) as client:
stream = client.begin_stream_transcription(locale="en-US")
stream.send_audio_file("audio.wav")
for event in stream:
print(event.text)
Best Practices
- Pick sync OR async and stay consistent. Do not mix
azure.xxxsync clients withazure.xxx.aioasync clients in the same call path. Choose one mode per module. - Always use context managers for clients and async credentials. Wrap every client in
with Client(...) as client:(sync) orasync with Client(...) as client:(async). For asyncDefaultAzureCredentialfromazure.identity.aio, also useasync with credential:so tokens and transports are cleaned up. - Enable diarization when multiple speakers are present
- Use batch transcription for long files stored in blob storage
- Capture timestamps for subtitle generation
- Specify language to improve recognition accuracy
- Handle streaming backpressure for real-time transcription
- Close transcription sessions when complete
Reference Files
| File | Contents | |------|----------| | references/capabilities.md | Additional non-hero capabilities, operation-group coverage, and production checklists. | | references/non-hero-scenarios.md | Dedicated non-hero examples for secondary/advanced scenarios. |
Source: microsoft/skills → .github/plugins/azure-sdk-python/skills/azure-ai-transcription-py/SKILL.md
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/azure-ai-transcription-sdk-for-python-msh3uums/download' --output '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md.part' && mv '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md.part' '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Installation
pip install azure-ai-transcription
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md' && test -s '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/azure-ai-transcription-py' && cp -R '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums' '.claude/skills/azure-ai-transcription-py'Cursor
test -f '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md' && test -s '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/azure-ai-transcription-py' && cp -R '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums' '.cursor/skills/azure-ai-transcription-py'Codex
test -f '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md' && test -s '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/azure-ai-transcription-py' && cp -R '.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums' '.agents/skills/azure-ai-transcription-py'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums'openskills read 'azure-ai-transcription-sdk-for-python-msh3uums'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/azure-ai-transcription-sdk-for-python-msh3uums/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.