> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mountsea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 调整速度

> 调整现有音频片段的播放速度

调整现有片段的播放速度。返回一个调整速度后的新片段。

## 请求体

<ParamField body="clip_id" type="string" required>
  要调整速度的源片段 ID。
</ParamField>

<ParamField body="speed_multiplier" type="number" required>
  速度倍率值，范围为 0.25 到 4.0。

  | 值      | 效果         |
  | ------ | ---------- |
  | `0.25` | 4 倍减速（最小值） |
  | `0.5`  | 2 倍减速      |
  | `1.0`  | 原始速度       |
  | `1.5`  | 1.5 倍加速    |
  | `2.0`  | 2 倍加速      |
  | `4.0`  | 4 倍加速（最大值） |
</ParamField>

<ParamField body="keep_pitch" type="boolean" default="true">
  调整速度时是否保持原始音高。

  * `true`：保持原始音高（推荐）
  * `false`：音高随速度变化
</ParamField>

<ParamField body="title" type="string">
  调整后片段的可选新标题。
</ParamField>

## 响应

<ResponseField name="taskId" type="string">
  任务 ID。使用此 ID 通过[获取任务状态](/zh/api-reference/suno/task)查询任务状态。
</ResponseField>

## 示例

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.mountsea.ai/suno/v2/adjustSpeed \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer your-api-key" \
    -d '{
      "clip_id": "your-clip-id",
      "speed_multiplier": 1.45,
      "keep_pitch": true,
      "title": "My Song (1.45x)"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.mountsea.ai/suno/v2/adjustSpeed', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer your-api-key'
    },
    body: JSON.stringify({
      clip_id: 'your-clip-id',
      speed_multiplier: 1.45,
      keep_pitch: true,
      title: 'My Song (1.45x)'
    })
  });

  const data = await response.json();
  console.log(data.taskId);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.mountsea.ai/suno/v2/adjustSpeed',
      headers={
          'Content-Type': 'application/json',
          'Authorization': 'Bearer your-api-key'
      },
      json={
          'clip_id': 'your-clip-id',
          'speed_multiplier': 1.45,
          'keep_pitch': True,
          'title': 'My Song (1.45x)'
      }
  )

  data = response.json()
  print(data['taskId'])
  ```
</CodeGroup>

## 响应示例

```json theme={null}
{
  "taskId": "15c257ff-43f7-4678-bd41-202ad6b8488b"
}
```

<Tip>
  将 `keep_pitch` 设为 `true` 可在加速或减速时保持原始声音特质。这使用了时间拉伸算法来保持音高不变。
</Tip>

<Warning>
  极端的速度调整（接近 0.25 或 4.0）可能会产生音频伪影。为获得最佳质量，建议保持在 0.75 - 1.5 倍的范围内。
</Warning>
