feat(docs-i18n): translate all documentation into 20 languages

All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
This commit is contained in:
SnapOtter
2026-07-11 13:52:47 +08:00
committed by GitHub
parent 00b651c9f8
commit 4963ab3bbd
3620 changed files with 306134 additions and 0 deletions
@@ -0,0 +1,49 @@
---
description: "在单声道和立体声之间转换,或交换左右声道。"
i18n_source_hash: 4f5cd6b38c83
i18n_provenance: human
i18n_output_hash: e59e20ee2873
---
# 音频声道 {#audio-channels}
在单声道和立体声布局之间转换音频,或交换立体声文件的左右声道。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/audio-channels`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| mode | string | Yes | - | 声道操作:`stereo-to-mono``mono-to-stereo``swap` |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/audio-channels \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"mode": "stereo-to-mono"}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 2300000
}
```
## 说明 {#notes}
- `stereo-to-mono` 将两个声道混合为单个单声道轨道。
- `mono-to-stereo` 将单声道声道复制到左右两个声道。
- `swap` 交换立体声文件的左右声道。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,73 @@
---
description: "查看、编辑或剥除音频元数据标签(ID3)。"
i18n_source_hash: 0717018e11cb
i18n_provenance: human
i18n_output_hash: d5d75b73e81f
---
# 音频元数据 {#audio-metadata}
查看、编辑或剥除音频元数据标签,如标题、艺术家和专辑(ID3 及类似标签格式)。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/audio-metadata`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| strip | boolean | No | `false` | 移除所有现有的元数据标签 |
| title | string | No | - | 设置标题标签(最多 500 个字符) |
| artist | string | No | - | 设置艺术家标签(最多 500 个字符) |
| album | string | No | - | 设置专辑标签(最多 500 个字符) |
## 请求示例 {#example-request}
编辑元数据标签:
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/audio-metadata \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"title": "My Song", "artist": "Artist Name", "album": "Album Name"}'
```
剥除所有元数据:
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/audio-metadata \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"strip": true}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4480000,
"metadata": {
"container": "mp3",
"durationS": 245.3,
"bitrateKbps": 192,
"tags": {
"title": "My Song",
"artist": "Artist Name",
"album": "Album Name"
}
}
}
```
## 说明 {#notes}
- 响应包含一个 `metadata` 对象,其中含有容器格式、时长、比特率和当前标签。
-`strip``true` 时,所有标签字段都会被忽略,且每个现有标签都会被移除。
- 只有你提供的标签会被更新;未指定的标签保持不变。
- 输出格式与输入格式一致。
@@ -0,0 +1,48 @@
---
description: "用倍率加快或减慢音频播放速度。"
i18n_source_hash: e39ba662e594
i18n_provenance: human
i18n_output_hash: d92378e7556a
---
# 音频速度 {#audio-speed}
通过应用速度倍率加快或减慢音频播放速度。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/audio-speed`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| factor | number | No | `1.5` | 速度倍率(0.25 到 4)。低于 1 的值减慢;高于 1 的值加快。 |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/audio-speed \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"factor": 2}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 2250000
}
```
## 说明 {#notes}
- 倍率 `0.25` 以四分之一速度播放(时长为 4 倍)。倍率 `4` 以四倍速度播放(时长为四分之一)。
- 速度改变时音高保持不变(时间伸缩)。若要单独调整音高,请使用变调。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,49 @@
---
description: "在 MP3、WAV、OGG、FLAC 和 M4A 格式之间转换音频。"
i18n_source_hash: fd02c059e6a9
i18n_provenance: human
i18n_output_hash: b158d5872091
---
# 转换音频 {#convert-audio}
在包括 MP3、WAV、OGG、FLAC 和 M4A 在内的常见格式之间转换音频文件,并可配置输出比特率。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/convert-audio`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string | No | `"mp3"` | 输出格式:`mp3``wav``ogg``flac``m4a` |
| bitrateKbps | integer | No | `192` | 输出比特率,单位 kbps32 到 320 |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/convert-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"format": "flac", "bitrateKbps": 256}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.flac",
"originalSize": 4500000,
"processedSize": 8200000
}
```
## 说明 {#notes}
- 支持的输入格式包括 MP3、WAV、OGG、FLAC、AAC、M4A、WMA、AIFF 和 OPUS。
- 比特率仅适用于有损格式(MP3、OGG、M4A)。像 WAV 和 FLAC 这样的无损格式会忽略此设置。
- 输出文件名保留原始名称,仅更换扩展名。
+49
View File
@@ -0,0 +1,49 @@
---
description: "为音频添加淡入和淡出效果。"
i18n_source_hash: 86856451ecb8
i18n_provenance: human
i18n_output_hash: 4ab7d398cde2
---
# 音频淡化 {#fade-audio}
在音频文件的开头和结尾添加淡入和淡出效果。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/fade-audio`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| fadeInS | number | No | `1` | 淡入时长,单位秒(0 到 30) |
| fadeOutS | number | No | `1` | 淡出时长,单位秒(0 到 30) |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/fade-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"fadeInS": 2, "fadeOutS": 3}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4500000
}
```
## 说明 {#notes}
- 将任一值设为 `0` 可跳过该方向的淡化。至少有一个值必须大于 0。
- 如果淡化时长超过音频长度,会被截断到音频长度。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,51 @@
---
description: "将多个音频文件合并为一条顺序轨道。"
i18n_source_hash: defa993d3f87
i18n_provenance: human
i18n_output_hash: dec36c80bc5a
---
# 合并音频 {#merge-audio}
将两个或更多音频文件合并为单条顺序轨道,按上传顺序拼接。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/merge-audio`
接受包含多个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| format | string | No | `"mp3"` | 输出格式:`mp3``wav``flac``m4a` |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/merge-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@intro.mp3" \
-F "file=@main.mp3" \
-F "file=@outro.mp3" \
-F 'settings={"format": "mp3"}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/merged.mp3",
"originalSize": 9500000,
"processedSize": 9200000
}
```
## 说明 {#notes}
- 每个请求接受 2 到 10 个音频文件。
- 文件按上传顺序拼接。
- 所有输入文件都会被重新编码为所选的输出格式和采样率,以实现无缝拼接。
- 支持混合的输入格式(例如一个 WAV 和一个 MP3)。
@@ -0,0 +1,48 @@
---
description: "使用基于 FFT 的降噪从音频中减少背景噪声。"
i18n_source_hash: 57cbdbd449aa
i18n_provenance: human
i18n_output_hash: 97072baf3d73
---
# 降噪 {#noise-reduction}
使用基于 FFT 的降噪,以可选强度减少音频文件中的背景噪声。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/noise-reduction`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| strength | string | No | `"medium"` | 降噪强度:`light``medium``strong` |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/noise-reduction \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"strength": "strong"}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4500000
}
```
## 说明 {#notes}
- `light` 保留更多细节但去除的噪声较少。`strong` 去除更多噪声但可能引入细微的伪影。
- 在具有稳定背景噪声(风扇嗡鸣、空调、静电噪声)的录音上效果最佳。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,46 @@
---
description: "将响度调整到广播标准电平(EBU R128)。"
i18n_source_hash: 794d8cfa5ad8
i18n_provenance: human
i18n_output_hash: 07e2719028af
---
# 归一化音频 {#normalize-audio}
使用 EBU R128 归一化(-16 LUFS)将音频响度调整到广播标准电平。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/normalize-audio`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
此工具没有可配置的参数。它会自动应用 EBU R128 响度归一化。
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/normalize-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3"
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4500000
}
```
## 说明 {#notes}
- 使用 EBU R128 响度标准,目标为 -16 LUFS。
- 适用于播客、有声书以及对一致响度有要求的广播内容。
- 输出中会保留源采样率。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,49 @@
---
description: "以半音为单位升高或降低音频音高,而不改变速度。"
i18n_source_hash: 2804d0eeecc8
i18n_provenance: human
i18n_output_hash: 0e04a5b3b2e8
---
# 变调 {#pitch-shift}
以若干半音为单位升高或降低音频文件的音高,而不改变其播放速度。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/pitch-shift`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| semitones | integer | No | `3` | 要移动的半音数(-12 到 12)。必须为非零值。 |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/pitch-shift \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"semitones": -5}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4500000
}
```
## 说明 {#notes}
- 正值升高音高;负值降低音高。
- 移动 12 个半音等于升高一个八度;-12 等于降低一个八度。
- 无论移动量为多少,播放时长都保持不变。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,44 @@
---
description: "反转音频文件使其倒放。"
i18n_source_hash: 5c2017661803
i18n_provenance: human
i18n_output_hash: e64e84362bd1
---
# 反转音频 {#reverse-audio}
反转音频文件使其倒放。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/reverse-audio`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
此工具没有可配置的参数。整个音频文件都会被反转。
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/reverse-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3"
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4500000
}
```
## 说明 {#notes}
- 整条音频轨道会从末尾到开头反转。
- 输出通常保留输入容器。AAC 输入会写为 M4A,不支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,49 @@
---
description: "从任意音频文件制作铃声片段。"
i18n_source_hash: 8fcdcc545fbc
i18n_provenance: human
i18n_output_hash: f3535f1e8bb2
---
# 铃声制作器 {#ringtone-maker}
通过选择起始时间和时长,从任意音频文件制作铃声片段(.m4r)。
## API 端点 {#api-endpoint}
`POST /api/v1/tools/audio/ringtone-maker`
接受包含一个音频文件和一个 JSON `settings` 字段的 multipart 表单数据。
## 参数 {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| startS | number | No | `0` | 起始时间,单位秒(最小 0) |
| durationS | number | No | `30` | 片段时长,单位秒(1 到 30) |
## 请求示例 {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/ringtone-maker \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"startS": 15, "durationS": 20}'
```
## 响应示例 {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.m4r",
"originalSize": 4500000,
"processedSize": 620000
}
```
## 说明 {#notes}
- 输出始终为 M4R 格式,兼容 iPhone 铃声。
- 铃声最大时长为 30 秒(Apple 限制)。
- 任何音频格式都可用作输入。
@@ -0,0 +1,50 @@
---
description: "从音频文件中删除静音片段。"
i18n_source_hash: a7624fc99b50
i18n_provenance: human
i18n_output_hash: 23718306c561
---
# Silence Removal {#silence-removal}
根据可配置的阈值和最小时长,检测并删除音频文件中的静音片段。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/audio/silence-removal`
接受包含音频文件和 JSON `settings` 字段的 multipart 表单数据。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| thresholdDb | number | No | `-50` | 静音阈值(单位 dB,-80 到 -20)。低于此电平的音频被视为静音。 |
| minSilenceS | number | No | `0.5` | 需要删除的最小静音时长(单位秒,0.1 到 5) |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/silence-removal \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"thresholdDb": -45, "minSilenceS": 1}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 3200000
}
```
## Notes {#notes}
- 阈值越高(负值越小)越激进,会连同较安静的段落和真正的静音一起删除。
- 增大 `minSilenceS` 可只删除较长的停顿,同时保留短暂的自然间隙。
- 适合清理播客录音、讲座和语音备忘录。
- 输出通常保留输入容器格式。AAC 输入会写成 M4A,不受支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,64 @@
---
description: "按时间间隔、等份或静音检测分割音频。"
i18n_source_hash: c062a395dbac
i18n_provenance: human
i18n_output_hash: 3fd40ad03990
---
# Split Audio {#split-audio}
按固定时间间隔、等份或自动静音检测将音频文件分割为多个片段。返回包含这些片段的 ZIP 压缩包。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/audio/split-audio`
接受包含音频文件和 JSON `settings` 字段的 multipart 表单数据。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| mode | string | No | `"time"` | 分割策略:`time``parts``silence` |
| segmentS | number | No | `60` | 每段长度(单位秒,1 到 3600,mode 为 `time` 时使用) |
| parts | integer | No | `2` | 等份数量,2 到 20(mode 为 `parts` 时使用) |
| thresholdDb | number | No | `-40` | 静音阈值(单位 dB-80 到 -20mode 为 `silence` 时使用) |
| minSilenceS | number | No | `0.3` | 最小静音间隙(单位秒,0.1 到 10,mode 为 `silence` 时使用) |
## Example Request {#example-request}
分割为 30 秒的片段:
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/split-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"mode": "time", "segmentS": 30}'
```
按静音检测分割:
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/split-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"mode": "silence", "thresholdDb": -35, "minSilenceS": 0.5}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio_parts.zip",
"originalSize": 4500000,
"processedSize": 4600000
}
```
## Notes {#notes}
- `downloadUrl` 指向包含所有片段的 ZIP 压缩包。
- 只使用与所选 `mode` 相关的参数,其他参数会被忽略。
- 片段文件名按顺序编号(例如 `part-000.mp3``part-001.mp3`)。
- 输出格式与输入格式一致。
@@ -0,0 +1,53 @@
---
description: "使用 AI 驱动的转写将语音转换为文本。"
i18n_source_hash: ae98c4c0aed2
i18n_provenance: human
i18n_output_hash: 85e9922f3b8c
---
# Transcribe Audio {#transcribe-audio}
使用 AI 驱动的转写(faster-whisper)将语音转换为文本。支持纯文本、SRT 和 VTT 输出格式,并可自动或手动选择语言。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/audio/transcribe-audio`
接受包含音频文件和 JSON `settings` 字段的 multipart 表单数据。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| language | string | No | `"auto"` | 语言:`auto``en``de``fr``es``zh``ja``ko``id``th``vi` |
| outputFormat | string | No | `"txt"` | 输出格式:`txt``srt``vtt` |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/transcribe-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"language": "en", "outputFormat": "srt"}'
```
## Example Response {#example-response}
这是一个异步工具。API 会立即返回 `202 Accepted`
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"async": true
}
```
通过 `GET /api/v1/jobs/{jobId}/progress` 处的 SSE 跟踪进度。作业完成后,SSE 流会传递带有 `downloadUrl` 的最终结果。
## Notes {#notes}
- 需要安装 **transcription** 功能包。如果该功能包不可用,会返回 `501`,其代码为 `FEATURE_NOT_INSTALLED`,并包含缺失的 `feature``featureName``estimatedSize`
- 使用 faster-whisper 进行转写。语言设为 `auto` 时会自动检测所说的语言。
- `srt``vtt` 格式为每个片段包含时间戳,适合用作字幕。
- `txt` 格式返回不带时间戳的纯文本。
- 这是一个长时间运行的 AI 工具,处理时间取决于音频长度和服务器硬件。
+50
View File
@@ -0,0 +1,50 @@
---
description: "通过指定开始和结束时间从音频文件中裁剪出一段。"
i18n_source_hash: 8b80c5c8a711
i18n_provenance: human
i18n_output_hash: 3c8a6fca1ac4
---
# Trim Audio {#trim-audio}
通过以秒为单位指定开始和结束时间,从音频文件中裁剪出一段。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/audio/trim-audio`
接受包含音频文件和 JSON `settings` 字段的 multipart 表单数据。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| startS | number | No | `0` | 开始时间(单位秒,最小为 0) |
| endS | number | Yes | - | 结束时间(单位秒,必须晚于开始时间) |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/trim-audio \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"startS": 10, "endS": 45}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 1575000
}
```
## Notes {#notes}
- 时间以秒为单位指定,可以包含小数(例如 `10.5`)。
- `endS` 值必须大于 `startS`
- 如果 `endS` 超过音频时长,文件会裁剪到结尾。
- 输出通常保留输入容器格式。AAC 输入会写成 M4A,不受支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,48 @@
---
description: "按固定的分贝增益增大或减小音频音量。"
i18n_source_hash: b9bc1de2c9ef
i18n_provenance: human
i18n_output_hash: da87d398b6f3
---
# Volume Adjust {#volume-adjust}
通过施加固定的分贝增益来增大或减小音频文件的音量。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/audio/volume-adjust`
接受包含音频文件和 JSON `settings` 字段的 multipart 表单数据。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| gainDb | number | No | `3` | 音量调整量(单位分贝,-30 到 30) |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/volume-adjust \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"gainDb": 6}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.mp3",
"originalSize": 4500000,
"processedSize": 4500000
}
```
## Notes {#notes}
- 正值增大音量,负值减小音量。
- 较大的正增益可能导致削波。可使用 normalize-audio 进行响度安全的电平调整。
- 输出通常保留输入容器格式。AAC 输入会写成 M4A,不受支持的仅解码输入会回退为 MP3。
@@ -0,0 +1,50 @@
---
description: "从音频文件生成波形可视化的 PNG 图片。"
i18n_source_hash: 5480106dfe48
i18n_provenance: human
i18n_output_hash: bab1cdd0c8ea
---
# Waveform Image {#waveform-image}
从音频文件生成波形可视化的 PNG 图片,尺寸和颜色可配置。
## API Endpoint {#api-endpoint}
`POST /api/v1/tools/audio/waveform-image`
接受包含音频文件和 JSON `settings` 字段的 multipart 表单数据。
## Parameters {#parameters}
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| width | integer | No | `1024` | 图片宽度(单位像素,256 到 3840) |
| height | integer | No | `256` | 图片高度(单位像素,64 到 1080) |
| color | string | No | `"#4f46e5"` | 波形的十六进制颜色(例如 `"#4f46e5"` |
## Example Request {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/audio/waveform-image \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@audio.mp3" \
-F 'settings={"width": 1920, "height": 400, "color": "#e07832"}'
```
## Example Response {#example-response}
```json
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.png",
"originalSize": 4500000,
"processedSize": 45000
}
```
## Notes {#notes}
- 无论输入音频格式如何,输出始终是 PNG 图片。
- 波形在透明背景上渲染。
- 适合用作缩略图、社交媒体预览或嵌入网页。