How to Use MMAudio V2 Text to Audio in opencode
MMAudio V2 Text to Audio creates short sound effects and ambience from written descriptions. It starts from text alone, making it useful for drafting audio without a reference clip.
Prompts to try with MMAudio V2 Text to Audio in opencode
Copy an example into opencode, or ask in your own words.
Read the game's environment notes and use MMAudio V2 Text to Audio to draft an eight-second forest atmosphere: rustling leaves, light wind, and scattered bird calls. Exclude speech and music, and save it with the project's audio assets.
Use MMAudio V2 Text to Audio to make an eight-second draft of footsteps on gravel for this game's walking scene. Start with 25 steps and guidance strength 4.5, and record the prompt beside the asset.
Read the product demo storyboard and use MMAudio V2 Text to Audio to create separate eight-second candidates for paper packaging rustling and a lid clicking shut. Keep speech and music out of the requested audio.
Use MMAudio V2 Text to Audio to generate an eight-second rainy street atmosphere for the project's opening scene: rain on pavement, gutter water, and distant traffic. Add speech and music to the negative prompt.
Inspect the animatic's written action list and use MMAudio V2 Text to Audio to draft an eight-second wooden door creak followed by a firm closing sound. Save the clip for manual placement in the edit.
How to set up MMAudio V2 Text to Audio in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run MMAudio V2 Text to Audio
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "fal", "model": "fal-ai/mmaudio-v2/text-to-audio", "input": { "prompt": "Indian holy music" } }'
Then paste one of the prompts above: opencode finds MMAudio V2 Text to Audio on Spiral, shows the price and runs it.
MMAudio V2 Text to Audio providers and prices
Spiral runs MMAudio V2 Text to Audio through fal. Open a card for today's price, with every fee included.
Settings you can ask for
MMAudio V2 Text to Audio works from your prompt. Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Negative prompt | what to leave out, in words | The negative prompt to generate the audio for. | |
| Seed | 0 to 65535 | The seed for the random number generator | |
| Number of steps | 4 to 50 | 25 | The number of steps to generate the audio for. |
| Duration | 1 to 30 | 8 | The duration of the audio to generate. |
| CFG strength | 0 to 20 | 4.5 | The strength of Classifier Free Guidance. |
| Mask away clip | on or off | off | Whether to mask away the clip. |
Every API field of MMAudio V2 Text to Audio is on its tool page: open its card above.
What can you do with MMAudio V2 Text to Audio in opencode?
Turn project sound briefs into short effects and ambience for games, demos, and animations. A coding agent can organize candidate clips alongside the project and record the descriptions used to create them.
Game environment audio
Draft eight-second forest, shoreline, or rainy street ambience from sound descriptions. Audition each clip against the scene before editing it into the game.
Foley for short scenes
Generate footsteps, door movements, or object impacts from text. Place and trim the selected sounds manually against the action.
Podcast scene transitions
Draft a short rainstorm, passing train, or crackling fire to introduce a location in an audio story. Keep spoken narration separate.
Product demonstration effects
Describe packaging rustles, a lid clicking shut, or liquid pouring into a glass. Try separate clips for each action so an editor can place them independently.
Animation sound drafts
Turn written action descriptions into short effects for an animatic. Use the results to explore sound choices before final editing.
Audio drama atmosphere
Draft an eight-second room or outdoor atmosphere from a written scene description. Listen for unwanted voices before placing it beneath dialogue.
More on MMAudio V2 Text to Audio and opencode
Overview
MMAudio V2 Text to Audio in other agents
More opencode guides
Questions about MMAudio V2 Text to Audio in opencode
Can opencode use MMAudio V2 Text to Audio?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run MMAudio V2 Text to Audio like any built-in tool.
How much does MMAudio V2 Text to Audio cost in opencode?
$0.0013 per second. Billed on `duration`, default 8. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need a fal account to use MMAudio V2 Text to Audio in opencode?
No. Spiral runs MMAudio V2 Text to Audio on its own fal account. You sign in to Spiral once and never paste a key.
How long does it take to set up MMAudio V2 Text to Audio in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while MMAudio V2 Text to Audio runs?
MMAudio V2 Text to Audio runs in the background. opencode starts the run, checks on it and gives you the audio when it's ready.
What should I use MMAudio V2 for?
Use it to draft short sound effects and environmental ambience. Start with a concrete sound, such as rain hitting a window, running water, or a dog barking.
What clip length should I start with?
Start with eight seconds, the training and default output length. The maker warns that lengths far from the training duration can reduce quality.
Can MMAudio V2 read a script aloud?
It is a poor choice for narration or dialogue. The researchers report unintelligible mumbles when MMAudio is prompted to generate human speech.
What audio sampling rate does MMAudio V2 use?
The recommended V2 checkpoint uses 44.1 kHz audio. That describes the sampling rate, rather than a guarantee about the quality of a particular result.
How should I describe the sound I want?
Write an audible description: the source, its action, and the surrounding sound. For example, try 'steady rain tapping a metal roof, with occasional distant thunder.'
Start using MMAudio V2 Text to Audio in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


