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

# Suno Vox API 連携説明

> Suno Music Generation API guide - Ace Data Cloud

SUNO では新バージョンのPersona-v2-vox版:歌手スタイルを作成できます。旧バージョンと異なり、先に`vox_audio_id`を取得する必要があります。本ドキュメントでは、新バージョンのPersona-v2-voxを作成する連携方法について説明します。

まず、この API を使用して`vox_audio_id`パラメータ値を取得する必要があります。このAPIには、`audio_id`、`vocal_start`、`vocal_end`など複数の入力パラメータを入力できます。これは参照する楽曲IDおよび選択した時間範囲です。

ここで入力する `audio_id` は `42599b24-fb14-4cd3-a444-e15ffde3661b` です。

```python theme={null}
import requests

url = "https://api.acedata.cloud/suno/vox"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "audio_id": "42599b24-fb14-4cd3-a444-e15ffde3661b",
    "vocal_end": 30,
    "vocal_start": 20
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)
```

結果は以下のとおりです：

```json theme={null}
{
  "success": true,
  "task_id": "9d5ce870-18e3-4c17-a1d9-7ef5a07918e9",
  "trace_id": "c31b50cd-0dbe-4e53-a7a5-83965dc5ad6b",
  "data": {
    "id": "24f0827e-5847-4011-b9b7-fc0b62032b65",
    "source_clip_id": "42599b24-fb14-4cd3-a444-e15ffde3661b",
    "status": "complete",
    "vocal_audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
    "vocal_end_s": 30,
    "vocal_start_s": 20,
    "wave_response": {
      "waveform_aggregates": [
        {
          "data": [
            [
              -4,
              4,
              -50,
              73,
              -2517,
              2887,
              294
            ],
            [
              -5,
              4,
              296
            ]
          ],
          "mip_map_level": 11
        },
        {
          "data": [
            [
              -19576,
              20406,
              -16717,
              16980,
              -18926,
              20807,
              -20029,
              20103,
              -16437,
              20899
            ],
            [
              -19578,
              20406,
              -16720,
              16980,
              -18825,
              20051,
              -20029,
              20103,
              -16453,
              20903
            ]
          ],
          "mip_map_level": 20
        }
      ]
    }
  }
}
```

確認できるように、`data` の `id` フィールドが求める`vox_audio_id`です。その後、[Persona API](https://platform.acedata.cloud/documents/suno-persona)で新バージョンのPersona-v2-vox:歌手スタイルを作成します。具体的な入力は以下のとおりです：

```python theme={null}
import requests

url = "https://api.acedata.cloud/suno/persona"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "name": "test",
    "audio_id": "42599b24-fb14-4cd3-a444-e15ffde3661b",
    "vocal_end": 30,
    "vocal_start": 20,
    "vox_audio_id": "24f0827e-5847-4011-b9b7-fc0b62032b65"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)
```

呼び出し後、以下の結果が得られます：

```json theme={null}
{
  "success": true,
  "task_id": "e04b06a1-ff61-48e2-9fcc-15284bd18481",
  "data": {
    "persona_id": "49bef16d-6a09-49d1-8c24-a81663698b98"
  }
}
```

その後、上記の`persona_id`値に基づいて新バージョンのPersona-v2-vox:歌手スタイルによる作曲を行えます。具体的な作曲方法は[Suno 楽曲生成 API 連携説明](https://platform.acedata.cloud/documents/suno-audios-integration#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%AD%8C%E6%89%8B%E9%A3%8E%E6%A0%BC%E7%94%9F%E6%88%90%E5%8A%9F%E8%83%BD)と同じです。これにより、最終的にSuno Vox APIを通じて新バージョンのPersona-v2-vox:歌手スタイルで楽曲を作成できます。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.