diff --git a/package.json b/package.json index c361581..0be3d73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "elevenlabs", - "version": "1.50.1", + "version": "1.50.2", "private": false, "repository": "https://github.com/elevenlabs/elevenlabs-js", "license": "MIT", diff --git a/reference.md b/reference.md index 8f2c006..ae7bde7 100644 --- a/reference.md +++ b/reference.md @@ -30,10 +30,7 @@ Returns metadata about all your generated audio.
```typescript -await client.history.getAll({ - page_size: 1, - voice_id: "pMsXgVXv3BLzUgSXRplE", -}); +await client.history.getAll(); ```
@@ -96,7 +93,7 @@ Returns information about an history item by its ID.
```typescript -await client.history.get("ja9xsmfGhxYcymxGcOGB"); +await client.history.get("HISTORY_ITEM_ID"); ```
@@ -159,7 +156,7 @@ Delete a history item by its ID
```typescript -await client.history.delete("ja9xsmfGhxYcymxGcOGB"); +await client.history.delete("HISTORY_ITEM_ID"); ```
@@ -222,7 +219,7 @@ Returns the audio of an history item.
```typescript -await client.history.getAudio("ja9xsmfGhxYcymxGcOGB"); +await client.history.getAudio("HISTORY_ITEM_ID"); ```
@@ -286,7 +283,7 @@ Download one or more history items. If one history item ID is provided, we will ```typescript await client.history.download({ - history_item_ids: ["ja9xsmfGhxYcymxGcOGB"], + history_item_ids: ["HISTORY_ITEM_ID"], }); ``` @@ -324,6 +321,71 @@ await client.history.download({ ## TextToSoundEffects +
client.textToSoundEffects.convert({ ...params }) -> stream.Readable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Converts a text of your choice into sound + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.textToSoundEffects.convert({ + text: "Spacious braam suitable for high-impact movie trailer moments", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ElevenLabs.BodySoundGenerationV1SoundGenerationPost` + +
+
+ +
+
+ +**requestOptions:** `TextToSoundEffects.RequestOptions` + +
+
+
+
+ +
+
+
+ ## AudioIsolation ## samples @@ -356,7 +418,7 @@ Removes a sample by its ID.
```typescript -await client.samples.delete("ja9xsmfGhxYcymxGcOGB", "pMsXgVXv3BLzUgSXRplE"); +await client.samples.delete("VOICE_ID", "SAMPLE_ID"); ```
@@ -427,7 +489,7 @@ Returns the audio corresponding to a sample attached to a voice.
```typescript -await client.samples.getAudio("ja9xsmfGhxYcymxGcOGB", "pMsXgVXv3BLzUgSXRplE"); +await client.samples.getAudio("VOICE_ID", "SAMPLE_ID"); ```
@@ -500,15 +562,10 @@ Converts text into speech using a voice of your choice and returns audio.
```typescript -await client.textToSpeech.convert("pMsXgVXv3BLzUgSXRplE", { - optimize_streaming_latency: "0", - output_format: "mp3_22050_32", - text: "It sure does, Jackie\u2026 My mama always said: \u201CIn Carolina, the air's so thick you can wear it!\u201D", - voice_settings: { - stability: 0.5, - similarity_boost: 0.75, - style: 0, - }, +await client.textToSpeech.convert("JBFqnCBsd6RMkjVDRZzb", { + output_format: "mp3_44100_128", + text: "The first move is what sets everything in motion.", + model_id: "eleven_multilingual_v2", }); ``` @@ -580,8 +637,10 @@ Converts text into speech using a voice of your choice and returns JSON containi
```typescript -await client.textToSpeech.convertWithTimestamps("21m00Tcm4TlvDq8ikWAM", { - text: "text", +await client.textToSpeech.convertWithTimestamps("JBFqnCBsd6RMkjVDRZzb", { + output_format: "mp3_44100_128", + text: "The first move is what sets everything in motion.", + model_id: "eleven_multilingual_v2", }); ``` @@ -606,7 +665,7 @@ await client.textToSpeech.convertWithTimestamps("21m00Tcm4TlvDq8ikWAM", {
-**request:** `ElevenLabs.TextToSpeechWithTimestampsRequest` +**request:** `ElevenLabs.BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost`
@@ -653,15 +712,10 @@ Converts text into speech using a voice of your choice and returns audio as an a
```typescript -await client.textToSpeech.convertAsStream("pMsXgVXv3BLzUgSXRplE", { - optimize_streaming_latency: "0", - output_format: "mp3_22050_32", - text: "It sure does, Jackie\u2026 My mama always said: \u201CIn Carolina, the air's so thick you can wear it!\u201D", - voice_settings: { - stability: 0.1, - similarity_boost: 0.3, - style: 0.2, - }, +await client.textToSpeech.convertAsStream("JBFqnCBsd6RMkjVDRZzb", { + output_format: "mp3_44100_128", + text: "The first move is what sets everything in motion.", + model_id: "eleven_multilingual_v2", }); ``` @@ -686,7 +740,7 @@ await client.textToSpeech.convertAsStream("pMsXgVXv3BLzUgSXRplE", {
-**request:** `ElevenLabs.StreamTextToSpeechRequest` +**request:** `ElevenLabs.BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost`
@@ -733,8 +787,10 @@ Converts text into speech using a voice of your choice and returns a stream of J
```typescript -const response = await client.textToSpeech.streamWithTimestamps("21m00Tcm4TlvDq8ikWAM", { - text: "text", +const response = await client.textToSpeech.streamWithTimestamps("JBFqnCBsd6RMkjVDRZzb", { + output_format: "mp3_44100_128", + text: "The first move is what sets everything in motion.", + model_id: "eleven_multilingual_v2", }); for await (const item of response) { console.log(item); @@ -762,7 +818,7 @@ for await (const item of response) {
-**request:** `ElevenLabs.StreamTextToSpeechWithTimstampsRequest` +**request:** `ElevenLabs.BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost`
@@ -783,6 +839,156 @@ for await (const item of response) { ## SpeechToSpeech +
client.speechToSpeech.convert(voiceId, { ...params }) -> stream.Readable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create speech by combining the content and emotion of the uploaded audio with a voice of your choice. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.speechToSpeech.convert("JBFqnCBsd6RMkjVDRZzb", { + audio: fs.createReadStream("/path/to/your/file"), + output_format: "mp3_44100_128", + model_id: "eleven_multilingual_sts_v2", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voiceId:** `string` + +
+
+ +
+
+ +**request:** `ElevenLabs.BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost` + +
+
+ +
+
+ +**requestOptions:** `SpeechToSpeech.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.speechToSpeech.convertAsStream(voiceId, { ...params }) -> stream.Readable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create speech by combining the content and emotion of the uploaded audio with a voice of your choice and returns an audio stream. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.speechToSpeech.convertAsStream("JBFqnCBsd6RMkjVDRZzb", { + audio: fs.createReadStream("/path/to/your/file"), + output_format: "mp3_44100_128", + model_id: "eleven_multilingual_sts_v2", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**voiceId:** `string` + +
+
+ +
+
+ +**request:** `ElevenLabs.BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost` + +
+
+ +
+
+ +**requestOptions:** `SpeechToSpeech.RequestOptions` + +
+
+
+
+ +
+
+
+ ## VoiceGeneration
client.voiceGeneration.generateParameters() -> ElevenLabs.VoiceGenerationParameterResponse @@ -1371,7 +1577,7 @@ Returns the settings for a specific voice. "similarity_boost" corresponds to"Cla
```typescript -await client.voices.getSettings("2EiwWnXFnvU5JabPnv8n"); +await client.voices.getSettings("JBFqnCBsd6RMkjVDRZzb"); ```
@@ -1434,7 +1640,7 @@ Returns metadata about a specific voice.
```typescript -await client.voices.get("29vD33N1CtxCmqQRPOHJ"); +await client.voices.get("JBFqnCBsd6RMkjVDRZzb"); ```
@@ -1505,7 +1711,7 @@ Deletes a voice by its ID.
```typescript -await client.voices.delete("29vD33N1CtxCmqQRPOHJ"); +await client.voices.delete("VOICE_ID"); ```
@@ -1568,7 +1774,7 @@ Edit your settings for a specific voice. "similarity_boost" corresponds to"Clari
```typescript -await client.voices.editSettings("29vD33N1CtxCmqQRPOHJ", { +await client.voices.editSettings("VOICE_ID", { stability: 0.1, similarity_boost: 0.3, style: 0.2, @@ -1709,7 +1915,7 @@ Edit a voice created by you.
```typescript -await client.voices.edit("JBFqnCBsd6RMkjVDRZzb", { +await client.voices.edit("VOICE_ID", { name: "George", }); ``` diff --git a/src/api/resources/audioIsolation/client/Client.ts b/src/api/resources/audioIsolation/client/Client.ts index 0d0e15e..c9fbefb 100644 --- a/src/api/resources/audioIsolation/client/Client.ts +++ b/src/api/resources/audioIsolation/client/Client.ts @@ -57,8 +57,8 @@ export class AudioIsolation { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -129,8 +129,8 @@ export class AudioIsolation { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, diff --git a/src/api/resources/audioNative/client/Client.ts b/src/api/resources/audioNative/client/Client.ts index 5d8e890..39dae53 100644 --- a/src/api/resources/audioNative/client/Client.ts +++ b/src/api/resources/audioNative/client/Client.ts @@ -109,8 +109,8 @@ export class AudioNative { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, diff --git a/src/api/resources/chapters/client/Client.ts b/src/api/resources/chapters/client/Client.ts index 95319b3..168bf1b 100644 --- a/src/api/resources/chapters/client/Client.ts +++ b/src/api/resources/chapters/client/Client.ts @@ -60,8 +60,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -137,8 +137,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -214,8 +214,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -293,8 +293,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -371,8 +371,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -448,8 +448,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -531,8 +531,8 @@ export class Chapters { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/conversationalAi/client/Client.ts b/src/api/resources/conversationalAi/client/Client.ts index 1062437..dae0584 100644 --- a/src/api/resources/conversationalAi/client/Client.ts +++ b/src/api/resources/conversationalAi/client/Client.ts @@ -66,8 +66,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -144,8 +144,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -218,8 +218,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -293,8 +293,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -370,8 +370,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -454,8 +454,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -530,8 +530,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -612,8 +612,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -691,8 +691,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -771,8 +771,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -859,8 +859,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -950,8 +950,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1044,8 +1044,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1118,8 +1118,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1193,8 +1193,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1268,8 +1268,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1347,8 +1347,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1429,8 +1429,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1505,8 +1505,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1580,8 +1580,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1657,8 +1657,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -1731,8 +1731,8 @@ export class ConversationalAi { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/dubbing/client/Client.ts b/src/api/resources/dubbing/client/Client.ts index d5f4d44..ec1d0a6 100644 --- a/src/api/resources/dubbing/client/Client.ts +++ b/src/api/resources/dubbing/client/Client.ts @@ -110,8 +110,8 @@ export class Dubbing { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -185,8 +185,8 @@ export class Dubbing { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -255,8 +255,8 @@ export class Dubbing { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -324,8 +324,8 @@ export class Dubbing { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -410,8 +410,8 @@ export class Dubbing { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/history/client/Client.ts b/src/api/resources/history/client/Client.ts index f53eb04..9b2a0a5 100644 --- a/src/api/resources/history/client/Client.ts +++ b/src/api/resources/history/client/Client.ts @@ -42,10 +42,7 @@ export class History { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.history.getAll({ - * page_size: 1, - * voice_id: "pMsXgVXv3BLzUgSXRplE" - * }) + * await client.history.getAll() */ public async getAll( request: ElevenLabs.HistoryGetAllRequest = {}, @@ -92,8 +89,8 @@ export class History { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -147,7 +144,7 @@ export class History { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.history.get("ja9xsmfGhxYcymxGcOGB") + * await client.history.get("HISTORY_ITEM_ID") */ public async get( historyItemId: string, @@ -166,8 +163,8 @@ export class History { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -222,7 +219,7 @@ export class History { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.history.delete("ja9xsmfGhxYcymxGcOGB") + * await client.history.delete("HISTORY_ITEM_ID") */ public async delete(historyItemId: string, requestOptions?: History.RequestOptions): Promise { const _response = await core.fetcher({ @@ -238,8 +235,8 @@ export class History { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -303,8 +300,8 @@ export class History { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -361,7 +358,7 @@ export class History { * * @example * await client.history.download({ - * history_item_ids: ["ja9xsmfGhxYcymxGcOGB"] + * history_item_ids: ["HISTORY_ITEM_ID"] * }) */ public async download( @@ -381,8 +378,8 @@ export class History { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/history/client/requests/DownloadHistoryRequest.ts b/src/api/resources/history/client/requests/DownloadHistoryRequest.ts index f604b72..ab10999 100644 --- a/src/api/resources/history/client/requests/DownloadHistoryRequest.ts +++ b/src/api/resources/history/client/requests/DownloadHistoryRequest.ts @@ -5,7 +5,7 @@ /** * @example * { - * history_item_ids: ["ja9xsmfGhxYcymxGcOGB"] + * history_item_ids: ["HISTORY_ITEM_ID"] * } */ export interface DownloadHistoryRequest { diff --git a/src/api/resources/history/client/requests/HistoryGetAllRequest.ts b/src/api/resources/history/client/requests/HistoryGetAllRequest.ts index cc2bab6..d93e5fc 100644 --- a/src/api/resources/history/client/requests/HistoryGetAllRequest.ts +++ b/src/api/resources/history/client/requests/HistoryGetAllRequest.ts @@ -6,10 +6,7 @@ import * as ElevenLabs from "../../../../index"; /** * @example - * { - * page_size: 1, - * voice_id: "pMsXgVXv3BLzUgSXRplE" - * } + * {} */ export interface HistoryGetAllRequest { /** diff --git a/src/api/resources/models/client/Client.ts b/src/api/resources/models/client/Client.ts index 55657c1..191593a 100644 --- a/src/api/resources/models/client/Client.ts +++ b/src/api/resources/models/client/Client.ts @@ -59,8 +59,8 @@ export class Models { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/projects/client/Client.ts b/src/api/resources/projects/client/Client.ts index 03fb0a9..3c8f02d 100644 --- a/src/api/resources/projects/client/Client.ts +++ b/src/api/resources/projects/client/Client.ts @@ -60,8 +60,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -220,8 +220,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -295,8 +295,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -374,8 +374,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -447,8 +447,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -519,8 +519,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -594,8 +594,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -664,8 +664,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -745,8 +745,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -827,8 +827,8 @@ export class Projects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/pronunciationDictionary/client/Client.ts b/src/api/resources/pronunciationDictionary/client/Client.ts index 9591c28..ed24b06 100644 --- a/src/api/resources/pronunciationDictionary/client/Client.ts +++ b/src/api/resources/pronunciationDictionary/client/Client.ts @@ -77,8 +77,8 @@ export class PronunciationDictionary { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -163,8 +163,8 @@ export class PronunciationDictionary { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -243,8 +243,8 @@ export class PronunciationDictionary { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -323,8 +323,8 @@ export class PronunciationDictionary { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -399,8 +399,8 @@ export class PronunciationDictionary { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -486,8 +486,8 @@ export class PronunciationDictionary { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/samples/client/Client.ts b/src/api/resources/samples/client/Client.ts index 982bf1b..621f211 100644 --- a/src/api/resources/samples/client/Client.ts +++ b/src/api/resources/samples/client/Client.ts @@ -46,7 +46,7 @@ export class Samples { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.samples.delete("ja9xsmfGhxYcymxGcOGB", "pMsXgVXv3BLzUgSXRplE") + * await client.samples.delete("VOICE_ID", "SAMPLE_ID") */ public async delete(voiceId: string, sampleId: string, requestOptions?: Samples.RequestOptions): Promise { const _response = await core.fetcher({ @@ -62,8 +62,8 @@ export class Samples { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -131,8 +131,8 @@ export class Samples { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/speechToSpeech/client/Client.ts b/src/api/resources/speechToSpeech/client/Client.ts index addf31d..5a144d5 100644 --- a/src/api/resources/speechToSpeech/client/Client.ts +++ b/src/api/resources/speechToSpeech/client/Client.ts @@ -48,7 +48,7 @@ export class SpeechToSpeech { } if (request.optimize_streaming_latency != null) { - _queryParams["optimize_streaming_latency"] = request.optimize_streaming_latency; + _queryParams["optimize_streaming_latency"] = request.optimize_streaming_latency.toString(); } if (request.output_format != null) { @@ -87,8 +87,8 @@ export class SpeechToSpeech { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -149,11 +149,11 @@ export class SpeechToSpeech { ): Promise { const _queryParams: Record = {}; if (request.enable_logging != null) { - _queryParams["enable_logging"] = request.enable_logging; + _queryParams["enable_logging"] = request.enable_logging.toString(); } if (request.optimize_streaming_latency != null) { - _queryParams["optimize_streaming_latency"] = request.optimize_streaming_latency; + _queryParams["optimize_streaming_latency"] = request.optimize_streaming_latency.toString(); } if (request.output_format != null) { @@ -192,8 +192,8 @@ export class SpeechToSpeech { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, diff --git a/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.ts b/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.ts index faf161b..826f54b 100644 --- a/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.ts +++ b/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.ts @@ -2,33 +2,37 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as ElevenLabs from "../../../../index"; import * as fs from "fs"; +import * as ElevenLabs from "../../../../index"; +/** + * @example + * { + * audio: fs.createReadStream("/path/to/your/file"), + * output_format: "mp3_44100_128", + * model_id: "eleven_multilingual_sts_v2" + * } + */ export interface BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost { /** - * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. + * When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers. */ - enable_logging?: ElevenLabs.OptimizeStreamingLatency; + enable_logging?: boolean; /** - * The output format of the generated audio. + * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: + * 0 - default mode (no latency optimizations) + * 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) + * 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) + * 3 - max latency optimizations + * 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + * + * Defaults to None. */ - optimize_streaming_latency?: ElevenLabs.OutputFormat; + optimize_streaming_latency?: number; /** - * Output format of the generated audio. Must be one of: - * mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps. - * mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps. - * mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps. - * mp3_44100_96 - output format, mp3 with 44.1kHz sample rate at 96kbps. - * mp3_44100_128 - default output format, mp3 with 44.1kHz sample rate at 128kbps. - * mp3_44100_192 - output format, mp3 with 44.1kHz sample rate at 192kbps. Requires you to be subscribed to Creator tier or above. - * pcm_16000 - PCM format (S16LE) with 16kHz sample rate. - * pcm_22050 - PCM format (S16LE) with 22.05kHz sample rate. - * pcm_24000 - PCM format (S16LE) with 24kHz sample rate. - * pcm_44100 - PCM format (S16LE) with 44.1kHz sample rate. Requires you to be subscribed to Pro tier or above. - * ulaw_8000 - μ-law format (sometimes written mu-law, often approximated as u-law) with 8kHz sample rate. Note that this format is commonly used for Twilio audio inputs. + * The output format of the generated audio. */ - output_format?: string; + output_format?: ElevenLabs.OutputFormat; audio: File | fs.ReadStream | Blob; /** Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. */ model_id?: string; diff --git a/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.ts b/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.ts index 136d1ce..3a4e30e 100644 --- a/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.ts +++ b/src/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.ts @@ -2,18 +2,33 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as ElevenLabs from "../../../../index"; import * as fs from "fs"; +import * as ElevenLabs from "../../../../index"; +/** + * @example + * { + * audio: fs.createReadStream("/path/to/your/file"), + * output_format: "mp3_44100_128", + * model_id: "eleven_multilingual_sts_v2" + * } + */ export interface BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost { /** * When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers. */ enable_logging?: boolean; /** - * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. + * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: + * 0 - default mode (no latency optimizations) + * 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) + * 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) + * 3 - max latency optimizations + * 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + * + * Defaults to None. */ - optimize_streaming_latency?: ElevenLabs.OptimizeStreamingLatency; + optimize_streaming_latency?: number; /** * The output format of the generated audio. */ diff --git a/src/api/resources/textToSoundEffects/client/Client.ts b/src/api/resources/textToSoundEffects/client/Client.ts index 514391a..ed5b6dd 100644 --- a/src/api/resources/textToSoundEffects/client/Client.ts +++ b/src/api/resources/textToSoundEffects/client/Client.ts @@ -54,8 +54,8 @@ export class TextToSoundEffects { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/textToSoundEffects/client/requests/BodySoundGenerationV1SoundGenerationPost.ts b/src/api/resources/textToSoundEffects/client/requests/BodySoundGenerationV1SoundGenerationPost.ts index db2d5dc..f53bc46 100644 --- a/src/api/resources/textToSoundEffects/client/requests/BodySoundGenerationV1SoundGenerationPost.ts +++ b/src/api/resources/textToSoundEffects/client/requests/BodySoundGenerationV1SoundGenerationPost.ts @@ -2,6 +2,12 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * { + * text: "Spacious braam suitable for high-impact movie trailer moments" + * } + */ export interface BodySoundGenerationV1SoundGenerationPost { /** The text that will get converted into a sound effect. */ text: string; diff --git a/src/api/resources/textToSpeech/client/Client.ts b/src/api/resources/textToSpeech/client/Client.ts index b3c5713..bf5fc07 100644 --- a/src/api/resources/textToSpeech/client/Client.ts +++ b/src/api/resources/textToSpeech/client/Client.ts @@ -54,7 +54,7 @@ export class TextToSpeech { } if (optimizeStreamingLatency != null) { - _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency; + _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency.toString(); } if (outputFormat != null) { @@ -74,8 +74,8 @@ export class TextToSpeech { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -128,19 +128,21 @@ export class TextToSpeech { * Converts text into speech using a voice of your choice and returns JSON containing audio as a base64 encoded string together with information on when which character was spoken. * * @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. - * @param {ElevenLabs.TextToSpeechWithTimestampsRequest} request + * @param {ElevenLabs.BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost} request * @param {TextToSpeech.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.textToSpeech.convertWithTimestamps("21m00Tcm4TlvDq8ikWAM", { - * text: "text" + * await client.textToSpeech.convertWithTimestamps("JBFqnCBsd6RMkjVDRZzb", { + * output_format: "mp3_44100_128", + * text: "The first move is what sets everything in motion.", + * model_id: "eleven_multilingual_v2" * }) */ public async convertWithTimestamps( voiceId: string, - request: ElevenLabs.TextToSpeechWithTimestampsRequest, + request: ElevenLabs.BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost, requestOptions?: TextToSpeech.RequestOptions ): Promise { const { @@ -155,7 +157,7 @@ export class TextToSpeech { } if (optimizeStreamingLatency != null) { - _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency; + _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency.toString(); } if (outputFormat != null) { @@ -175,8 +177,8 @@ export class TextToSpeech { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -230,7 +232,7 @@ export class TextToSpeech { */ public async convertAsStream( voiceId: string, - request: ElevenLabs.StreamTextToSpeechRequest, + request: ElevenLabs.BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost, requestOptions?: TextToSpeech.RequestOptions ): Promise { const { @@ -245,7 +247,7 @@ export class TextToSpeech { } if (optimizeStreamingLatency != null) { - _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency; + _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency.toString(); } if (outputFormat != null) { @@ -265,8 +267,8 @@ export class TextToSpeech { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -320,7 +322,7 @@ export class TextToSpeech { */ public async streamWithTimestamps( voiceId: string, - request: ElevenLabs.StreamTextToSpeechWithTimstampsRequest, + request: ElevenLabs.BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost, requestOptions?: TextToSpeech.RequestOptions ): Promise> { const { @@ -335,7 +337,7 @@ export class TextToSpeech { } if (optimizeStreamingLatency != null) { - _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency; + _queryParams["optimize_streaming_latency"] = optimizeStreamingLatency.toString(); } if (outputFormat != null) { @@ -355,8 +357,8 @@ export class TextToSpeech { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/textToSpeech/client/requests/StreamTextToSpeechRequest.ts b/src/api/resources/textToSpeech/client/requests/BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost.ts similarity index 82% rename from src/api/resources/textToSpeech/client/requests/StreamTextToSpeechRequest.ts rename to src/api/resources/textToSpeech/client/requests/BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost.ts index 8f219a6..908866d 100644 --- a/src/api/resources/textToSpeech/client/requests/StreamTextToSpeechRequest.ts +++ b/src/api/resources/textToSpeech/client/requests/BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost.ts @@ -7,25 +7,27 @@ import * as ElevenLabs from "../../../../index"; /** * @example * { - * optimize_streaming_latency: "0", - * output_format: "mp3_22050_32", - * text: "It sure does, Jackie\u2026 My mama always said: \u201CIn Carolina, the air's so thick you can wear it!\u201D", - * voice_settings: { - * stability: 0.1, - * similarity_boost: 0.3, - * style: 0.2 - * } + * output_format: "mp3_44100_128", + * text: "The first move is what sets everything in motion.", + * model_id: "eleven_multilingual_v2" * } */ -export interface StreamTextToSpeechRequest { +export interface BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost { /** * When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers. */ enable_logging?: boolean; /** - * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. + * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: + * 0 - default mode (no latency optimizations) + * 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) + * 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) + * 3 - max latency optimizations + * 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + * + * Defaults to None. */ - optimize_streaming_latency?: ElevenLabs.OptimizeStreamingLatency; + optimize_streaming_latency?: number; /** * The output format of the generated audio. */ diff --git a/src/api/resources/textToSpeech/client/requests/StreamTextToSpeechWithTimstampsRequest.ts b/src/api/resources/textToSpeech/client/requests/BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost.ts similarity index 82% rename from src/api/resources/textToSpeech/client/requests/StreamTextToSpeechWithTimstampsRequest.ts rename to src/api/resources/textToSpeech/client/requests/BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost.ts index f5d609b..c196473 100644 --- a/src/api/resources/textToSpeech/client/requests/StreamTextToSpeechWithTimstampsRequest.ts +++ b/src/api/resources/textToSpeech/client/requests/BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost.ts @@ -7,18 +7,27 @@ import * as ElevenLabs from "../../../../index"; /** * @example * { - * text: "text" + * output_format: "mp3_44100_128", + * text: "The first move is what sets everything in motion.", + * model_id: "eleven_multilingual_v2" * } */ -export interface StreamTextToSpeechWithTimstampsRequest { +export interface BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost { /** * When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers. */ enable_logging?: boolean; /** - * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. + * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: + * 0 - default mode (no latency optimizations) + * 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) + * 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) + * 3 - max latency optimizations + * 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + * + * Defaults to None. */ - optimize_streaming_latency?: ElevenLabs.OptimizeStreamingLatency; + optimize_streaming_latency?: number; /** * The output format of the generated audio. */ diff --git a/src/api/resources/textToSpeech/client/requests/TextToSpeechWithTimestampsRequest.ts b/src/api/resources/textToSpeech/client/requests/BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost.ts similarity index 82% rename from src/api/resources/textToSpeech/client/requests/TextToSpeechWithTimestampsRequest.ts rename to src/api/resources/textToSpeech/client/requests/BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost.ts index 7e3136e..4e76fc2 100644 --- a/src/api/resources/textToSpeech/client/requests/TextToSpeechWithTimestampsRequest.ts +++ b/src/api/resources/textToSpeech/client/requests/BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost.ts @@ -7,18 +7,27 @@ import * as ElevenLabs from "../../../../index"; /** * @example * { - * text: "text" + * output_format: "mp3_44100_128", + * text: "The first move is what sets everything in motion.", + * model_id: "eleven_multilingual_v2" * } */ -export interface TextToSpeechWithTimestampsRequest { +export interface BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost { /** * When enable_logging is set to false full privacy mode will be used for the request. This will mean history features are unavailable for this request, including request stitching. Full privacy mode may only be used by enterprise customers. */ enable_logging?: boolean; /** - * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. + * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: + * 0 - default mode (no latency optimizations) + * 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) + * 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) + * 3 - max latency optimizations + * 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + * + * Defaults to None. */ - optimize_streaming_latency?: ElevenLabs.OptimizeStreamingLatency; + optimize_streaming_latency?: number; /** * The output format of the generated audio. */ diff --git a/src/api/resources/textToSpeech/client/requests/TextToSpeechRequest.ts b/src/api/resources/textToSpeech/client/requests/TextToSpeechRequest.ts index 1193309..92b9084 100644 --- a/src/api/resources/textToSpeech/client/requests/TextToSpeechRequest.ts +++ b/src/api/resources/textToSpeech/client/requests/TextToSpeechRequest.ts @@ -7,14 +7,9 @@ import * as ElevenLabs from "../../../../index"; /** * @example * { - * optimize_streaming_latency: "0", - * output_format: "mp3_22050_32", - * text: "It sure does, Jackie\u2026 My mama always said: \u201CIn Carolina, the air's so thick you can wear it!\u201D", - * voice_settings: { - * stability: 0.5, - * similarity_boost: 0.75, - * style: 0 - * } + * output_format: "mp3_44100_128", + * text: "The first move is what sets everything in motion.", + * model_id: "eleven_multilingual_v2" * } */ export interface TextToSpeechRequest { @@ -23,9 +18,16 @@ export interface TextToSpeechRequest { */ enable_logging?: boolean; /** - * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. + * You can turn on latency optimizations at some cost of quality. The best possible final latency varies by model. Possible values: + * 0 - default mode (no latency optimizations) + * 1 - normal latency optimizations (about 50% of possible latency improvement of option 3) + * 2 - strong latency optimizations (about 75% of possible latency improvement of option 3) + * 3 - max latency optimizations + * 4 - max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). + * + * Defaults to None. */ - optimize_streaming_latency?: ElevenLabs.OptimizeStreamingLatency; + optimize_streaming_latency?: number; /** * The output format of the generated audio. */ diff --git a/src/api/resources/textToSpeech/client/requests/index.ts b/src/api/resources/textToSpeech/client/requests/index.ts index 0cd358b..3fad5c4 100644 --- a/src/api/resources/textToSpeech/client/requests/index.ts +++ b/src/api/resources/textToSpeech/client/requests/index.ts @@ -1,4 +1,4 @@ export { type TextToSpeechRequest } from "./TextToSpeechRequest"; -export { type TextToSpeechWithTimestampsRequest } from "./TextToSpeechWithTimestampsRequest"; -export { type StreamTextToSpeechRequest } from "./StreamTextToSpeechRequest"; -export { type StreamTextToSpeechWithTimstampsRequest } from "./StreamTextToSpeechWithTimstampsRequest"; +export { type BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost } from "./BodyTextToSpeechWithTimestampsV1TextToSpeechVoiceIdWithTimestampsPost"; +export { type BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost } from "./BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPost"; +export { type BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost } from "./BodyTextToSpeechStreamingWithTimestampsV1TextToSpeechVoiceIdStreamWithTimestampsPost"; diff --git a/src/api/resources/textToVoice/client/Client.ts b/src/api/resources/textToVoice/client/Client.ts index 0d29c91..2b713f5 100644 --- a/src/api/resources/textToVoice/client/Client.ts +++ b/src/api/resources/textToVoice/client/Client.ts @@ -69,8 +69,8 @@ export class TextToVoice { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -150,8 +150,8 @@ export class TextToVoice { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/usage/client/Client.ts b/src/api/resources/usage/client/Client.ts index 4127b61..55e96de 100644 --- a/src/api/resources/usage/client/Client.ts +++ b/src/api/resources/usage/client/Client.ts @@ -80,8 +80,8 @@ export class Usage { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/user/client/Client.ts b/src/api/resources/user/client/Client.ts index 59473fc..24d0561 100644 --- a/src/api/resources/user/client/Client.ts +++ b/src/api/resources/user/client/Client.ts @@ -56,8 +56,8 @@ export class User { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -125,8 +125,8 @@ export class User { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/voiceGeneration/client/Client.ts b/src/api/resources/voiceGeneration/client/Client.ts index 17e65ef..25a6427 100644 --- a/src/api/resources/voiceGeneration/client/Client.ts +++ b/src/api/resources/voiceGeneration/client/Client.ts @@ -57,8 +57,8 @@ export class VoiceGeneration { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -118,8 +118,8 @@ export class VoiceGeneration { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -199,8 +199,8 @@ export class VoiceGeneration { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/voices/client/Client.ts b/src/api/resources/voices/client/Client.ts index 79952e3..5d3c2ad 100644 --- a/src/api/resources/voices/client/Client.ts +++ b/src/api/resources/voices/client/Client.ts @@ -70,8 +70,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -138,8 +138,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -187,7 +187,7 @@ export class Voices { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.voices.getSettings("2EiwWnXFnvU5JabPnv8n") + * await client.voices.getSettings("JBFqnCBsd6RMkjVDRZzb") */ public async getSettings( voiceId: string, @@ -206,8 +206,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -263,7 +263,7 @@ export class Voices { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.voices.get("29vD33N1CtxCmqQRPOHJ") + * await client.voices.get("JBFqnCBsd6RMkjVDRZzb") */ public async get( voiceId: string, @@ -289,8 +289,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -344,7 +344,7 @@ export class Voices { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.voices.delete("29vD33N1CtxCmqQRPOHJ") + * await client.voices.delete("VOICE_ID") */ public async delete(voiceId: string, requestOptions?: Voices.RequestOptions): Promise { const _response = await core.fetcher({ @@ -360,8 +360,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -415,7 +415,7 @@ export class Voices { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.voices.editSettings("29vD33N1CtxCmqQRPOHJ", { + * await client.voices.editSettings("VOICE_ID", { * stability: 0.1, * similarity_boost: 0.3, * style: 0.2 @@ -439,8 +439,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -537,8 +537,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -594,7 +594,7 @@ export class Voices { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.voices.edit("JBFqnCBsd6RMkjVDRZzb", { + * await client.voices.edit("VOICE_ID", { * name: "George" * }) */ @@ -637,8 +637,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -720,8 +720,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -881,8 +881,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -969,8 +969,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -1044,8 +1044,8 @@ export class Voices { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/resources/workspace/client/Client.ts b/src/api/resources/workspace/client/Client.ts index 00f22cc..9fdf47d 100644 --- a/src/api/resources/workspace/client/Client.ts +++ b/src/api/resources/workspace/client/Client.ts @@ -62,8 +62,8 @@ export class Workspace { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -140,8 +140,8 @@ export class Workspace { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -216,8 +216,8 @@ export class Workspace { : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "elevenlabs", - "X-Fern-SDK-Version": "1.50.1", - "User-Agent": "elevenlabs/1.50.1", + "X-Fern-SDK-Version": "1.50.2", + "User-Agent": "elevenlabs/1.50.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/src/api/types/AudioNativeGetEmbedCodeResponseModel.ts b/src/api/types/AudioNativeGetEmbedCodeResponseModel.ts deleted file mode 100644 index 6fe7c6b..0000000 --- a/src/api/types/AudioNativeGetEmbedCodeResponseModel.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type AudioNativeGetEmbedCodeResponseModel = unknown; diff --git a/src/api/types/History.ts b/src/api/types/History.ts deleted file mode 100644 index 6c92110..0000000 --- a/src/api/types/History.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type History = unknown; diff --git a/src/api/types/OptimizeStreamingLatency.ts b/src/api/types/OptimizeStreamingLatency.ts deleted file mode 100644 index d51a223..0000000 --- a/src/api/types/OptimizeStreamingLatency.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type OptimizeStreamingLatency = - /** - * Default mode (no latency optimizations) */ - | "0" - /** - * Normal latency optimizations (about 50% of possible latency improvement of option 3) */ - | "1" - /** - * Strong latency optimizations (about 75% of possible latency improvement of option 3) */ - | "2" - /** - * Max latency optimizations */ - | "3" - /** - * Max latency optimizations, but also with text normalizer turned off for even more latency savings (best latency, but can mispronounce eg numbers and dates). */ - | "4"; -export const OptimizeStreamingLatency = { - Zero: "0", - One: "1", - Two: "2", - Three: "3", - Four: "4", -} as const; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 1b054bc..c39fa0b 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -200,13 +200,10 @@ export * from "./WebhookToolApiSchemaConfigRequestHeadersValue"; export * from "./WebhookToolApiSchemaConfig"; export * from "./WebhookToolConfig"; export * from "./WidgetFeedbackMode"; -export * from "./AudioNativeGetEmbedCodeResponseModel"; +export * from "./OutputFormat"; export * from "./HistoryItem"; -export * from "./History"; export * from "./Accent"; export * from "./Age"; export * from "./Gender"; export * from "./Currency"; export * from "./TextToSpeechAsStreamRequest"; -export * from "./OutputFormat"; -export * from "./OptimizeStreamingLatency"; diff --git a/src/core/streaming-fetcher/Stream.ts b/src/core/streaming-fetcher/Stream.ts index 1480d1a..dccdb79 100644 --- a/src/core/streaming-fetcher/Stream.ts +++ b/src/core/streaming-fetcher/Stream.ts @@ -90,13 +90,9 @@ export class Stream implements AsyncIterable { return; } - // (Louis custom fix do not override) Trim whitespace and check if line is not empty - // Reason: ElevenLabs occasionally returns empty chunks - const trimmedLine = line.trim(); - if (trimmedLine) { - const message = await this.parse(JSON.parse(trimmedLine)); - yield message; - } + // Otherwise, yield message from the prefix to the terminator + const message = await this.parse(JSON.parse(line)); + yield message; prefixSeen = false; } } diff --git a/src/version.ts b/src/version.ts index 0d9cfc7..bad7a56 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "1.50.1"; +export const SDK_VERSION = "1.50.2";