Signpost AI Logo
WorkersTools

Tts

📸 Screenshots

Here are visual examples of this section:

Tts - Worker Configuration Interface Tts - Worker Configuration Interface

1. Overview and Purpose

The TTS worker converts text input into audio speech using either Google Text-to-Speech or OpenAI's speech synthesis API. It automatically detects the language of the input text and selects appropriate voices, with support for multiple audio formats optimized for various platforms including Telerivet compatibility.

2. Configuration Parameters

The Worker accepts the following parameters:

  • engine: Specifies the text-to-speech engine to use. Can be either "google" or "openai". Defaults to "google" for backward compatibility.

3. Input/Output Handles

  • input: Input handle - accepts string text to be converted to speech
  • output: Output handle - returns audio object with base64-encoded audio data and file extension

4. Usage Examples with Code

// Configure TTS worker with OpenAI engine
const ttsWorker = {
  parameters: {
    engine: "openai"
  },
  fields: {
    input: { value: "Hello, this is a test message." },
    output: { value: null }
  }
}

// The output will contain:
// { audio: "base64EncodedAudioData", ext: "ogg" }

5. Integration Examples

This worker is commonly used in voice messaging workflows, automated phone systems, and accessibility applications where text content needs to be converted to audio format.

6. Best Practices

  • Use Google TTS for better language detection and voice selection capabilities
  • Use OpenAI TTS for consistent voice quality across different languages
  • Keep text input under reasonable length limits to avoid API timeouts
  • Ensure proper API keys are configured for your chosen engine

7. Troubleshooting Tips

  • Verify that the correct API keys (Google or OpenAI) are properly configured
  • Check that input text is not empty or null
  • For Google TTS, ensure both Google TTS and Google Translate API keys are available for language detection
  • If audio playback fails, verify the output format is compatible with your target platform