Speech To TextHeartmula
ai/heartmula/transcribe-lyrics 音频歌词转写
heartmula/transcribe-lyrics
HeartMuLa Transcribe 使用先进的 AI 从音频文件中提取歌词,支持多语言转写。提供开箱即用的 REST 推理 API,性能出色、无冷启动,价格实惠。
示例
参数
| 名称 | 类型 | 默认 | 约束 | 说明 |
|---|---|---|---|---|
| audio *音频 | audio_upload | — | audio/* | 用于转写歌词的音频文件 URL。 |
输出字段
| 字段 | 类型 | 说明 |
|---|---|---|
| outputs | array<object> |
API
通过统一 REST API 调用本模型;在 API Keys 页获取密钥。
cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/heartmula/transcribe-lyrics" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"audio": "https://d5v2vcqcwe9y5.cloudfront.net/algorithm/video_translate/260327/default/qtqfcgymg08o.wav"
}
}'
# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
-H "Authorization: Bearer YOUR_API_KEY"Python
import time, requests
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# 1) Submit
resp = requests.post(
"https://www.namifusion.com/api/v1/marketplace/run/heartmula/transcribe-lyrics",
headers=HEADERS,
json={
"input": {
"audio": "https://d5v2vcqcwe9y5.cloudfront.net/algorithm/video_translate/260327/default/qtqfcgymg08o.wav"
}
},
)
resp.raise_for_status() # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()
# 2) Poll until a terminal state (completed / failed / cancelled).
# This model is allowed up to 300s server-side.
deadline = time.time() + 360
while task.get("status") not in ("completed", "failed", "cancelled"):
if time.time() > deadline:
raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
time.sleep(3)
poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
poll.raise_for_status()
task = poll.json()
print(task["status"], task.get("output"))JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };
// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/heartmula/transcribe-lyrics", {
method: "POST",
headers: { ...HEADERS, "Content-Type": "application/json" },
body: JSON.stringify({
"input": {
"audio": "https://d5v2vcqcwe9y5.cloudfront.net/algorithm/video_translate/260327/default/qtqfcgymg08o.wav"
}
}),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();
// 2) Poll until a terminal state (completed / failed / cancelled).
// This model is allowed up to 300s server-side.
const deadline = Date.now() + 360 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
await new Promise((r) => setTimeout(r, 3000));
const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
task = await poll.json();
}
console.log(task.status, task.output);文档
ai/heartmula/transcribe-lyrics
高性价比的多语言歌词转写模型,支持即开即用、无冷启动。
ai/heartmula/transcribe-lyrics 是一款专注于从音频中提取歌词内容的 AI 模型,适用于歌曲转写、歌词整理与多语言音频内容处理。该模型强调稳定性能、无冷启动体验与较低使用成本,适合需要快速批量处理音频歌词的开发者与内容平台。
🚀 关键特性
- 歌词转写优化:专为音频中的歌词提取设计,相比通用语音转写流程更适合音乐内容场景。
- 支持多语言:可用于多语言歌曲与跨语种音频内容的歌词识别与整理。
- 无冷启动:提供更稳定的在线推理体验,适合对响应一致性有要求的生产环境。
- 即开即用:输入音频 URL 即可发起处理,便于快速接入现有内容工作流。
- 高性价比:以较低单次成本支持歌词提取任务,适合批量处理与平台化部署。
🛠️ 技术规格
| 项目 | 说明 |
|---|---|
| 模型架构 | AI 歌词转写模型 |
| 任务类型 | 音频转文本(歌词提取) |
| 输入 | 音频 URL |
| 输入格式 | 字符串(audio) |
| 输出 | 歌词文本 |
| 音频支持 | 多语言音频 |
| 延迟 | 在线推理优化,支持无冷启动体验 |
| 部署特性 | 面向生产环境的稳定性能 |
示例提示词
注:该模型主要接收音频输入,不依赖提示词进行控制。以下示例展示的是典型任务描述方式,便于理解使用场景。
- 提取这段歌曲音频中的完整歌词内容。
- 将该多语言歌曲中的歌词按原始语言转写输出。
- 识别音频中的演唱内容,并整理为可读歌词文本。
💰 价格
| 计费项 | 价格 |
|---|---|
| 基础价格 | $0.05 |
💡 最佳使用场景
- 音乐平台内容整理:为歌曲库自动生成歌词文本,提升检索与展示能力。
- UGC 与短视频平台:从背景音乐或演唱内容中提取歌词,用于字幕、搜索或内容标注。
- 数字媒体归档:对历史音频、演唱录音或节目片段进行歌词化整理与结构化存档。
- 多语言内容分析:用于跨语言歌曲内容识别、歌词对照与国际化内容处理。