Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Guidance for building and deploying AI solutions on Azure using Azure AI services and Copilot for Azure
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-ai-transcription-py.md
1# Azure AI Transcription — Python SDK Quick Reference23> Condensed from **azure-ai-transcription-py**. Full patterns (real-time streaming, diarization, timestamps)4> in the **azure-ai-transcription-py** plugin skill if installed.56## Install7```bash8pip install azure-ai-transcription9```1011## Quick Start12```python13import os14from azure.ai.transcription import TranscriptionClient15client = TranscriptionClient(endpoint=os.environ["TRANSCRIPTION_ENDPOINT"],16credential=os.environ["TRANSCRIPTION_KEY"])17```1819## Non-Obvious Patterns20- Auth uses subscription key string directly (not AzureKeyCredential); DefaultAzureCredential not supported21- Batch: `client.begin_transcription(name=..., locale="en-US", content_urls=[...], diarization_enabled=True)`22- Real-time: `stream = client.begin_stream_transcription(locale="en-US"); stream.send_audio_file("audio.wav")`2324## Best Practices251. Enable diarization when multiple speakers are present262. Use batch transcription for long files stored in blob storage273. Capture timestamps for subtitle generation284. Specify language to improve recognition accuracy295. Handle streaming backpressure for real-time transcription306. Close transcription sessions when complete31