Wiro - Generate Background Music icon

Wiro - Generate Background Music

Generates background music using AI

Overview

This node generates background music using an AI-powered service. It allows users to specify a musical style, genre, or mood through a text prompt, and then produces a corresponding music track. The node is useful for content creators, game developers, video producers, or anyone needing custom background music tailored to specific emotional tones or styles without composing manually.

Practical examples:

  • Creating a melancholic piano piece for a reflective video scene.
  • Generating upbeat electronic music for a workout app.
  • Producing ambient soundscapes for meditation or relaxation apps.

Properties

Name Meaning
Prompt A textual description of the desired music style, genre, or mood to guide generation.
Tokens Maximum number of tokens (units of generated content) to produce in the music output.
Scale A numeric scale value used for classifier-free guidance influencing the generation style.

Output

The node outputs a JSON object with the following structure:

  • taskid: The unique identifier of the music generation task.
  • url: The URL where the generated music can be accessed once completed.
  • status: The current status of the task, which can be:
    • "completed": Music generation finished successfully.
    • "failed": Music generation failed due to an error or cancellation.

The node does not directly output binary audio data but provides a URL to access the generated music file.

Dependencies

  • Requires an API key credential for authentication with the external AI music generation service.
  • Makes HTTP POST requests to the service's endpoint at https://api.wiro.ai/v1/Run/wiro/music_gen.
  • Uses helper functions to generate authentication headers and poll the task status until completion.

Troubleshooting

  • Missing or invalid API credentials: Ensure that the API key and secret are correctly configured in the node credentials.
  • API response missing task ID or socket token: This indicates a problem with the request or service availability. Verify the prompt and parameters, and check the service status.
  • Task status returns failure codes (-1, -2, -3, -4): These represent different failure states from the service. Retrying with adjusted parameters or contacting support may be necessary.
  • Timeouts during polling: Network issues or slow processing might cause timeouts. Check connectivity and consider increasing timeout settings if available.

Links and References

Discussion