> 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.

# वॉइस रीमिक्स करें।

POST https://api.elevenlabs.io/v1/text-to-voice/{voice_id}/remix
Content-Type: application/json

प्रॉम्प्ट के ज़रिए मौजूदा वॉइस को रीमिक्स करें। यह मेथड वॉइस प्रीव्यू की सूची लौटाता है। हर प्रीव्यू में generated_voice_id और base64 एन्कोडेड mp3 ऑडियो के रूप में वॉइस का एक सैंपल होता है। वॉइस बनाने के लिए, पसंदीदा प्रीव्यू के generated_voice_id को /v1/text-to-voice endpoint के साथ इस्तेमाल करें।

Reference: https://elevenlabs.io/docs/api-reference/text-to-voice/remix

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `voice_id` (string, required) — इस्तेमाल की जाने वाली वॉइस ID। सभी उपलब्ध वॉइसेज़ की सूची के लिए आप https://api.elevenlabs.io/v1/voices इस्तेमाल कर सकते हैं।

### Query parameters

- `output_format` (enum, optional) — जनरेट किए गए ऑडियो का output format। codec_sample_rate_bitrate के रूप में फ़ॉर्मैट किया जाता है। इसलिए, 32kbs पर 22.05kHz sample rate वाले mp3 को mp3_22050_32 के रूप में दर्शाया जाता है। 192kbps bitrate वाले MP3 के लिए Creator tier या उससे ऊपर का subscription चाहिए। 44.1kHz sample rate वाले PCM के लिए Pro tier या उससे ऊपर का subscription चाहिए। ध्यान दें कि μ-law format (कभी-कभी mu-law लिखा जाता है, और अक्सर u-law के रूप में अनुमानित) का उपयोग आमतौर पर Twilio audio inputs के लिए होता है।
  - Allowed values: `mp3_22050_32`, `mp3_24000_48`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192`, `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_32000`, `pcm_44100`, `pcm_48000`, `ulaw_8000`, `alaw_8000`, `opus_48000_32`, `opus_48000_64`, `opus_48000_96`, `opus_48000_128`, `opus_48000_192`

### Body (application/json)

This endpoint expects a VoiceRemixRequestModel.

- `voice_description` (string, required) — वॉइस में किए जाने वाले बदलावों का विवरण।
- `text` (string, optional, nullable) — जनरेट करने के लिए टेक्स्ट, जिसकी लंबाई 100 से 1000 के बीच होनी चाहिए।
- `auto_generate_text` (boolean, optional, default: false) — क्या वॉइस विवरण के लिए उपयुक्त टेक्स्ट अपने-आप जनरेट करना है।
- `loudness` (double, optional, default: 0.5) — जनरेट की गई वॉइस का वॉल्यूम स्तर नियंत्रित करता है। -1 सबसे धीमा, 1 सबसे तेज़ है और 0 लगभग -24 LUFS के बराबर है।
- `seed` (integer, optional, nullable) — वॉइस जनरेशन को नियंत्रित करने वाली रैंडम संख्या। समान इनपुट के साथ वही seed इस्तेमाल करने पर वही वॉइस बनती है।
- `guidance_scale` (double, optional, default: 2) — यह नियंत्रित करता है कि AI प्रॉम्प्ट का कितनी बारीकी से पालन करे। कम संख्याएं AI को रचनात्मक होने की अधिक आज़ादी देती हैं, जबकि अधिक संख्याएं उसे प्रॉम्प्ट पर अधिक टिके रहने के लिए बाध्य करती हैं। अधिक संख्याओं से वॉइस कृत्रिम या रोबोटिक लग सकती है। हम कम Guidance Scale पर लंबे और अधिक विस्तृत प्रॉम्प्ट इस्तेमाल करने की सलाह देते हैं।
- `stream_previews` (boolean, optional, default: false) — यह तय करता है कि रिस्पॉन्स में टेक्स्ट टू वॉइस प्रीव्यू शामिल किए जाएं या नहीं। अगर true है, तो केवल जनरेट किए गए IDs लौटाए जाएंगे, जिन्हें फिर /v1/text-to-voice/:generated_voice_id/stream एंडपॉइंट से स्ट्रीम किया जा सकता है।
- `remixing_session_id` (string, optional, nullable) — रीमिक्सिंग सेशन id।
- `remixing_session_iteration_id` (string, optional, nullable) — उस रीमिक्सिंग सेशन इटरेशन की id जिसमें ये जनरेशन संलग्न की जानी चाहिए। न देने पर नया इटरेशन बनाया जाएगा।
- `prompt_strength` (double, optional, nullable) — वॉइस सैंपल जनरेट करते समय प्रॉम्प्ट और रेफ़रेंस ऑडियो के बीच संतुलन नियंत्रित करता है। 0 का मतलब है प्रॉम्प्ट का लगभग कोई प्रभाव नहीं और 1 का मतलब है रेफ़रेंस ऑडियो का लगभग कोई प्रभाव नहीं। यह केवल eleven_ttv_v3 मॉडल के साथ समर्थित है।

## Response

### 200

सफल रिस्पॉन्स

- `previews` (list of VoicePreviewResponseModel, required) — जनरेट की गई वॉइसेस के प्रीव्यू।
- `text` (string, required) — वॉइस का प्रीव्यू देने के लिए इस्तेमाल किया गया टेक्स्ट।

## Errors

### 409 Conflict Error

इस प्रीव्यू के लिए जनरेशन पहले से जारी है। अनुरोध को फिर से आज़माएं।

- `any`

### 422 Unprocessable Entity Error

वैलिडेशन एरर

- `detail` (list of ValidationError, optional)

## Types

### VoicePreviewResponseModel

- `audio_base_64` (string, required) — प्रीव्यू का base64-एन्कोडेड ऑडियो।
- `generated_voice_id` (string, required) — जनरेट की गई वॉइस की ID। इसका उपयोग प्रीव्यू से वॉइस बनाने के लिए करें।
- `media_type` (string, required) — प्रीव्यू का मीडिया प्रकार।
- `duration_secs` (double, required) — प्रीव्यू की अवधि सेकंड में।
- `language` (string, required, nullable) — प्रीव्यू की भाषा।

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Request**

```json
{
  "voice_description": "Make the voice have a higher pitch."
}
```

**Response**

```json
{
  "previews": [
    {
      "audio_base_64": "string",
      "generated_voice_id": "string",
      "media_type": "string",
      "duration_secs": 1.1,
      "language": "string"
    }
  ],
  "text": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix"

payload = { "voice_description": "Make the voice have a higher pitch." }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"voice_description":"Make the voice have a higher pitch."}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix"

	payload := strings.NewReader("{\n  \"voice_description\": \"Make the voice have a higher pitch.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"voice_description\": \"Make the voice have a higher pitch.\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix")
  .header("Content-Type", "application/json")
  .body("{\n  \"voice_description\": \"Make the voice have a higher pitch.\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix', [
  'body' => '{
  "voice_description": "Make the voice have a higher pitch."
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"voice_description\": \"Make the voice have a higher pitch.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["voice_description": "Make the voice have a higher pitch."] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/text-to-voice/21m00Tcm4TlvDq8ikWAM/remix")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```