- REST API
- Call Endpoint API with YouTube link and prompt
- Downloads first 60 seconds of provided YouTube audio
- Invokes Chatterbox TTS model
- Returns base64 encoded WAV audio
- Get a RunPod account, maybe use my referral link
Deploy endpoint (docs):
- Go to https://console.runpod.io/serverless
- -> New Endpoint
- -> GitHub Repo, choose https://github.com/geronimi73/runpod_chatterbox
- Check
Endpoint IDof your deployed endpoint at https://console.runpod.io/serverless - Create an
API keyat https://console.runpod.io/user/settings
const requestConfig = {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + RP_API_KEY
},
body: JSON.stringify({
"input": {
"prompt": "Hello world",
"yt_url": "https://www.youtube.com/shorts/jcNzoONhrmE",
}
})
};
const url = "https://api.runpod.ai/v2/" + RP_ENDPOINT + "/runsync";
const response = await fetch(url, requestConfig);
let data = await response.json();
data = data.output
// audio data in data.audio_base64- Takes 3-4 Minutes to init worker