Actions22
- Get Actions
- Message Actions
- Friend Actions
- Group Actions
- Tool Actions
Overview
This node provides Text-to-Speech (TTS) functionality, converting input text into spoken audio using selectable voices and customizable speech parameters. It is useful in scenarios such as generating voice messages, creating audio content from text, accessibility features, or automating announcements.
For example, a user can input Vietnamese text and select a Vietnamese neural voice to generate an audio file that can be played back or sent via messaging platforms. The node supports adjusting speech rate, volume, and pitch to tailor the output voice characteristics.
Properties
| Name | Meaning |
|---|---|
| Text | The text string to convert into speech. |
| Voice | The voice used for TTS synthesis. Options are dynamically loaded and include various voices. |
| Rate | Speech speed adjustment, e.g., "0%", "-10%", "+20%". |
| Volume | Volume level adjustment, e.g., "0%", "-5%", "+10%". |
| Pitch | Pitch adjustment of the voice, e.g., "0Hz", "-2Hz", "+3Hz". |
Output
The node outputs JSON data containing the generated audio content. The key part of the output is a binary field representing the synthesized speech audio file. This binary data can be used directly in workflows for playback, storage, or sending over communication channels.
json: Contains metadata or status information about the TTS operation.binary: Contains the audio file data resulting from the TTS conversion.
Dependencies
- Requires access to an external TTS service API that supports multiple voices and speech parameter customization.
- Needs an API authentication token or key configured in n8n credentials to authorize requests to the TTS service.
- Uses filesystem operations to handle temporary audio files during processing.
Troubleshooting
Common Issues:
- Invalid or empty text input will cause errors; ensure the "Text" property is provided and non-empty.
- Incorrect or unsupported voice selection may result in failure; use the dynamic voice options loader to select valid voices.
- Network or authentication failures with the TTS API will throw errors; verify API keys and network connectivity.
- File system permission issues when writing audio files can cause exceptions; ensure n8n has write access to temp directories.
Error Messages:
- "Text is required": Occurs if the text input is missing.
- "Voice not found": Happens if the selected voice is invalid or unavailable.
- "Authentication failed": Indicates invalid or missing API credentials.
- "Failed to write audio file": Points to file system permission problems.
Resolving these typically involves validating inputs, checking credential configurations, and ensuring environment permissions.
Links and References
- Microsoft Azure Cognitive Services Text-to-Speech
- Google Cloud Text-to-Speech API
- Amazon Polly Documentation
These links provide additional context on TTS services similar to the one this node integrates with.