text-to-sfx
/text-to-sfx
Generate a sound effect from a text description using Sonilo — a UI chime, a whoosh, an impact, ambience, a stylized cue — when there is no video to match. Use when the user describes the sound they want in words, with or without a length. For SFX matched to footage, use the video-to-sfx skill; for music, use text-to-music.
- Author
- sonilo-ai ↗
- Repository
- skills ↗
- Licence
- MIT
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Generate a sound effect from a text description using Sonilo — a UI chime, a whoosh, an impact, ambience, a stylized cue — when there is no video to match. Use when the user describes the sound they want in words, with or without a length. For SFX matched to footage, use the video-to-sfx skill; for music, use text-to-music.
Original author description
Generate a sound effect from a text description using Sonilo — a UI chime, a whoosh, an impact, ambience, a stylized cue — when there is no video to match. Use when the user describes the sound they want in words, with or without a length. For SFX matched to footage, use the video-to-sfx skill; for music, use text-to-music.
How it works
- Transport: MCP or CLI
- Quick Start
- Tool
- Parameters
- Prompting
- Workflow Tips
- Recovering a Timed-Out Call
- Output Files
- Error Handling
SKILL.md preview
---
name: text-to-sfx
description: Generate a sound effect from a text description using Sonilo — a UI chime, a whoosh, an impact, ambience, a stylized cue — when there is no video to match. Use when the user describes the sound they want in words, with or without a length. For SFX matched to footage, use the video-to-sfx skill; for music, use text-to-music.
license: MIT
compatibility: "Requires Sonilo through either transport — the MCP server connected, or the `sonilo` CLI installed and signed in — plus credentials: a `sonilo login` sign-in, the hosted OAuth plugin, or SONILO_API_KEY. See the setup-api-key skill."
allowed-tools: Bash, Read, Write, mcp__sonilo__*
---
# Sonilo Text-to-SFX
Generate a single sound effect from a text description — no video involved. The
prompt IS the input, so describe the action and materials directly. Generation
runs as an async task on the backend; the tool polls internally and hands back
the saved file.
> **Setup:** See the [setup-api-key](../setup-api-key) skill.
> ⚠️ **Cost:** this tool makes an API call that may incur charges. Only call it when explicitly requested.
> **Matching sound to footage instead?** Use [video-to-sfx](../video-to-sfx) — it reads the cut and can pin sounds to specific moments, which a text prompt cannot do.
## Transport: MCP or CLI
Pick one at the start of the session and stay on it. Do not mix the two inside
a single job, and do not announce the choice.
1. **Sonilo MCP tools visible in this session** (`text_to_sfx` and friends) — use them. This is the preferred path: it needs no shell, and it is the only one that survives a very long generation. If a call fails to authenticate — rather than failing on its inputs — this transport is not usable in this session: go to 2 instead of retrying it.
2. **No usable Sonilo MCP tools, but `sonilo account` exits 0** — use the CLI commands below. Same API, same account, same credential file. Probe with `sonilo account`, not `sonilo whoami`: whoami exits 0 even when signed out, so it cannot tell the two states apart.
3. **Neither** — stop and run the [setup-api-key](../setup-api-key) skill. Do not call `api.sonilo.com` with curl to work around it; both transports handle uploads, polling and retries that a bare request does not.
## Quick Start
### MCP tool call (recommended)
```
text_to_sfx(
prompt="Thunder rumbling in the distance with light rain",
duration=6
)
```
### Python (`pip install sonilo`)
```python
from sonilo import Sonilo
client = Sonilo() # reads SONILO_API_KEY
sfx = client.text_to_sfx.generate(prompt="Thunder rumbling in the distance with light rain", duration=6)
sfx.save("thunder.m4a")
```
### JavaScript / TypeScript (`npm install sonilo`)
```ts
import { SoniloClient } from "sonilo";
const client = new SoniloClient(); // reads SONILO_API_KEY
const sfx = await client.textToSfx.generate({
prompt: "Thunder rumbling in the distance with light rain",
duration: 6,
});
```
### CLI (`npm install -g sonilo-cli` or `pip install sonilo-cli`)
```bash
sonilo text-to-sfx --prompt "Thunder rumbling in the distance with light rain" --duration 6
```
Always async under the hood — the CLI submits and polls for you. `--format` accepts `wav|mp3|aac|flac`.
### cURL (raw REST API, no MCP host)
```bash
curl -X POST "https://api.sonilo.com/v1/text-to-sfx" \
-H "Authorization: Bearer $SONILO_API_KEY" \
--data-urlencode "prompt=Thunder rumbling in the distance with light rain" \
--data-urlencode "duration=6"
# -> {"task_id": "..."} poll GET /v1/tasks/{task_id} until status is succeeded/failed
```
The endpoint returns `{"task_id": ...}` (HTTP 202) and the result is fetched from `GET /v1/tasks/{task_id}` once `status` is terminal. The MCP tool does this polling for you and returns the saved path directly — you only see the `task_id` if the call times out (see [task-recovery](../task-recovery)).
## Tool
| Tool | Description |
|------|-------------|
| `text_to_sfx(prompt, duration?, audio_format?, output_directory?)` | Generate one SFX clip from a text description only. |
## Parameters
| Parameter | Type | Default | Notes |
|-----------|------|---------|-------|
| `prompt` | string | — | Required. 1–2000 chars. |
| `duration` | number | Sonilo's default, 8 s | Optional, 0.5–180 seconds. Omit it when the user names no length — do not invent one. Fractional values are allowed: the shortest effects, a latch or a click, run well under a second. |
| `audio_format` | string | `aac` (`.m4a`) | `wav`, `mp3`, `aac`, or `flac`. |
| `output_directory` | string | `SONILO_MCP_BASE_PATH` | Absolute, or relative to the base path. |
## Prompting
The prompt is the only input — there is no footage to map. Describe the action
and the materials directly, and combine elements: "Heavy rain on a tin roof"
beats "Rain"; "Cinematic braam, horror" or "8-bit retro jump sound" for
stylized cues. The same materials vocabulary and sound-bundle thinking as the
video path applies: [references/sfx-prompting.md](../references/sfx-prompting.md).
Generate once and iterate on the prompt, not on rerolls — failed runs
auto-refund, but your own retry is a new charge.
## Workflow Tips
- **This is for a single clip with no video context** — a UI chime, a whoosh, a foley element you'll layer yourself. If the user has footage, use [video-to-sfx](../video-to-sfx) instead.
- **Duration is optional; never invent one.** Pass the length the user named. If they named none, omit `duration` and Sonilo uses its default (8 s) — ask only when the length actually matters to the user.
- **Don't confuse this with music.** For a background score or soundtrack, use [text-to-music](../text-to-music) or [video-to-music](../video-to-music).
## Recovering a Timed-Out Call
Async on the backend already; the tool polls for at least 45 minutes (longer if `TIME_OUT_SECONDS` is set higher), because a request can queue that long for upstream capacity. An MCP host can still cut the call off sooner with its own tool-call timeout. If the call times out, the error carries a `task_id` — the job keeps running (and is already charged). Call `get_sfx_task(task_id)` — `get_generation_task(task_id)` on the hosted server — later to retrieve the result; see [task-recovery](../task-recovery).
## Output Files
Saved in the requested `audio_format` (`.wav`/`.mp3`/`.flac`, or `.m4a` for the `aac` default), named from the prompt (slugified) or `sfx-<first 8 chars of the task id>`.
## Error Handling
Common errors: `401` invalid key, `402` insufficient balance / trial exhausted, `422` invalid parameters (e.g. duration out of range), `429` rate limit. See the [account](../account) skill.
Versions
The database has no other skills named text-to-sfx.
Database snapshot: 13.11.2026 · package version 54e6ac903695 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100video-to-sfx
Generate sound effects matched to a video using Sonilo — footsteps, impacts, ambience, foley — optionally scripted to specific timed segments, returning either the audio or a new video with the SFX muxed in. Use when the user has footage that needs sound design. For SFX from a… - 100video-analysis
Analyze a video with Sonilo and get back a creative brief for its sound, derived from the footage itself — by default both a music-direction brief (a time-aligned section plan plus one or more ready-to-use generation prompts) and a sound-design brief (shot-sized SFX segments… - 100scenario-sonilo
Use when adding sound to a video or generating standalone audio with Sonilo models on Scenario via MCP: text-to-sound-effects, text-to-music, video-to-sound-effects or video-to-music from a clip, scoring silent AI video, foley, ambience, muxed video-to-video variants returning… - 95sfx-elements
Install CC0 sound effects from the Elements registry. Use when user needs UI sounds (click, pop, notification), transition sounds (whoosh, swoosh), cinematic sounds (boom, riser, glitch), or audio for video production. Triggers on "sound effect", "SFX", "audio", "notification… - 100audio-stems
Generate and place a video/animation's audio as SEPARATE stems — voiceover, background music, and a time-synced sound-effects track — and optionally a ducked master mix. Use when adding music and SFX to an animation or explainer, when iterating on audio WITHOUT re-rendering the… - 100lotsofsounds
Find and add CC0 sound effects, UI sounds, game audio, ambience and music loops to a project with the Lots of Sounds CLI. Use this skill when the user needs a sound effect or audio file for an app, website, game, video, podcast or prototype - for example a click, notification…