Azure AI Transcription Py
MicrosoftOfficialCreated by Microsoft
- Skill
- Tool integration
- Automation and integrations
- MIT
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The azure-ai-transcription-py skill provides a Python client library for interacting with Azure AI Transcription services. It supports both batch processing for stored audio files and real-time streaming transcription. The SDK includes features for speaker diarization, timestamp generation, and management of transcription jobs, including listing, polling, and deleting resources.
What it does
- Perform batch speech-to-text transcription for audio files stored in cloud storage.
- Execute real-time streaming transcription for live audio input.
- Enable speaker diarization to distinguish between multiple speakers.
- Manage transcription lifecycle including listing, polling status, and deleting jobs.
- Configure custom retry policies for transient network failures.
- Support both key-based and token-based authentication via Azure Identity.
When to use it
- When building applications that require automated speech-to-text conversion.
- When processing long audio files from storage in a batch workflow.
- When implementing real-time transcription features in live audio applications.
- When you need to identify individual speakers within an audio recording.
Advantages
- Provides both synchronous and asynchronous client implementations.
- Supports robust resource management through context managers.
- Offers granular control over long-running operations and polling.
- Integrates with standard Azure authentication patterns.
Usage examples
- “How do I start a batch transcription job for an audio file?”
- The agent provides a code snippet using TranscriptionClient.begin_transcription, specifying the audio URL, locale, and enabling diarization.
- “Show me how to perform real-time transcription in Python.”
- The agent demonstrates using the begin_stream_transcription method to open a stream and process audio data in real-time.
- “How can I clean up my completed transcription jobs?”
- The agent provides a script that iterates through existing transcriptions and calls delete_transcription for those with a Succeeded status.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/microsoft/azure-ai-transcription-py/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip azure-ai-transcription-py.zip -d .agents/skills
Documentation by Microsoft
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-transcriptionEnvironment Variables
TRANSCRIPTION_ENDPOINT=https://<resource>.cognitiveservices.azure.com
TRANSCRIPTION_KEY=<your-key> # For key auth; not needed when using DefaultAzureCredential/TokenCredentialAuthentication & 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. |
Files
- ATTRIBUTION.mdAdded by AutoGineer986 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md4.0 KiB
- references/capabilities.md1.1 KiB
- references/non-hero-scenarios.md3.6 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-sdk-python/skills/azure-ai-transcription-py · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-ai-transcription-py.zip