SenseAudio Open Platform
Use this skill for implementation work around api.senseaudio.cn and wss://api.senseaudio.cn.
Quick Routing
- - TTS text-to-speech: read INLINECODE2
- ASR speech recognition and audio analysis: read INLINECODE3
- Realtime agent session lifecycle: read INLINECODE4
- Video generation and storyboard APIs: read INLINECODE5
- Voice plan levels and clone constraints: read INLINECODE6
Load only the relevant reference file(s) for the user task.
Default Workflow
- 1. Confirm capability and protocol:
- - TTS: HTTP sync, SSE stream, or WebSocket stream.
- ASR: HTTP file transcription or WebSocket realtime stream.
- Agent: REST lifecycle plus external realtime media channel.
- Video: upload/create/poll/storyboard pipeline.
- 2. Build a minimal valid request first:
- - Add
Authorization: Bearer <API_KEY>. - Set required fields only.
- Validate model and endpoint compatibility.
- 3. Add advanced options only when asked:
- - Voice tuning, dictionary, translation, diarization, timestamps, storyboard edits.
- 4. Parse responses safely:
- - Check status fields before using payload data.
- For TTS, decode hex audio to bytes before saving or playback.
- For streams, aggregate chunks and finalize on terminal event/status.
- 5. Add production hardening:
- - Timeout and retry strategy for transient failures.
- Explicit handling of auth, quota, parameter, and not-found errors.
- Structured logs with
trace_id or session identifiers when available.
Implementation Rules
- - Keep API keys in environment variables, never hardcode secrets.
- Prefer curl first for reproducibility, then provide language SDK code.
- For WebSocket flows, enforce event ordering from the reference docs.
- Keep examples copy-paste runnable.
- If user provides invalid parameter combinations, explain the exact fix.
Output Checklist
When producing implementation output, include:
- 1. Chosen endpoint and protocol.
- Minimal request example.
- One production-ready version (language requested by user).
- Error handling and response parsing notes.
- Any model-specific constraints that apply.
SenseAudio开放平台
使用此技能进行与api.senseaudio.cn和wss://api.senseaudio.cn相关的实现工作。
快速路由
- - TTS文本转语音:阅读references/tts.md
- ASR语音识别与音频分析:阅读references/asr.md
- 实时智能体会话生命周期:阅读references/agent.md
- 视频生成与分镜API:阅读references/video.md
- 语音套餐等级与克隆限制:阅读references/voice.md
仅加载用户任务相关的参考文件。
默认工作流程
- 1. 确认能力与协议:
- - TTS:HTTP同步、SSE流或WebSocket流。
- ASR:HTTP文件转录或WebSocket实时流。
- 智能体:REST生命周期加外部实时媒体通道。
- 视频:上传/创建/轮询/分镜管线。
- 2. 首先构建最小有效请求:
- - 添加Authorization: Bearer 。
- 仅设置必填字段。
- 验证模型与端点兼容性。
- 3. 仅在用户要求时添加高级选项:
- - 语音调优、词典、翻译、说话人分离、时间戳、分镜编辑。
- 4. 安全解析响应:
- - 使用载荷数据前检查状态字段。
- 对于TTS,保存或播放前将十六进制音频解码为字节。
- 对于流式,聚合数据块并在终端事件/状态时完成。
- 5. 添加生产环境加固:
- - 针对临时故障的超时和重试策略。
- 明确处理认证、配额、参数和未找到错误。
- 在可用时使用trace_id或会话标识符的结构化日志。
实现规则
- - 将API密钥保存在环境变量中,切勿硬编码密钥。
- 优先使用curl以确保可复现性,然后提供语言SDK代码。
- 对于WebSocket流,遵循参考文档中的事件顺序。
- 保持示例可直接复制运行。
- 如果用户提供无效参数组合,解释确切的修复方法。
输出检查清单
生成实现输出时,需包含:
- 1. 所选端点与协议。
- 最小请求示例。
- 一个生产就绪版本(用户要求的语言)。
- 错误处理与响应解析说明。
- 任何适用的模型特定约束。