azure-ai-transcription-py
它能做什么
这个工具可以把文件中的音频转换成文字,还能告诉你每个词是在什么时间说出来的。
适用场景
- ✓当你有一个录制好的音频文件,并且想要得到它的文字内容时。
- ✓想知道音频中每个词是在什么时候说出的。
- ✓需要对已获得授权的音频文件进行精确转写时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-ai-transcription-py/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把这段音频转写成文字,并告诉我每个词是在什么时候说出的。”
每周 5 个新技能,1 分钟读完。
工作原理
你把音频文件提供给这个工具。它会调用 Microsoft 的服务处理音频,生成带有时间戳的文字。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Azure AI Speech Transcription for Python
When to Use
- Transcribe an authorized audio file with the
azure-ai-transcriptionclient. - Review timestamped output and options supported by the installed SDK version.
- For streaming or asynchronous batch jobs, select the appropriate Speech API instead.
Prerequisites
Use a project-pinned SDK in an isolated Python environment. Confirm the Speech resource, endpoint, permissions, audio consent, cost and retention before upload. Do not log keys, audio contents, or full transcripts by default.
File Example
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.transcription import TranscriptionClient
from azure.ai.transcription.models import TranscriptionContent, TranscriptionOptions
client = TranscriptionClient(
endpoint=os.environ["TRANSCRIPTION_ENDPOINT"],
credential=AzureKeyCredential(os.environ["TRANSCRIPTION_KEY"]),
)
with client:
with open("audio.wav", "rb") as audio:
result = client.transcribe(TranscriptionContent(
definition=TranscriptionOptions(locales=["en-US"]), audio=audio,
))
# Inspect result locally; handle empty output and service errors explicitly.
Authentication and API Boundary
DefaultAzureCredential is also supported when the identity has the required
resource role. The previous begin_transcription and begin_stream_transcription
examples did not match this client. Do not invent a streaming adapter.
Example Request
“Transcribe this consented local recording; keep the transcript private.”
Limitations
Verify installed signatures and service limits against Microsoft's SDK guide. This illustration has not contacted Azure; availability, accuracy and costs require verification in the authorized environment.
常见问题
可以用来处理实时音频吗?
不可以,这个工具只针对已经录制好的音频文件。如果需要处理实时音频,你需要换用其他工具。
使用它需要付费吗?
需要。使用这项服务可能会产生费用,使用前请先查看价格和相关权限。
「已授权的音频」是什么意思?
指你有权使用这段音频,例如你自己的录音,或者经过相关人员同意的录音。
详情
作者的原始描述
Azure AI Transcription SDK for Python. Use for audio-file transcription with timestamps; distinguish this client from streaming and asynchronous batch Speech APIs.
热度
- GitHub 星标
- 48k
- 排名
- #3895
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。