语音转文字 API
/transcribe将音频文件转换为文本,支持多种格式和自定义词典。
长音频可能返回 pending/running 的 AI 优化状态,并在后台完成分块优化。此处代码示例覆盖公开 /transcribe 请求;内部 AI optimization job 查询和恢复端点不对外开放。
开启 AI 优化时,响应中的 dify_processing 可能包含可选的 n8n_workflow_name、n8n_workflow_id、n8n_call_id 和 n8n_execution_id 诊断字段;桌面端 Records 重试成功后也会保留相同的工作流身份。预取缓存命中会复用首次调用,所以 finalize 不会为了生成这些字段而重复触发工作流;这些标识不是认证凭据,仍不应与转写原文、API key 或 webhook URL 一起公开。
/transcribe 接口需要 multipart/form-data 格式,音频文件必须放在 'audio' 字段下(不是 'file')。可选表单字段包括 'prompt' 和 'dict'(误拼与正确拼写键值对的 JSON 字符串数组)。
cURL Multipart 音频转写示例
curl -X POST "https://api.vowise.com/transcribe" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "prompt=Interview about technology" \
-F 'dict=[{"misspelling":"AI","correct_spelling":"Artificial Intelligence"}]'/v1/audio/transcriptionsOpenAI Whisper Compatible完全兼容 OpenAI Audio Transcriptions (Whisper) 协议的标准端点。只需将任何支持自定义 OpenAI Base URL 的客户端(如 Orca、Paseo、Open WebUI、LobeChat、Cherry Studio、Obsidian Whisper、VoiceInk、Superwhisper、OpenAI SDK)指向 https://api.vowise.com/v1,即可直接调用 Vowise 语音识别、账号云端自定义词典与 AI 润色管线。
https://api.vowise.com/v1Bearer vowise_YOUR_API_KEYjson (default) | text| 模型名称 (model) | 处理管线 | 适用场景 |
|---|---|---|
| vowise-pro | ASR 语音识别 + 账号云端自定义词典 + AI 润色去口癖与排版(默认) | Orca、Paseo、笔记软件、日常口述成文 |
| vowise-raw | ASR 语音识别 + 账号云端自定义词典(跳过 AI 润色,极速返回原文) | 终端命令口述、极低延迟原始逐字转写 |
| whisper-1 | 自动映射至 vowise-pro 管线,兼容写死模型名的第三方工具 | Obsidian Whisper、固定模型名客户端 |
cURL 示例(OpenAI 兼容端点)
curl -X POST "https://api.vowise.com/v1/audio/transcriptions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "model=vowise-pro" \
-F "language=zh" \
-F "prompt=Orca, Paseo, Vowise"词典管理 API
/api/v1/dictionary获取用户的所有词典条目。
在线测试
/api/v1/dictionary/add添加或更新词典条目。
在线测试
/api/v1/dictionary/delete删除指定的词典条目。需要在URL参数中提供 misspelling。
在线测试
内容工作流 API
Authorization: Bearer YOUR_API_KEY以下接口只返回当前 API Key 所属用户的内容。平台版本功能会按环境逐步开放;客户端必须处理 404、409 和 503,不能因为路由存在就假设当前产品界面已经启用。
/api/v1/content/items/{id}/family读取一份主稿、它的平台版本、生成状态、批准状态和新鲜度。
/api/v1/content/items/{master_id}/variants按用户拥有的有效 Channel 创建或复用平台版本;一次最多选择 10 个目标。
/api/v1/content/items/{variant_id}/regenerate为已有平台版本建立新的生成任务,同时保留主稿快照和用户编辑冲突保护。
/api/v1/content/items/{variant_id}/approve只批准请求中 content_hash 对应的当前标题与正文;后续编辑会使批准失效。
/api/v1/content/items/{id}/deliveries记录直接分享、复制或文件导出的证据状态;打开分享面板不等于外部平台已发布。
/api/v1/content/items/{variant_id}/deliveries/manual在人工发布已批准且未过期的平台版本后记录确认结果;该接口不会调用第三方平台。
派生平台版本请求示例
client_request_id 必须在当前用户范围内稳定且唯一。相同 ID 只能重放完全相同的主稿、Channel、预设和来源快照;换成其他请求内容会返回 409 idempotency_conflict。
curl -X POST "https://api.vowise.com/api/v1/content/items/CONTENT_ITEM_ID/variants" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_request_id": "client-generated-stable-id",
"targets": [
{ "channel_id": "CHANNEL_ID", "preset_id": "PRESET_ID" }
]
}'分发证据边界
内容工作流不会保存第三方账号凭据,也不会代表用户自动发帖。native_share 或浏览器分享面板通常只能证明动作已发起、已展示或结果未知;只有独立可信证据才能把外部结果记为 confirmed。内部 generation callback 由服务密钥保护,不属于公开 API,也不会在这里提供测试器。
集成与代码示例
Python (requests)
import requests
# 1. Transcribe audio with multipart form upload
url = "https://api.vowise.com/transcribe"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
files = {"audio": open("audio.wav", "rb")}
data = {
"prompt": "Interview about technology",
"dict": '[{"misspelling": "AI", "correct_spelling": "Artificial Intelligence"}]'
}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())
# 2. Manage dictionary
dict_url = "https://api.vowise.com/api/v1/dictionary"
entries = requests.get(dict_url, headers=headers).json()
print("Dictionary entries:", entries)
# Delete dictionary entry (misspelling as query parameter)
requests.delete(f"{dict_url}/delete", headers=headers, params={"misspelling": "AI"})JavaScript (fetch)
// 1. Transcribe audio with FormData
const formData = new FormData();
formData.append("audio", audioFile); // File or Blob object
formData.append("prompt", "Interview about technology");
formData.append("dict", JSON.stringify([
{ misspelling: "AI", correct_spelling: "Artificial Intelligence" }
]));
const transcribeRes = await fetch("https://api.vowise.com/transcribe", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY"
},
body: formData
});
const result = await transcribeRes.json();
console.log("Transcript:", result.text);
// 2. Manage dictionary
const dictRes = await fetch("https://api.vowise.com/api/v1/dictionary", {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const entries = await dictRes.json();
console.log("Dictionary entries:", entries);
// Delete dictionary entry (misspelling as query parameter)
await fetch("https://api.vowise.com/api/v1/dictionary/delete?misspelling=AI", {
method: "DELETE",
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});Python (OpenAI 官方 SDK 零代码改造)
from openai import OpenAI
client = OpenAI(
base_url="https://api.vowise.com/v1",
api_key="YOUR_API_KEY", # vowise_...
)
with open("audio.wav", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="vowise-pro", # or "vowise-raw"
file=audio_file,
language="zh",
prompt="Orca, Paseo, Vowise"
)
print(transcript.text)TypeScript / Node.js (OpenAI 官方 SDK)
import fs from "node:fs";
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.vowise.com/v1",
apiKey: process.env.VOWISE_API_KEY, // vowise_...
});
const transcript = await client.audio.transcriptions.create({
file: fs.createReadStream("audio.wav"),
model: "vowise-pro", // or "vowise-raw"
language: "zh",
});
console.log(transcript.text);