Introduction
Learn how to generate music from text prompts in your app. Lyria Music Generation uses Google Lyria on Vertex AI to create high-quality, AI-generated music from simple text descriptions. It enables your app to produce studio-quality instrumental tracks and ambient soundscapes tailored to user input. This is ideal for creative apps, media tools, and personalized audio experiences.What You Can Build
With Lyria Music Generation, your app can support:- Text-to-Music Creation – Generate music tracks based on user descriptions.
- Background Music Generators – Create ambient soundtracks for apps, videos, or experiences.
- Custom Soundtrack Tools – Allow users to define mood, genre, or theme for music.
- Creative Audio Platforms – Build tools for music exploration and experimentation.
- Dynamic Audio Experiences – Adapt music in real time based on user input or context.
How It Works
When Lyria Music Generation is enabled, your app sends user prompts to Google Lyria via Vertex AI, which generates music tracks based on the described style or mood. Your app can:- accept prompts describing mood, genre, or instruments
- generate audio tracks in real time
- play or stream generated music
- allow users to regenerate or refine outputs
- integrate music into other app experiences
Example Prompts
You can use prompts like these to implement features: Add background music generation Add AI-generated background music to my app that matches the mood users describe using Google Lyria. Add a custom soundtrack creator Add a custom soundtrack creator to my app where users describe a genre and get studio-quality music using Lyria.Common Use Cases
Lyria Music Generation is commonly used for:- background music in apps and games
- video and content creation tools
- relaxation and meditation apps
- creative music platforms
- personalized audio experiences
Best Practices
To get the best results:- encourage detailed prompts (mood, tempo, instruments)
- allow users to preview and regenerate tracks
- match music style to app context
- optimize playback performance
- provide controls for looping or duration