SUNO allows us to create custom voice personas from any audio file, enabling voice cloning for music generation. Unlike the existing Persona API (which uses Suno-generatedDocumentation Index
Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
audio_id), this API accepts a publicly accessible audio_url, i.e., your own voice recording. This document explains how to integrate with the voice cloning API.
Step 1: Create a Voice Persona
This API has three input parameters:audio_url (required), which is a publicly accessible URL to an MP3 or WAV audio file containing a single clear voice; name and description (optional), which specify the name and description of the voice persona.
Audio file requirements:
- Format: MP3 or WAV
- Duration: At least 10 seconds
- Content: Single clear voice, with minimal background noise or music
persona_id field in data is the ID of the created voice persona. The is_public field is always false because voice personas created by uploading audio are private.
Step 2: Generate Music Using the Voice Persona
Once you have the voice persona ID, you can use the Suno Audios Generation API to generate music. Setaction to generate and set persona_id to the voice persona ID returned above. The generated song will be sung using the cloned voice.
Note: Voice cloning only supports modelschirp-v4-5and above (such aschirp-v4-5,chirp-v5,chirp-v5-5), and does not supportchirp-v4.
persona_id can also be used with the cover action to have the cloned voice cover existing songs.
