# Migrate to IndexTTS 2.5

Switching from IndexTTS 2 to `IndexTTS-2.5` changes how your application generates speech. **You need to migrate existing custom voices manually**. Recreate each voice from its original reference audio, then replace the old `uspeech:` voice ID in your application.

| Feature | IndexTTS 2 | IndexTTS 2.5 |
| --- | --- | --- |
| Speech generation | The request returns audio directly | Submit an asynchronous task, check its status, and download the audio |
| Reference audio | Upload audio with the request | Upload reference audio separately and refer to it by its asset ID |
| Custom voices | Use the existing voice ID | Create a reusable voice from an uploaded asset and receive a new voice ID |

**The billing method is the same as for IndexTTS 2.** Successful speech generation is billed by input text character count, including punctuation and whitespace. There is no separate charge for the generated audio.

## 1. Prepare your reference audio

Identify the custom voices you want to migrate and gather their original reference audio. If a recording is missing, prepare a new one. If you only use preset voices, choose a preset from the IndexTTS 2.5 voice list and start at step 4.

For the examples below, set `MODELVERSE_API_KEY` to a ModelVerse API key with access to your target project.

## 2. Upload a reference audio asset

IndexTTS 2.5 lets you upload reference audio separately. Call `POST /v1/files` and save the returned `id` as your `asset_id`. This example uses a five-second file named `speaker.wav`. Set the duration to match your own file.

```bash
curl https://api.umodelverse.ai/v1/files \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -F 'purpose=tts:speech_reference:IndexTTS-2.5' \
  -F 'duration_ms=5000' \
  -F 'file=@speaker.wav'
```

Use the uploaded asset to create a reusable voice or generate speech directly. To try the reference audio without saving a voice, skip step 3 and select the asset as the voice source when you submit your task.

## 3. Create a new voice from the asset

Replace `<ASSET_ID>` with the ID from the previous step and call `POST /v1/audio/voice/upload`.

```bash
curl https://api.umodelverse.ai/v1/audio/voice/upload \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"IndexTTS-2.5","name":"Customer support voice","asset_id":"<ASSET_ID>"}'
```

The returned `id` is your new `voice_id`. Record the old and new IDs for each voice so you can update your application. You can also confirm that the new voice appears in the IndexTTS 2.5 voice list.

## 4. Submit a task and retrieve the audio

To test your new voice, replace `<VOICE_ID>` with the ID from step 3 and submit a task. For a preset voice or a direct asset reference, see the voice source options in the API reference.

```bash
curl https://api.umodelverse.ai/v1/tasks/submit \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model":"IndexTTS-2.5",
    "input":{"text":"Hello, welcome to speech synthesis."},
    "parameters":{"language":"EN","voice":{"source":"custom","voice_id":"<VOICE_ID>"}}
  }'
```

Save the `output.task_id` returned when the task is accepted. Use it to check the task status. Once the status is `Success`, download the audio from the links in `output.urls`.

```bash
curl 'https://api.umodelverse.ai/v1/tasks/status?task_id=<TASK_ID>' \
  -H "Authorization: Bearer $MODELVERSE_API_KEY"
```

For full parameters, file requirements, and response examples, open the [ModelVerse API reference](https://astraflow.ucloud.cn/en-us/reference/modelverse-api-protocol/llm/chat/chat-completion#tag/chat-completions/POST/v1/chat/completions) and find Upload IndexTTS 2.5 Reference, Create IndexTTS 2.5 Voice from Asset, List IndexTTS 2.5 Voices, Create IndexTTS 2.5 Speech Task, and Get IndexTTS 2.5 Task Status in the Audio Generation menu.
