> ## Documentation Index
> Fetch the complete documentation index at: https://60db.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Voices

> Create and manage custom voice profiles

## Overview

Create custom voice profiles that match your brand identity or clone specific voices for personalized experiences. Our voice cloning technology requires just a few minutes of audio to create a high-quality custom voice.

## Creating a Custom Voice

### Requirements

<Card title="Audio Samples" icon="microphone">
  * **Minimum**: 3 audio files
  * **Maximum**: 10 audio files
  * **Duration**: 10-60 seconds per file
  * **Total**: At least 2 minutes combined
  * **Format**: MP3, WAV, or FLAC
  * **Quality**: 44.1kHz+ sample rate recommended
</Card>

### Step-by-Step Guide

<Steps>
  <Step title="Prepare Audio Samples">
    Record or collect 3-10 high-quality audio samples of the voice you want to clone
  </Step>

  <Step title="Upload Samples">
    Use the API or dashboard to upload your audio files
  </Step>

  <Step title="Wait for Processing">
    Voice cloning typically takes 10-15 minutes
  </Step>

  <Step title="Test Your Voice">
    Generate test audio to verify quality
  </Step>

  <Step title="Use in Production">
    Start using your custom voice in your applications
  </Step>
</Steps>

## Code Examples

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    import { SixtyDBClient } from '60db';

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

    // Create custom voice
    const files = [
      document.querySelector('#file1').files[0],
      document.querySelector('#file2').files[0],
      document.querySelector('#file3').files[0]
    ];

    const voice = await client.createVoice({
      name: 'My Brand Voice',
      description: 'Professional voice for customer service',
      language: 'en',
      gender: 'female',
      files: files
    });

    console.log('Voice ID:', voice.id);
    console.log('Status:', voice.status);

    // Use the custom voice
    const audio = await client.textToSpeech({
      text: 'Hello from my custom voice!',
      voice_id: voice.id
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from sixtydb import SixtyDBClient

    client = SixtyDBClient('your-api-key')

    # Create custom voice
    files = [
        open('sample1.mp3', 'rb'),
        open('sample2.mp3', 'rb'),
        open('sample3.mp3', 'rb')
    ]

    voice = client.create_voice(
        name='My Brand Voice',
        files=files,
        description='Professional voice for customer service',
        language='en',
        gender='female'
    )

    print(f"Voice ID: {voice['id']}")
    print(f"Status: {voice['status']}")

    # Close files
    for f in files:
        f.close()

    # Use the custom voice
    audio = client.text_to_speech(
        text='Hello from my custom voice!',
        voice_id=voice['id']
    )

    with open('output.mp3', 'wb') as f:
        f.write(audio)
    ```
  </Tab>
</Tabs>

## Audio Sample Guidelines

### Content Recommendations

<AccordionGroup>
  <Accordion title="Variety">
    * Include different sentence types (questions, statements, exclamations)
    * Cover various emotions and tones
    * Use different speaking speeds
    * Include both short and long sentences
  </Accordion>

  <Accordion title="Quality">
    * Record in a quiet environment
    * Use a good quality microphone
    * Maintain consistent volume
    * Avoid background music or noise
    * No echo or reverb
  </Accordion>

  <Accordion title="Technical">
    * Sample rate: 44.1kHz or higher
    * Bit depth: 16-bit or higher
    * Format: WAV (lossless) preferred
    * Mono or stereo both acceptable
  </Accordion>

  <Accordion title="Content">
    * Natural, conversational speech
    * Clear pronunciation
    * Consistent accent
    * Avoid reading in monotone
    * Include natural pauses
  </Accordion>
</AccordionGroup>

## Managing Custom Voices

### List Your Voices

```javascript theme={null}
const voices = await client.getVoices();

// Filter custom voices
const customVoices = voices.filter(v => v.is_custom);
customVoices.forEach(voice => {
  console.log(`${voice.name} (${voice.id})`);
});
```

### Update Voice Metadata

```javascript theme={null}
await client.updateVoice('voice-id', {
  name: 'Updated Voice Name',
  description: 'Updated description'
});
```

### Delete a Voice

```javascript theme={null}
await client.deleteVoice('voice-id');
```

## Voice Quality Tips

<CardGroup cols={2}>
  <Card title="Recording Environment" icon="location-dot">
    Record in a quiet room with minimal echo and background noise
  </Card>

  <Card title="Microphone Quality" icon="microphone">
    Use a quality microphone for best results
  </Card>

  <Card title="Speaking Style" icon="comment">
    Speak naturally and expressively
  </Card>

  <Card title="Audio Length" icon="clock">
    Provide at least 2 minutes of total audio
  </Card>
</CardGroup>

## Use Cases

### Brand Voice

Create a consistent voice for all your brand communications:

```javascript theme={null}
const brandVoice = await client.createVoice({
  name: 'Acme Brand Voice',
  description: 'Official voice for Acme Corporation',
  files: brandAudioSamples
});

// Use in all customer touchpoints
const greeting = await client.textToSpeech({
  text: 'Welcome to Acme Corporation. How can we help you today?',
  voice_id: brandVoice.id
});
```

### Personal Assistant

Clone your own voice for a personalized assistant:

```javascript theme={null}
const myVoice = await client.createVoice({
  name: 'My Personal Voice',
  description: 'My voice for personal assistant',
  files: myRecordings
});

// Personal reminders in your own voice
const reminder = await client.textToSpeech({
  text: 'Remember to call mom at 3 PM',
  voice_id: myVoice.id
});
```

### Character Voices

Create unique voices for game characters or audiobooks:

```javascript theme={null}
const characterVoice = await client.createVoice({
  name: 'Wizard Character',
  description: 'Mystical wizard voice for fantasy game',
  files: characterSamples
});
```

## Pricing

Custom voice creation is available on Pro and Enterprise plans:

| Plan       | Custom Voices | Processing Time     |
| ---------- | ------------- | ------------------- |
| Free       | 0             | -                   |
| Starter    | 0             | -                   |
| Pro        | 5             | 10-15 min           |
| Enterprise | Unlimited     | Priority (5-10 min) |

## API Reference

<CardGroup cols={2}>
  <Card title="Create Voice" icon="plus" href="/api-reference/voices/create-voice">
    Create a new custom voice
  </Card>

  <Card title="Manage Voices" icon="gear" href="/api-reference/voices/get-voices">
    List, update, and delete voices
  </Card>
</CardGroup>
