Groq TTS icon

Groq TTS

Convert text to speech using Groq API

Audio → Text to Speech

AI-generated

Overview

This node converts text into speech audio using the Groq API's Text-to-Speech (TTS) service. It is useful for automating the generation of spoken audio from text input, such as creating voiceovers, audio messages, or accessibility features. Users provide the text, select a TTS model and voice, specify audio format and speed, and optionally include base64 encoded audio output.

Use Case Examples

  1. Generating an MP3 audio file from a text script for a podcast introduction.
  2. Creating WAV audio clips from text for use in an automated phone system.
  3. Producing base64 encoded audio for sending voice messages via WhatsApp APIs.

Properties

Name Meaning
Text The text to convert to speech, required input.
Model The TTS model to use, with a note to accept model terms before first use.
Voice The voice to use for speech synthesis, selectable from multiple predefined voices.
Response Format The audio format for the output file.
Speed The speed of the generated audio, from 0.25 to 4.0, with 1.0 as default.
Additional Fields Optional additional settings including output file name and whether to include base64 encoded audio in the JSON output.

Output

Binary

Contains the generated audio file in the selected format.

JSON

  • success - Indicates if the operation was successful.
  • fileName - The name of the output audio file including extension.
  • format - The audio format of the output file.
  • voice - The voice used for speech synthesis.
  • model - The TTS model used.
  • speed - The speed setting used for audio generation.
  • textLength - The length of the input text.
  • binaryDataSize - The size in bytes of the generated audio binary data.
  • audioBase64 - Base64 encoded audio string, included if requested.
  • audioDataUri - Data URI format of the base64 encoded audio, included if requested.
  • base64Enabled - Boolean indicating if base64 output was included.

Dependencies

  • Groq API key credential required for authentication

Troubleshooting

  • Error indicating 'model_terms_required' means the user must accept the model terms at the Groq console URL before using the model.
  • API errors include status and message details; ensure the API key is valid and the request parameters are correct.
  • If text input is missing, the node throws an error requiring text for conversion.

Links

Discussion