CambAI icon

CambAI

Interact with CambAI API for text-to-speech and voice generation

Actions4

Overview

The node integrates with the CambAI API to convert text into speech audio. It allows users to specify the voice, language, and various options to customize the speech synthesis output. This node is useful in scenarios such as generating audio narrations, creating voiceovers for videos, or building interactive voice applications.

For example, a user can input marketing copy text and generate an audio file in a chosen voice and language to embed in a website or app. Another use case is converting chatbot responses into spoken audio dynamically.

Properties

Name Meaning
Voice Select the voice to use for the conversion. Options include selecting from a searchable list of voices or specifying a voice ID directly.
Text The text string that will be converted into speech.
Source Language Select the source language for the speech synthesis. Options include choosing from a searchable list of supported languages or specifying a language ID.
Additional Options A collection of optional parameters to further customize the speech output:
- Age Preferred age of the voice (number between 18 and 80).
- Gender Voice gender preference; options are Male or Female.
- Output Type How to retrieve the final audio: either as raw bytes in FLAC format (direct streaming) or as a downloadable file URL.
- Polling Interval (Seconds) Time interval between status checks when waiting for TTS completion (1 to 10 seconds).
- Polling Timeout (Seconds) Maximum time to wait for the text-to-speech process to complete (30 to 600 seconds).
- Project Description Optional description of the project for organizational purposes.
- Project Name Optional name of the project for organizational purposes.

Output

The node outputs JSON data containing the result of the text-to-speech operation. Depending on the selected output type:

  • If "Raw Bytes (FLAC)" is chosen, the output includes the audio content as a binary stream representing the synthesized speech in FLAC format.
  • If "File URL" is chosen, the output contains a downloadable URL pointing to the generated audio file.

This allows downstream nodes or workflows to either process the audio directly or access it via a link.

Dependencies

  • Requires an active CambAI API key credential configured in n8n for authentication.
  • Network access to https://client.camb.ai/apis to communicate with the CambAI service.
  • No additional environment variables are explicitly required beyond the API key.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Selecting unsupported voice or language IDs may result in errors or no audio output.
    • Long texts or complex requests might exceed polling timeout limits; increasing the timeout can help.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Authentication errors typically indicate invalid credentials; verify and update the API key.
    • Timeout errors suggest the TTS process took too long; consider increasing the polling timeout or reducing text length.
    • Validation errors may occur if required properties like "Text", "Voice", or "Source Language" are missing or invalid.

Links and References

Discussion