Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.60db.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

60db’s Text-to-Speech (TTS) API converts written text into natural-sounding speech using advanced AI models. Our TTS engine supports multiple voices, languages, and customization options.

Features

Multiple Voices

Choose from 50+ pre-built voices or create custom voices

Voice Customization

Adjust speed, stability, and similarity

High Quality

Crystal-clear audio with natural intonation

Multiple Formats

Support for MP3, WAV, OGG, and FLAC output formats

Basic Usage

import { SixtyDBClient } from '60db';

const client = new SixtyDBClient('your-api-key');

const audio = await client.textToSpeech({
  text: 'Hello, world!',
  voice_id: 'default-voice',
  enhance: true,
  speed: 1.0
});

Voice Parameters

Speed

Control the speaking rate of the generated audio:
const audio = await client.textToSpeech({
  text: 'This will be spoken faster',
  speed: 1.5  // Range: 0.5 to 2.0
});
  • 0.5: Half speed (slow)
  • 1.0: Normal speed (default)
  • 2.0: Double speed (fast)

Stability

Control how expressive versus consistent the generated voice sounds:
const audio = await client.textToSpeech({
  text: 'More consistent delivery',
  stability: 50  // Range: 0 to 100 (default 50)
});
  • Lower values produce more expressive, varied output
  • Higher values produce more consistent, stable output

Similarity

Control how closely the output matches the source voice:
const audio = await client.textToSpeech({
  text: 'Close clone match',
  similarity: 75  // Range: 0 to 100 (default 75)
});

Enhancement

Enable audio enhancement for better quality:
const audio = await client.textToSpeech({
  text: 'Enhanced audio quality',
  enhance: true  // Default: true
});

Output Formats

Supported audio formats:
FormatQualityFile SizeUse Case
MP3GoodSmallWeb, mobile apps
WAVExcellentLargeProfessional audio
OGGGoodSmallWeb streaming
FLACLosslessMediumHigh-quality archival
const audio = await client.textToSpeech({
  text: 'Hello, world!',
  output_format: 'wav'  // mp3, wav, ogg, flac
});

Best Practices

  • Use proper punctuation for natural pauses
  • Break long texts into paragraphs
  • Use SSML tags for advanced control (coming soon)
  • Test multiple voices for your use case
  • Consider accent and gender for your audience
  • Use custom voices for brand consistency
  • Cache frequently used audio
  • Batch requests when possible
  • Use appropriate audio format for your use case
  • Enable enhancement for production use
  • Use WAV format for highest quality
  • Test with different speed settings

Use Cases

Voice Assistants

// Voice assistant
async function speakResponse(text) {
  const audio = await client.textToSpeech({
    text: text,
    voice_id: 'assistant-voice',
    enhance: true
  });

  playAudio(audio);
}

Content Narration

// Generate audiobook chapter
const audio = await client.textToSpeech({
  text: chapterText,
  voice_id: 'narrator-voice',
  speed: 0.95,
  output_format: 'mp3'
});

saveToFile(`chapter-${chapterNum}.mp3`, audio);

Accessibility

// Make web content accessible
async function readAloud(element) {
  const text = element.textContent;
  const audio = await client.textToSpeech({
    text,
    voice_id: 'clear-voice',
    enhance: true
  });
  
  playAudio(audio);
}

API Reference

For detailed API documentation, see:

Text to Speech

Standard TTS endpoint