@byte_fluffy/nexra-sdk 0.1.0-alpha.25 → 0.1.0-alpha.27
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/README.md +37 -0
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +2 -2
- package/dist/{chunk-RKIOP6VA.js → chunk-N622DGTD.js} +467 -344
- package/dist/{chunk-OPHFEY7Z.js → chunk-YQXMWTSV.js} +6 -1
- package/dist/index.d.ts +19 -5
- package/dist/index.js +35 -2
- package/dist/{media-geometry-Bo6ukeIQ.d.ts → media-geometry-B7ip-nrA.d.ts} +2 -1
- package/dist/media.d.ts +2 -2
- package/dist/media.js +1 -1
- package/dist/{types-CmONdGYs.d.ts → types-CGOhwG87.d.ts} +31 -2
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,43 @@ available from `@byte_fluffy/nexra-sdk/media`.
|
|
|
37
37
|
The default API base URL is `https://api.nexra-ai.com/v1`. When overriding
|
|
38
38
|
`baseUrl`, include the `/v1` API prefix.
|
|
39
39
|
|
|
40
|
+
## Private ElevenLabs voices
|
|
41
|
+
|
|
42
|
+
Voice design uses `elevenlabs/eleven_multilingual_ttv_v2`, with exactly one prompt
|
|
43
|
+
and one script content part. Preview IDs remain in `task.output.previews`; the
|
|
44
|
+
corresponding audio is returned in the ordered persisted `task.assets` list.
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const design = await nexra.run("elevenlabs/eleven_multilingual_ttv_v2", {
|
|
48
|
+
content: [
|
|
49
|
+
{ type: "text", role: "prompt", text: "A warm, clear and natural narrator voice." },
|
|
50
|
+
{ type: "text", role: "script", text: previewScript },
|
|
51
|
+
],
|
|
52
|
+
}, { idempotencyKey: designKey });
|
|
53
|
+
const creation = await nexra.voices.create({
|
|
54
|
+
name: "Narrator",
|
|
55
|
+
source: { kind: "design", taskId: design.task.id, previewId: selectedPreviewId },
|
|
56
|
+
}, { idempotencyKey: saveKey });
|
|
57
|
+
await nexra.tasks.wait(creation.taskId);
|
|
58
|
+
const voice = await nexra.voices.get(creation.voice.id);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Cloning is a voice-resource operation, not a separate vendor model. Upload owned
|
|
62
|
+
audio through `nexra.assets.upload`, then call `nexra.voices.create` with
|
|
63
|
+
`source: { kind: "clone", samples: [sample.id] }`. The service accepts one to five
|
|
64
|
+
stored audio samples totaling at most 25 MiB. Retain the sample IDs and the same
|
|
65
|
+
idempotency key when retrying a creation.
|
|
66
|
+
|
|
67
|
+
`nexra.voices.list` and `get` read current authenticated resource state. Only an
|
|
68
|
+
active voice can be used for `elevenlabs/eleven_multilingual_v2` speech, using its
|
|
69
|
+
public `voice_` ID. Creation and synthesis settle separately; creation does not
|
|
70
|
+
imply verification or support for renewal, deletion, or voice conversion.
|
|
71
|
+
|
|
72
|
+
Applications using a shared API key must enforce their own end-user ownership
|
|
73
|
+
before reading or consuming a resource; API-key ownership covers the Nexra
|
|
74
|
+
account, not an application's individual users. Published model choices are
|
|
75
|
+
available through `nexra.models.resources(modelId, resource)`.
|
|
76
|
+
|
|
40
77
|
Static catalog APIs are also available from `@byte_fluffy/nexra-sdk/catalog`.
|
|
41
78
|
Exact non-negative decimal helpers are available from
|
|
42
79
|
`@byte_fluffy/nexra-sdk/decimal`.
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HttpTransport, N as NexraSalePriceList, C as CreateNexraQuoteRequest, a as NexraQuote, b as CreateNexraDisplayQuoteBatchRequest, c as NexraDisplayQuoteBatch, d as NexraCatalogRevision, e as NexraModelSpec, f as NexraModelSpecFilter } from './media-geometry-
|
|
2
|
-
export { M as MediaGeometryField, g as MediaGeometryProjection, h as NexraBillingCurrency, i as NexraModelEndpointSpec, j as NexraModelOperation, k as NexraSalePrice, l as NexraSettlement, U as UnifiedMediaGeometry, m as applyMediaGeometry, n as decodeMediaGeometry, o as encodeMediaGeometry, p as projectMediaGeometry } from './media-geometry-
|
|
1
|
+
import { H as HttpTransport, N as NexraSalePriceList, C as CreateNexraQuoteRequest, a as NexraQuote, b as CreateNexraDisplayQuoteBatchRequest, c as NexraDisplayQuoteBatch, d as NexraCatalogRevision, e as NexraModelSpec, f as NexraModelSpecFilter } from './media-geometry-B7ip-nrA.js';
|
|
2
|
+
export { M as MediaGeometryField, g as MediaGeometryProjection, h as NexraBillingCurrency, i as NexraModelEndpointSpec, j as NexraModelOperation, k as NexraSalePrice, l as NexraSettlement, U as UnifiedMediaGeometry, m as applyMediaGeometry, n as decodeMediaGeometry, o as encodeMediaGeometry, p as projectMediaGeometry } from './media-geometry-B7ip-nrA.js';
|
|
3
3
|
import './json-Drjj1OKl.js';
|
|
4
4
|
|
|
5
5
|
declare class CatalogClient {
|
package/dist/catalog.js
CHANGED