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):
| Model | Endpoint | Source repo |
|---|---|---|
| MusicGen Small | hf-facebook-musicgen-small | facebook/musicgen-small |
| AudioLDM2 | hf-cvssp-audioldm2 | cvssp/audioldm2 |
Text-to-speech (voice):
| Model | Endpoint | Source repo |
|---|---|---|
| Chatterbox | chatterbox-tts | ResembleAI/chatterbox-turbo |
| Kokoro 82M | kokoro-tts | hexgrad/Kokoro-82M |
| Bark Small | hf-suno-bark-small | suno/bark-small |
| Parler-TTS Mini | hf-parler-tts-parler-tts-mini-v1 | parler-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
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | string | required | Description of the audio/music |
duration_s | number | 10.0 | Duration in seconds |
text-to-speech
| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | required | Text to speak |
voice / voice_preset | string | model-specific | Voice 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 }
}
Related
Authors: José Luis Minich, Maximiliano Lucius.