Azure Short-Audio Speech-to-Text REST
Transcribe audio up to 60 seconds with Python HTTP requests.
The document requires environment-based secret handling, prohibits hardcoded credentials, and describes subscription-key and token authentication. The audio data flow to an Azure endpoint is inferable from the samples, but privacy handling, user consent, log redaction, least-privilege guidance, timeouts, retries, and recovery are not specified, so points are deducted.
Synchronous, chunked, and asynchronous paths are documented; file resources use context managers, and some HTTP statuses and RecognitionStatus values are handled. There is no input validation, request timeout, retry policy, unified exception strategy, or skill-specific test evidence. The text mentions DefaultAzureCredential without showing an implementation, so the static score remains modest.
Triggers, the short-audio limit, and non-fit scenarios are explicit, with both transcription and pronunciation-assessment use cases and several languages including zh-CN. Mainland-China reachability, regional constraints, format conversion, input/output contracts, and additional boundaries are not addressed, so points are deducted.
The material is organized into prerequisites, installation, authentication, examples, limits, error handling, and references, and includes MIT licensing, author, and version metadata. It lacks a changelog, explicit maintenance owner and update path, pinned dependency versions, FAQ, test instructions, and complete endpoint/key configuration guidance, so points are deducted.
The requests and aiohttp transcription and pronunciation-assessment examples are close to directly reusable and cover simple and detailed responses. Users must still supply Azure resources, credentials, compatible audio, and production network controls; no skill-specific verified outputs or comparative benefit evidence are provided, so the score stays within the static ceiling and is reduced.
Examples, response JSON, parameter tables, and official documentation links provide limited auditability. The supplied material contains no skill-specific tests, CI coverage, or third-party execution results; repository-level harnesses and workflows do not establish reproduction of this path, so only limited credit is warranted.
- The examples upload audio to Azure without privacy, retention, consent, or sensitive-voice handling guidance.
- The examples lack requests/aiohttp timeouts, retries, and network-failure recovery; production code should add these controls.
- DefaultAzureCredential is mentioned as supported, but the shown token flow actually uses a subscription key, leaving an implementation/documentation mismatch.
- Reachability of Azure Speech regional endpoints from mainland China is not established; verify the region and network path before adoption.
- Chunked transfer is labeled recommended without evidence of service compatibility, proxy behavior, or performance validation.
What it does & when to use it
This skill helps Python developers transcribe short audio through the Azure Speech to Text REST API without the Speech SDK. It covers WAV PCM and OGG OPUS input, simple and detailed responses, chunked transfer, subscription-key and bearer-token authentication, and synchronous or asynchronous requests. It is designed for final results from audio up to 60 seconds, not real-time streaming, long audio, batch transcription, speech translation, or custom speech models. The skill is part of Microsoft/skills, a 190-skill collection that is actively maintained.
Reads a local audio file, sends it to the Azure Speech REST endpoint with requests or aiohttp, applies language, output-format, and profanity parameters, and returns JSON. The examples expose DisplayText in simple responses and confidence, display, lexical, ITN, and masked ITN fields in detailed responses. They also demonstrate chunked uploads, subscription-key authentication, bearer tokens, HTTP error handling, and RecognitionStatus checks.
- A Python developer needs final text from a WAV recording that is no longer than 60 seconds and wants to call an HTTP API directly.
- An application processes 16 kHz mono WAV or OGG OPUS clips without adding the Speech SDK.
- A developer needs detailed recognition output with candidate text and confidence scores.
- An asynchronous Python service needs to transcribe short uploaded audio with aiohttp.
- A developer wants chunked transfer for lower latency when sending short audio.
Pros & cons
- Uses direct HTTP requests and does not require the Speech SDK.
- Includes synchronous, asynchronous, chunked-transfer, and two authentication patterns.
- Documents audio formats, response formats, language parameters, profanity handling, and failure statuses.
- Emphasizes deterministic cleanup with context managers for files and HTTP resources.
- Audio is limited to 60 seconds, or 30 seconds for pronunciation assessment.
- It provides final results only, with no partial or interim results.
- It is not intended for real-time streaming, batch transcription, speech translation, or custom speech models.
- It requires an Azure Speech resource and credentials; the source gives no pricing, quota, or test-suite evidence for this skill.
- The source does not provide a complete aiohttp installation command.
How to install
Install the collection with npx skills add microsoft/skills, then select the skill in the wizard. For manual installation, clone https://github.com/microsoft/skills and copy .github/plugins/azure-sdk-python/skills/azure-speech-to-text-rest-py/. The skill has no separate installation command. The primary examples require requests; the async example also uses aiohttp.
How to use
Create an Azure subscription and Speech resource, then set AZURE_SPEECH_KEY and AZURE_SPEECH_REGION, or use AZURE_SPEECH_ENDPOINT. Ask a coding agent something like: “Use azure-speech-to-text-rest-py to transcribe this WAV file under 60 seconds through the REST API and return detailed results.” The implementation should read the audio, send the correct Content-Type and language parameters, and handle HTTP status codes and RecognitionStatus values.
Compared to similar skills
Use the Speech SDK or Batch Transcription API when you need audio longer than 60 seconds, real-time streaming, partial results, batch transcription, speech translation, or custom speech models. For the short-audio REST scenario covered here, the Speech SDK is not required.