Actions4
- Speech Actions
- Sound Actions
- Voice Actions
- Dubbing Actions
Overview
The node integrates with the CambAI API to generate sound from a textual description. Specifically, the "Generate Sound" operation under the "Sound" resource converts a user-provided prompt describing a sound (e.g., "ocean waves crashing") into an audio file of specified duration. This is useful for creating custom sound effects or ambient sounds dynamically within workflows.
Practical examples include:
- Generating background ambiance for videos or podcasts.
- Creating sound effects for games or interactive media.
- Producing audio samples for creative projects without needing pre-recorded files.
Properties
Name | Meaning |
---|---|
Prompt | The textual description of the sound you want to generate (e.g., "ocean waves crashing"). |
Duration | Length in seconds for how long the generated sound should play. |
Additional Options | A collection of optional settings: |
- Output Type | How the final audio is retrieved: either as raw audio bytes in FLAC format or a downloadable URL. |
- Polling Interval | Time in seconds between status checks while waiting for the sound generation to complete. |
- Polling Timeout | Maximum time in seconds to wait for the text-to-sound process before timing out. |
Output
The node outputs JSON data containing the generated sound information. Depending on the selected output type:
- Raw Bytes (FLAC): The audio content is streamed directly as raw FLAC bytes, suitable for immediate playback or further processing.
- File URL: A downloadable URL pointing to the generated audio file is provided, allowing users to download or reference the sound externally.
If binary data is output, it represents the actual audio file content encoded in FLAC format.
Dependencies
- Requires an active CambAI API key credential configured in n8n to authenticate requests.
- Network access to
https://client.camb.ai/apis
endpoint. - No additional environment variables are explicitly required beyond the API key.
Troubleshooting
- Timeouts: If the sound generation takes longer than the polling timeout, the node may error out. Increase the "Polling Timeout" property if needed.
- Invalid Prompt: Providing an empty or nonsensical prompt may result in errors or no meaningful audio output.
- API Authentication Errors: Ensure the API key credential is valid and has necessary permissions.
- Output Type Mismatch: Selecting "Raw Bytes" requires downstream nodes capable of handling binary audio data; otherwise, use "File URL" for easier integration.
Common error messages might include:
- "Authentication failed": Check API key validity.
- "Request timed out": Increase polling timeout or check network connectivity.
- "Invalid input": Verify that the prompt and duration are correctly set.
Links and References
- CambAI Official Website
- CambAI API Documentation (for detailed API usage and parameters)
- n8n Documentation (for general node usage and credential setup)