azure-voicelive
БесплатноБез исполняемых скриптовНе проверенAzure语音交互专业版 —— 面向企业团队与专业开发者的高级实时语音AI工具。核心能力: - 函数调用(Function Tools),支持AI主动调用外部API - 自定义语音集成:Azure标准语音、自定义语音、个人语音 - 电话音频格式支持:G。Use when…
от thcjp868 установок в других каталогахОб этом скилле
Azure语音交互专业版
专业版增值服务
| 能力 | 免费版 | 付费版 |
|---|---|---|
| 基础功能 | 支持 | 支持 |
| Azure语音交互专业版高级会话与中断处理 | 不支持 | 支持 |
| 高级参数配置与自定义规则 | 不支持 | 支持 |
| 批量任务编排与队列管理 | 不支持 | 支持 |
| 结果导出与多格式转换 | 不支持 | 支持 |
| 实时状态监控与异常告警 | 不支持 | 支持 |
能力矩阵
1. 函数调用(Function Tools)
import json
from azure.ai.voicelive.models import FunctionTool
async def voice_assistant_with_tools():
async with connect(
endpoint=os.environ["AZURE_COGNITIVE_SERVICES_ENDPOINT"],
credential=AzureKeyCredential(os.environ["AZURE_COGNITIVE_SERVICES_KEY"]),
model="gpt-4o-realtime-preview"
) as conn:
await conn.session.update(session=RequestSession(
instructions="你是智能客服助手,可以查询订单和天气信息。",
modalities=["text", "audio"],
voice="shimmer",
input_audio_format="pcm16",
output_audio_format="pcm16",
turn_detection={
"type": "server_vad",
"threshold": 0.5,
"prefix_padding_ms": 300,
"silence_duration_ms": 500
},
tools=[
FunctionTool(
type="function",
name="get_order_status",
description="查询订单状态",
parameters={
"type": "object",
"properties": {
"order_id": {"type": "string", "description": "订单号"}
},
"required": ["order_id"]
}
),
FunctionTool(
type="function",
name="get_weather",
description="查询天气信息",
parameters={
"type": "object",
"properties": {
"location": {"type": "string", "description": "城市名"}
},
"required": ["location"]
}
)
]
))
async for event in conn:
match event.type:
case "response.function_call_arguments.done":
result = await handle_function(event.name, event.arguments)
await conn.conversation.item.create(item={
"type": "function_call_output",
"call_id": event.call_id,
"output": json.dumps(result)
})
response.create() # 触发后续响应
audio_transcript.delta":
print(event.delta, end="", flush=True)
audio = base64.b64decode(event.delta)
await play_audio(audio)
break
async def handle_function(name, arguments):
"""处理AI请求的函数调用"""
args = json.loads(arguments)
if name == "get_order_status":
return {"order_id": args["order_id"], "status": "已发货", "eta": "明天到达"}
elif name == "get_weather":
return {"location": args["location"], "temp": "25℃", "condition": "晴"}
return {"error": "未知函数"}
2. 电话音频格式支持
async def telephony_voice_bot():
async with connect(
endpoint=os.environ["AZURE_COGNITIVE_SERVICES_ENDPOINT"],
environ["AZURE_COGNITIVE_SERVICES_KEY"]),
model="gpt-4o-realtime-preview"
) as conn:
await conn.session.update(session={
"instructions": "你是电话客服,请简洁专业地回答。",
"modalities": ["text", "audio"],
"voice": "shimmer",
"input_audio_format": "g711_ulaw", # 电话音频格式
"output_audio_format": "g711_ulaw",
"turn_detection": {
"type": "server_vad",
"silence_duration_ms": 600
}
})
```- 验证执行结果,确认输出符合预期格式
- 异常时参考错误处理章节进行恢复
- 关键参数: `电话音频格式支持` 选项
- 处理流程: 接收输入 -> 执行电话音频格式支持 -> 返回结果
- 输入: 用户提供电话音频格式支持所需的参数和指令
### 3. 中断处理与手动轮次
```python
async def interruptible_assistant():
async with connect(...) as conn:
await conn.session.update(session={
"instructions": "你是语音助手。",
"modalities": ["text", "audio"],
"voice": "alloy",
"turn_detection": {"type": "server_vad", "threshold": 0.5}
})
async for event in conn:
if event.type == "input_audio_buffer.speech_started":
output_audio_buffer.clear()
print("[用户打断,已停止当前回复]")
elif event.type == "response.audio.delta":
b64decode(event.delta)
await play_audio(audio)
async def manual_turn_mode():
await conn.session.update(session={"turn_detection": None})
audio_chunk = await read_audio_from_microphone()
b64_audio = base64.b64encode(audio_chunk).decode()
await conn.input_audio_buffer.append(audio=b64_audio)
await conn.input_audio_buffer.commit() # 结束用户轮次
await conn.response.create()
Установить azure-voicelive в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
readexecwriteFAQ
Что делает скилл azure-voicelive?
Azure语音交互专业版 —— 面向企业团队与专业开发者的高级实时语音AI工具。核心能力: - 函数调用(Function Tools),支持AI主动调用外部API - 自定义语音集成:Azure标准语音、自定义语音、个人语音 - 电话音频格式支持:G。Use when 需要API集成、接口对接、Webhook配置、系统连接时使用。不适用于逆向工程闭源API.
Как установить скилл azure-voicelive?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл azure-voicelive запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic