Skip to main content

Audio & Voice Generation

Generate music and sound effects from text, and synthesize speech (text-to-speech), on the generative backend.

Active public models

Text-to-audio (music / sound):

ModelEndpointSource repo
MusicGen Smallhf-facebook-musicgen-smallfacebook/musicgen-small
AudioLDM2hf-cvssp-audioldm2cvssp/audioldm2

Text-to-speech (voice):

ModelEndpointSource repo
Chatterboxchatterbox-ttsResembleAI/chatterbox-turbo
Kokoro 82Mkokoro-ttshexgrad/Kokoro-82M
Bark Smallhf-suno-bark-smallsuno/bark-small
Parler-TTS Minihf-parler-tts-parler-tts-mini-v1parler-tts/parler-tts-mini-v1

All active endpoints are currently free; several are candidate. Verify in the live catalog:

curl "https://api.colabhive.com/api/builder/v1/endpoints?visibility=public&task_type=text-to-speech"
curl "https://api.colabhive.com/api/builder/v1/endpoints?visibility=public&task_type=text-to-audio"

You can import HuggingFace audio models as well.

Quick start

Text-to-music

from colabhive import ColabHive

client = ColabHive(api_key="hive_...", account_id="YOUR_ACCOUNT_ID")

result = client.endpoints.infer(
endpoint_id="hf-facebook-musicgen-small", # SDK resolves the name to a UUID
input_data={"prompt": "Upbeat jazz piano melody with drums", "duration_s": 15},
)
for art in result.get("result", {}).get("output_artifacts", []):
client.endpoints.download_artifact(art["url"], f"./{art['filename']}")

Text-to-speech

result = client.endpoints.infer(
endpoint_id="kokoro-tts",
input_data={"text": "Welcome to ColabHive, the distributed AI platform.", "voice": "af_heart"},
)

Input parameters

text-to-audio

ParameterTypeDefaultDescription
promptstringrequiredDescription of the audio/music
duration_snumber10.0Duration in seconds

text-to-speech

ParameterTypeDefaultDescription
textstringrequiredText to speak
voice / voice_presetstringmodel-specificVoice identity (e.g. Kokoro af_heart, Bark v2/en_speaker_6)

Output format

{
"output_artifacts": [
{
"filename": "audio.wav",
"url": "https://storage.colabhive.com/...",
"content_type": "audio/wav",
"size_bytes": 640000,
"modality": "audio"
}
],
"metadata": { "duration_s": 15.0 }
}

Authors: José Luis Minich, Maximiliano Lucius.