> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# वॉइस रीमिक्सिंग क्विकस्टार्ट

यह गाइड आपको मौजूदा वॉइस को रीमिक्स करके बिल्कुल नई वॉइस बनाने का तरीका दिखाएगी।

## वॉइस डिज़ाइन API का इस्तेमाल

> **Note**
>
> यह गाइड मानती है कि आपने [अपनी API कुंजी और SDK सेट अप कर ली है](/docs/hi/eleven-api/quickstart)। अगर आपने अभी तक नहीं किया है, तो पहले
> क्विकस्टार्ट पूरा करें। अपने स्पीकर्स से ऑडियो चलाने के लिए आपको
> [MPV](https://mpv.io/) और/या [ffmpeg](https://ffmpeg.org/) की भी ज़रूरत पड़ सकती है।

#### API रिक्वेस्ट करें

वॉइस रीमिक्स करने की प्रक्रिया में दो चरण होते हैं:

1. वॉइस ID और प्रॉम्प्ट देकर नई वॉइस का प्रीव्यू जनरेट करें।
2. प्रीव्यू से नई वॉइस बनाएं।

हम नई वॉइस का प्रीव्यू जनरेट करने से शुरू करेंगे।

अपनी पसंद की भाषा के अनुसार `example.py` या `example.mts` नाम की नई फ़ाइल बनाएं और इसमें यह कोड जोड़ें:

> **Warning**
>
> आप केवल पहले से डिज़ाइन की गई वॉइस, IVC या PVC वॉइस, और अनिश्चित नोटिस अवधि वाली वॉइस लाइब्रेरी की वॉइस को रीमिक्स कर सकते हैं।

```python maxLines=0
# example.py
from dotenv import load_dotenv
from elevenlabs.client import ElevenLabs
from elevenlabs.play import play
import base64

load_dotenv()

elevenlabs = ElevenLabs(
    api_key=os.getenv("ELEVENLABS_API_KEY"),
)

voices = elevenlabs.text_to_voice.remix(
    voice_id="JBFqnCBsd6RMkjVDRZzb"
    voice_description="Use a higher pitch and change to a Boston accent.",
    text="Of course I'm a Bostonian, I've lived here all my life!",
)

for preview in voices.previews:
    # Convert base64 to audio buffer
    audio_buffer = base64.b64decode(preview.audio_base_64)

    print(f"Playing preview: {preview.generated_voice_id}")

    play(audio_buffer)
```

```typescript maxLines=0
// example.ts
import { ElevenLabsClient, play } from "@elevenlabs/elevenlabs-js";
import "dotenv/config";
import { Readable } from 'node:stream';
import { Buffer } from 'node:buffer';

const elevenlabs = new ElevenLabsClient();

const { previews } = await elevenlabs.textToVoice.remix("JBFqnCBsd6RMkjVDRZzb", {
    voiceDescription: "Use a higher pitch and change to a Boston accent.",
    text: "Of course I'm a Bostonian, I've lived here all my life!",
});

for (const preview of previews) {
    // Convert base64 to buffer and create a Readable stream
    const audioStream = Readable.from(Buffer.from(preview.audioBase64, 'base64'));

    console.log(`Playing preview: ${preview.generatedVoiceId}`);

    // Play the audio using the stream
    await play(audioStream);
}
```

#### कोड चलाएं

```python
python example.py
```

```typescript
npx tsx example.mts
```

आपको अपने स्पीकर्स से जनरेट किए गए वॉइस प्रीव्यू एक-एक करके सुनाई देने चाहिए।

#### जनरेट की गई वॉइस को अपनी लाइब्रेरी में जोड़ें

प्रीव्यू जनरेट करने और अपना पसंदीदा चुनने के बाद, आप उसे जनरेट की गई वॉइस ID के ज़रिए अपनी वॉइस लाइब्रेरी में जोड़ सकते हैं, ताकि उसे अन्य API के साथ इस्तेमाल किया जा सके।

```python
voice = elevenlabs.text_to_voice.create(
    voice_name="Bostonian",
    voice_description="A high pitched Bostonian accent.",
    # The generated voice ID of the preview you want to use,
    # using the first in the list for this example
    generated_voice_id=voices.previews[0].generated_voice_id
)

print(voice.voice_id)
```

```typescript
const voice = await elevenlabs.textToVoice.create({
    voiceName: "Bostonian",
    voiceDescription: "A high pitched Bostonian accent.",
    // The generated voice ID of the preview you want to use,
    // using the first in the list for this example
    generatedVoiceId: previews[0].generatedVoiceId
});

// The ID of the newly created voice, use this to reference the voice in other APIs
console.log(voice.voiceId);
```

## अगले चरण

#### [वॉइस डिज़ाइन](/docs/hi/eleven-api/guides/how-to/voices/voice-design)

मौजूदा वॉइस को रीमिक्स करने के बजाय टेक्स्ट विवरण से नई वॉइस जनरेट करें।

#### [API रेफरेंस](/docs/hi/api-reference/text-to-voice/remix)

पूरा वॉइस रीमिक्स API रेफरेंस और पैरामीटर।