Cloudflare AI icon

Cloudflare AI

Use Cloudflare Workers AI models for text, image, and audio processing

Overview

This node integrates with Cloudflare's AI services to perform various AI-powered transformations on text, images, audio, and embeddings. Specifically for the Audio - Text to Speech operation, it converts input text into spoken audio using a Cloudflare AI model.

Typical use cases include:

  • Generating speech audio from text content for accessibility or voice applications.
  • Creating audio versions of written content such as articles, notifications, or messages.
  • Automating voice responses in chatbots or IVR systems.

For example, you can input a string like "Hello, welcome to our service" and receive an audio file that speaks this text aloud.

Properties

Name Meaning
Text The text string that you want to convert into speech audio. This is required.

Output

The node outputs JSON data containing the result of the text-to-speech conversion. The exact structure includes a result field with the generated audio data.

If the node produces binary data (audio), it will be included as binary output attached to the item, typically representing the audio file in a standard format (e.g., MP3 or WAV). This binary data can then be used downstream in workflows for playback, storage, or further processing.

Dependencies

  • Requires a valid Cloudflare API key credential with access to the AI services.
  • Needs the Cloudflare account ID and API token configured in n8n credentials.
  • Internet connectivity to call Cloudflare's AI API endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing empty or invalid text input may result in errors or no audio output.
    • Network issues or API rate limits could cause request failures.
  • Error messages:

    • "Request failed": General failure from the API; check credentials and network.
    • Errors returned from Cloudflare API are surfaced with their message; review these for specific causes.
  • Resolutions:

    • Verify your Cloudflare API key and account ID are correctly set up in n8n.
    • Ensure the "Text" property is not empty and contains valid characters.
    • Check your internet connection and Cloudflare service status.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.

Links and References

Discussion