Audio Generation
TF Design supports audio generation through the ToothFairyAI backend. Three audio categories are available: music, voice, and sound effects.
Available Models
| Model | Alias | Category | Output |
|---|---|---|---|
| Mystica Music | mystica_music | Music | Instrumental tracks, background music |
| Mystica Voice | mystica_voice | Voice | Text-to-speech narration, voiceovers |
| Mystica SFX | mystica_sfx | Sound Effects | Foley, ambient sounds, UI sounds |
How It Works
- Provide a prompt describing the desired audio.
- The Desktop app sends the request to the ToothFairyAI backend.
- The model generates audio and returns it as a file.
- The output appears as a download chip in the chat.
- Audio can be embedded in artifacts or downloaded.
Use Cases
Music
- Background music for presentations and decks.
- Ambient tracks for interactive prototypes.
- Brand audio signatures and jingles.
Prompt example: "Upbeat electronic background music, 120 BPM, 30 seconds, suitable for a product demo video."
Voice
- Narration for slide decks and video explainers.
- Voiceovers for landing page hero sections.
- Accessibility audio descriptions.
Prompt example: "Professional female voice, British English, reading: 'Welcome to Insight, the analytics platform for data teams.'"
Sound Effects
- UI interaction sounds (clicks, hovers, transitions).
- Ambient environment sounds.
- Foley for video content.
Prompt example: "Soft digital click sound, short, suitable for a button press interaction."
Using Generated Audio in Artifacts
Generated audio files are saved to the project workspace and can be:
- Embedded in HTML —
<audio src="assets/track.mp3" controls>or via JavaScriptAudio(). - Triggered on interaction — play sounds on button clicks or transitions.
- Downloaded — click the download chip to save locally.
- Included in exports — audio files are part of the ZIP archive.
Internal Endpoints
The following endpoints are exposed by the running Desktop app's embedded runtime for in-app tools and the agent:
| Endpoint | Method | Description |
|---|---|---|
/api/projects/:id/media/generate | POST | Generate audio (specify audio model) |
/api/projects/:id/media/tasks | GET | List media tasks |
/api/media/tasks/:id/wait | GET | Wait synchronously for a task to finish |