@nodaro/sdk 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1583,6 +1583,152 @@ var VoicesResource = class {
1583
1583
  exportMix(input) {
1584
1584
  return this.client.request("POST", "/v1/voice-changer-pro/export", { body: input });
1585
1585
  }
1586
+ /**
1587
+ * Design a brand-new synthetic voice from a text description
1588
+ * (`POST /v1/voice-design`) — ElevenLabs text-to-voice. `text` (100–1000 chars)
1589
+ * is a preview line spoken in the designed voice; `voiceDescription` describes
1590
+ * the voice to create. Costs credits and runs async — poll `jobs.get(jobId)`
1591
+ * for the preview + the reusable voice id.
1592
+ */
1593
+ design(input) {
1594
+ return this.client.request("POST", "/v1/voice-design", { body: input });
1595
+ }
1596
+ /**
1597
+ * Generate speech in a voice described in natural language, without cloning
1598
+ * (`POST /v1/voice-remix`). `text` (1–5000 chars) is spoken in a voice matching
1599
+ * `voiceDescription`. Costs credits and runs async — poll `jobs.get(jobId)`.
1600
+ */
1601
+ remix(input) {
1602
+ return this.client.request("POST", "/v1/voice-remix", { body: input });
1603
+ }
1604
+ /**
1605
+ * Dub an audio clip into another language while preserving each speaker's voice
1606
+ * (`POST /v1/dubbing`). `targetLanguage` is an ISO code (e.g. `"es"`, `"fr"`);
1607
+ * `sourceLanguage` is auto-detected when omitted. Costs credits and runs async
1608
+ * — poll `jobs.get(jobId)`.
1609
+ */
1610
+ dub(input) {
1611
+ return this.client.request("POST", "/v1/dubbing", { body: input });
1612
+ }
1613
+ /**
1614
+ * Clone a voice from an audio FILE you hold in memory
1615
+ * (`POST /v1/voice-clones`, multipart) — the counterpart to
1616
+ * {@link VoicesResource.createClone}, which clones from an already-uploaded
1617
+ * URL. Pass the raw audio `file` (a `Blob`/`File` in the browser, or a
1618
+ * `Uint8Array`/`Buffer` in Node) plus a `name`. Costs credits. Returns the new
1619
+ * {@link VoiceClone} (`elevenlabsVoiceId` is the id to recast/synthesize with).
1620
+ */
1621
+ createCloneFromFile(input) {
1622
+ const form = new FormData();
1623
+ form.append("name", input.name);
1624
+ const blob = input.file instanceof Blob ? input.file : new Blob([input.file], { type: input.contentType ?? "audio/mpeg" });
1625
+ form.append("file", blob, input.filename ?? "sample");
1626
+ return this.client.request("POST", "/v1/voice-clones", { body: form });
1627
+ }
1628
+ };
1629
+
1630
+ // src/resources/media.ts
1631
+ var MediaResource = class {
1632
+ constructor(client) {
1633
+ this.client = client;
1634
+ }
1635
+ client;
1636
+ /**
1637
+ * Download a social video (YouTube / TikTok / Instagram / X / Facebook) into
1638
+ * your storage (`POST /v1/download-video`). `maxHeight` caps the resolution
1639
+ * (default "best"); `sectionStartSec` + `sectionEndSec` (both-or-neither) fetch
1640
+ * ONLY that time range instead of the whole video. Returns a `downloadId`;
1641
+ * progress streams from `GET /v1/download-video/progress/:downloadId`
1642
+ * (server-sent events) and the finished file lands in your library.
1643
+ */
1644
+ downloadVideo(input) {
1645
+ return this.client.request("POST", "/v1/download-video", { body: input });
1646
+ }
1647
+ /**
1648
+ * Copy an external media URL into your Nodaro storage (`POST /v1/save-to-storage`)
1649
+ * — a server-side fetch, so nothing round-trips through the client. Poll
1650
+ * `jobs.get(jobId)`.
1651
+ */
1652
+ saveToStorage(input) {
1653
+ return this.client.request("POST", "/v1/save-to-storage", { body: input });
1654
+ }
1655
+ /**
1656
+ * Trim a video to a range (`POST /v1/trim-video`). Give the range in whichever
1657
+ * unit fits: `startTime`/`endTime` seconds, `trim*Frames`, `trim*Seconds`, or
1658
+ * `keepFirst`/`keepLastSeconds`. Poll `jobs.get(jobId)`.
1659
+ */
1660
+ trimVideo(input) {
1661
+ return this.client.request("POST", "/v1/trim-video", { body: input });
1662
+ }
1663
+ /**
1664
+ * Trim (and extract) audio from a video or audio source
1665
+ * (`POST /v1/trim-audio`) to `[startTime, endTime]` seconds, in `audioFormat`
1666
+ * (`mp3` default / `wav` / `aac`). Poll `jobs.get(jobId)`.
1667
+ */
1668
+ trimAudio(input) {
1669
+ return this.client.request("POST", "/v1/trim-audio", { body: input });
1670
+ }
1671
+ /**
1672
+ * Probe a social video's metadata (`POST /v1/video-metadata`) — duration,
1673
+ * dimensions, title, live status — WITHOUT downloading it. A direct read, not a
1674
+ * job. Use it to decide whether to trim before importing.
1675
+ */
1676
+ videoMetadata(input) {
1677
+ return this.client.request("POST", "/v1/video-metadata", { body: input });
1678
+ }
1679
+ };
1680
+
1681
+ // src/resources/audio.ts
1682
+ var AudioResource = class {
1683
+ constructor(client) {
1684
+ this.client = client;
1685
+ }
1686
+ client;
1687
+ /**
1688
+ * Separate an audio track into stems (`POST /v1/audio-separation`, Demucs).
1689
+ * `mode` `"vocal_instrumental"` (default) splits voice from music/SFX;
1690
+ * `"stems"` returns the full drums/bass/other/… breakdown. `quality`
1691
+ * `auto` (default) / `fast` / `best`.
1692
+ */
1693
+ separate(input) {
1694
+ return this.client.request("POST", "/v1/audio-separation", { body: input });
1695
+ }
1696
+ /** Isolate the primary voice and strip background noise (`POST /v1/audio-isolation`, ElevenLabs). */
1697
+ isolate(input) {
1698
+ return this.client.request("POST", "/v1/audio-isolation", { body: input });
1699
+ }
1700
+ /**
1701
+ * Apply a reverb / echo / telephone / megaphone effect to an audio track
1702
+ * (`POST /v1/audio-fx`) — the same presets VCP's `voiceFx` uses, standalone.
1703
+ * `mix` (0–100) is the reverb wet/dry; `delayMs` + `decay` drive `echo`/`custom`;
1704
+ * `eqLow`/`eqHigh` (dB) shape telephone/megaphone.
1705
+ */
1706
+ applyFx(input) {
1707
+ return this.client.request("POST", "/v1/audio-fx", { body: input });
1708
+ }
1709
+ /**
1710
+ * Layer multiple audio tracks into one (`POST /v1/mix-audio`). `audioUrls`
1711
+ * (2–20) are summed; optional `trackVolumes` (0–200% each, positionally) set
1712
+ * per-track level.
1713
+ */
1714
+ mix(input) {
1715
+ return this.client.request("POST", "/v1/mix-audio", { body: input });
1716
+ }
1717
+ /**
1718
+ * Adjust an audio (or a video's audio) level (`POST /v1/adjust-volume`):
1719
+ * `volume` % (default 100), `normalize` to loudnorm, and `fadeIn`/`fadeOut`
1720
+ * seconds. Provide `audioUrl` or `videoUrl`.
1721
+ */
1722
+ adjustVolume(input) {
1723
+ return this.client.request("POST", "/v1/adjust-volume", { body: input });
1724
+ }
1725
+ /**
1726
+ * Concatenate audio segments end-to-end (`POST /v1/combine-audio`). Each
1727
+ * segment is a `url` with an optional `[startTime, endTime]` sub-range.
1728
+ */
1729
+ combine(input) {
1730
+ return this.client.request("POST", "/v1/combine-audio", { body: input });
1731
+ }
1586
1732
  };
1587
1733
 
1588
1734
  // src/resources/credits.ts
@@ -1885,6 +2031,8 @@ var NodaroClient = class {
1885
2031
  reduce;
1886
2032
  promptHelper;
1887
2033
  voices;
2034
+ media;
2035
+ audio;
1888
2036
  credits;
1889
2037
  uploads;
1890
2038
  library;
@@ -1912,6 +2060,8 @@ var NodaroClient = class {
1912
2060
  this.reduce = new ReduceResource(this);
1913
2061
  this.promptHelper = new PromptHelperResource(this);
1914
2062
  this.voices = new VoicesResource(this);
2063
+ this.media = new MediaResource(this);
2064
+ this.audio = new AudioResource(this);
1915
2065
  this.credits = new CreditsResource(this);
1916
2066
  this.uploads = new UploadsResource(this);
1917
2067
  this.library = new LibraryResource(this);
@@ -2009,6 +2159,6 @@ function supabaseAuth(supabase) {
2009
2159
  };
2010
2160
  }
2011
2161
 
2012
- export { AppsResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VoicesResource, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2162
+ export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VoicesResource, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2013
2163
  //# sourceMappingURL=index.js.map
2014
2164
  //# sourceMappingURL=index.js.map