Music Generation
Elftia's music generation feature lets you create music with AI using text descriptions. It supports fine-grained control over musical parameters such as duration, tempo, key, and time signature, and can also accept lyrics to generate vocal performances.
Use Cases
- Quickly generate background music from a text description
- Create soundtracks for videos, podcasts, or presentations
- Generate AI-performed songs using custom lyrics
- Experiment with different musical styles and parameter combinations
Supported Providers
| Provider | Type | Description |
|---|---|---|
| ACEMusic | OpenAI-compatible API | A locally or cloud-deployable music generation service called via an OpenAI-compatible interface |
Configuring a Provider
Steps
- Open Settings > Media Providers > Music
- Select the ACEMusic provider
- Enter the API endpoint (default:
http://127.0.0.1:8002) - (Optional) Enter an API Key if your deployment requires authentication
- Select a default model
- Save and enable
Provider Configuration Table
| Setting | Description | Default |
|---|---|---|
| API endpoint | Address of the music generation service | http://127.0.0.1:8002 |
| API Key | Authentication key (optional) | None |
| Default model | The model used by default | Depends on provider |
| Enabled | Whether this provider is enabled | No |
Generating Music
Steps
- Select the music generation feature
- Choose a provider and model
- Enter a description of the desired music style in the prompt field (e.g. "Upbeat jazz piano")
- Configure music parameters (see the parameter table below)
- (Optional) Enter lyrics
- Click Generate
- Wait for generation to complete, then play and preview the result
Generation Parameters
| Parameter | Description | Options / range | Default |
|---|---|---|---|
| Prompt | Text description of the music style and content | Any text | Required |
| Duration | Music length in seconds | A number, or auto | auto |
| Tempo / BPM | Beats per minute | A number (e.g. 120), or auto | auto |
| Time signature | The rhythmic pattern of the music | 4/4, 3/4, 6/8, etc., or auto | auto |
| Key | The tonal key of the music | Note name + mode, e.g. C_major, A_minor, or auto | auto |
| Instrumental | Whether to generate a purely instrumental piece (no vocals) | true / false | false |
| Lyrics | Lyrics for a vocal performance | Any text | None |
| Task type | The type of generation task | Defined by the provider | None |
:::tip Parameter Recommendations
- If you are unsure about a specific parameter value, set it to
autoand let the AI decide based on the prompt - The prompt can include style descriptions, emotional tone, and instrument preferences
- When using instrumental mode, lyrics are not needed :::
Lyrics Input
When you want to generate music with a vocal performance:
- Uncheck the Instrumental option
- Enter the lyrics in the lyrics input area
- The lyrics are sent to the music generation API as an additional parameter
- The AI generates a vocal performance matching the prompt's style and the provided lyrics
Simple Mode
Music generation supports Simple Mode — when enabled, the system uses a sampling mode for faster generation, which is suitable for quick previewing.
Result Management
After generation completes, the system returns one or more tracks. Each track contains:
| Field | Description |
|---|---|
| Audio data | The generated audio content |
| Format | Audio format (typically WAV or MP3) |
| Duration | The actual length of the generated music |
You can:
- Play and preview directly in the UI
- Save to the local file system
- View and share in chat messages
ACEMusic Deployment Notes
ACEMusic is a locally deployable music generation service. To run it locally:
- Follow the official ACEMusic documentation to deploy the service
- Make sure the service is listening on the configured port (default 8002)
- Configure the API endpoint in Elftia to
http://127.0.0.1:8002 - If the service is deployed on a remote server, use the corresponding address and port instead
Frequently Asked Questions
| Question | Solution |
|---|---|
| Cannot connect to the music service | Confirm the ACEMusic service is running and the API endpoint address is correct |
| The generated result has no sound | Check whether the audio player is working properly; try saving the file and opening it with an external player |
| Generation takes too long | Music generation time depends on the duration parameter and hardware performance |
| Lyrics have no effect | Confirm that the Instrumental option is unchecked and the selected model supports vocal generation |
| BPM or key is inaccurate | AI-generated music may not strictly follow the specified parameters — this depends on the model's capabilities |
Related Links
- Media Generation Overview — Overview of all media types
- Image Generation — Generating images with AI
- Speech Services — Speech recognition and synthesis features