Fish Audio TTS icon

Fish Audio TTS

Converte texto em áudio usando a API Fish Audio TTS

Overview

The Fish Audio TTS node converts input text into audio using the Fish Audio TTS API. It supports multiple output formats (MP3, WAV, OGG) and allows users to specify a custom output file name and an optional reference ID for tracking requests. This node is useful in scenarios where you need to generate speech from text, such as creating voice messages, automating audio content generation, or integrating text-to-speech functionality into workflows.

Practical examples:

  • Automatically generating spoken notifications from text alerts.
  • Creating audio files for accessibility purposes (e.g., reading out instructions).
  • Producing dynamic audio content for podcasts or announcements.

Properties

Name Type Meaning
Texto String The text that will be converted into audio.
Formato Do Áudio Options Desired output audio format. Options: Mp3, Wav, Ogg.
Reference ID (Opcional) String Optional internal reference ID for tracking requests.
Nome Do Arquivo De Saída String Name of the resulting binary audio file (can be customized; default is "output.mp3").

Output

  • json:

    • success (Boolean): Indicates if the operation was successful.
    • info (String): Success message ("Áudio gerado com sucesso.") if successful.
    • text (String): The original input text.
    • format (String): The selected audio format.
    • referenceId (String): The provided reference ID, if any.
    • error (String, only on failure): Error message if the request failed.
    • details (Any, only on failure): Additional error details from the API response, if available.
  • binary:

    • Contains the generated audio file under the key "data". The file name is set according to the "Nome Do Arquivo De Saída" property.

Dependencies

  • External Service: Requires access to the Fish Audio TTS API.
  • API Key: You must provide valid credentials (fishAudioApi with an apiKey) in n8n.
  • Node.js Modules: Uses axios for HTTP requests and msgpack-lite for data encoding.

Troubleshooting

Common Issues:

  • Invalid Credentials: If the API key is missing or incorrect, the node throws "Credenciais inválidas." Ensure your API key is correctly configured in n8n credentials.
  • No Response: If the API does not return audio data, you'll see "Nenhuma resposta obtida." This may indicate an issue with the API or input parameters.
  • API Errors: If the API returns an error, the node outputs success: false along with the error message and details in the json output.

How to resolve:

  • Double-check your API credentials.
  • Ensure the input text is not empty and within any length limits imposed by the API.
  • Verify that the selected audio format is supported.
  • Check the API status if persistent errors occur.

Links and References

Discussion