Skip to main content

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

ProviderTypeDescription
ACEMusicOpenAI-compatible APIA locally or cloud-deployable music generation service called via an OpenAI-compatible interface

Configuring a Provider

Steps

  1. Open Settings > Media Providers > Music
  2. Select the ACEMusic provider
  3. Enter the API endpoint (default: http://127.0.0.1:8002)
  4. (Optional) Enter an API Key if your deployment requires authentication
  5. Select a default model
  6. Save and enable

Provider Configuration Table

SettingDescriptionDefault
API endpointAddress of the music generation servicehttp://127.0.0.1:8002
API KeyAuthentication key (optional)None
Default modelThe model used by defaultDepends on provider
EnabledWhether this provider is enabledNo

Generating Music

Steps

  1. Select the music generation feature
  2. Choose a provider and model
  3. Enter a description of the desired music style in the prompt field (e.g. "Upbeat jazz piano")
  4. Configure music parameters (see the parameter table below)
  5. (Optional) Enter lyrics
  6. Click Generate
  7. Wait for generation to complete, then play and preview the result

Generation Parameters

ParameterDescriptionOptions / rangeDefault
PromptText description of the music style and contentAny textRequired
DurationMusic length in secondsA number, or autoauto
Tempo / BPMBeats per minuteA number (e.g. 120), or autoauto
Time signatureThe rhythmic pattern of the music4/4, 3/4, 6/8, etc., or autoauto
KeyThe tonal key of the musicNote name + mode, e.g. C_major, A_minor, or autoauto
InstrumentalWhether to generate a purely instrumental piece (no vocals)true / falsefalse
LyricsLyrics for a vocal performanceAny textNone
Task typeThe type of generation taskDefined by the providerNone

:::tip Parameter Recommendations

  • If you are unsure about a specific parameter value, set it to auto and 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:

  1. Uncheck the Instrumental option
  2. Enter the lyrics in the lyrics input area
  3. The lyrics are sent to the music generation API as an additional parameter
  4. 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:

FieldDescription
Audio dataThe generated audio content
FormatAudio format (typically WAV or MP3)
DurationThe 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:

  1. Follow the official ACEMusic documentation to deploy the service
  2. Make sure the service is listening on the configured port (default 8002)
  3. Configure the API endpoint in Elftia to http://127.0.0.1:8002
  4. If the service is deployed on a remote server, use the corresponding address and port instead

Frequently Asked Questions

QuestionSolution
Cannot connect to the music serviceConfirm the ACEMusic service is running and the API endpoint address is correct
The generated result has no soundCheck whether the audio player is working properly; try saving the file and opening it with an external player
Generation takes too longMusic generation time depends on the duration parameter and hardware performance
Lyrics have no effectConfirm that the Instrumental option is unchecked and the selected model supports vocal generation
BPM or key is inaccurateAI-generated music may not strictly follow the specified parameters — this depends on the model's capabilities