@imgly/plugin-ai-audio-generation-web 0.1.0-rc.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/CHANGELOG.md +6 -0
- package/LICENSE.md +17 -0
- package/README.md +204 -0
- package/dist/constants.d.ts +1 -0
- package/dist/elevenlabs/ElevenMultilingualV2.d.ts +21 -0
- package/dist/elevenlabs/ElevenSoundEffects.d.ts +16 -0
- package/dist/elevenlabs/index.d.ts +7 -0
- package/dist/elevenlabs/index.mjs +2 -0
- package/dist/elevenlabs/index.mjs.map +7 -0
- package/dist/elevenlabs/utils.d.ts +40 -0
- package/dist/iconSprite.d.ts +3 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +85 -0
- package/dist/index.mjs.map +7 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/types.d.ts +32 -0
- package/package.json +75 -0
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
GNU Affero General Public License
|
|
3
|
+
=================================
|
|
4
|
+
|
|
5
|
+
_Version 3, 19 November 2007_
|
|
6
|
+
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
|
7
|
+
|
|
8
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
9
|
+
of this license document, but changing it is not allowed.
|
|
10
|
+
|
|
11
|
+
## Preamble
|
|
12
|
+
|
|
13
|
+
The GNU Affero General Public License is a free, copyleft license for
|
|
14
|
+
software and other kinds of works, specifically designed to ensure
|
|
15
|
+
cooperation with the community in the case of network server software.
|
|
16
|
+
|
|
17
|
+
[Full license text omitted for brevity]
|
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# IMG.LY AI Audio Generation for Web
|
|
2
|
+
|
|
3
|
+
A plugin for integrating AI audio generation capabilities into CreativeEditor SDK.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The `@imgly/plugin-ai-audio-generation-web` package enables users to generate audio content using AI directly within CreativeEditor SDK. This shipped provider leverages the [ElevenLabs](https://elevenlabs.io) platform to provide high-quality text-to-speech and sound effect generation.
|
|
8
|
+
|
|
9
|
+
Features include:
|
|
10
|
+
|
|
11
|
+
- Text-to-speech generation with multiple voices
|
|
12
|
+
- Sound effect generation from text descriptions
|
|
13
|
+
- Voice selection interface
|
|
14
|
+
- Speed adjustment
|
|
15
|
+
- Automatic history tracking
|
|
16
|
+
- Seamless integration with CreativeEditor SDK
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @imgly/plugin-ai-audio-generation-web
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Basic Configuration
|
|
27
|
+
|
|
28
|
+
To use the plugin, import it and configure it with your preferred providers:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
32
|
+
import AudioGeneration from '@imgly/plugin-ai-audio-generation-web';
|
|
33
|
+
import Elevenlabs from '@imgly/plugin-ai-audio-generation-web/elevenlabs';
|
|
34
|
+
|
|
35
|
+
// Initialize CreativeEditor SDK
|
|
36
|
+
CreativeEditorSDK.create(domElement, {
|
|
37
|
+
license: 'your-license-key'
|
|
38
|
+
// Other configuration options...
|
|
39
|
+
}).then(async (cesdk) => {
|
|
40
|
+
// Add the audio generation plugin
|
|
41
|
+
cesdk.addPlugin(
|
|
42
|
+
AudioGeneration({
|
|
43
|
+
// Text-to-speech provider
|
|
44
|
+
text2speech: Elevenlabs.ElevenMultilingualV2({
|
|
45
|
+
proxyUrl: 'https://your-elevenlabs-proxy.example.com'
|
|
46
|
+
}),
|
|
47
|
+
|
|
48
|
+
// Sound effects provider (optional)
|
|
49
|
+
text2sound: Elevenlabs.ElevenSoundEffects({
|
|
50
|
+
proxyUrl: 'https://your-elevenlabs-proxy.example.com'
|
|
51
|
+
}),
|
|
52
|
+
|
|
53
|
+
// Optional configuration
|
|
54
|
+
debug: false,
|
|
55
|
+
dryRun: false
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Providers
|
|
62
|
+
|
|
63
|
+
The plugin comes with two pre-configured providers for ElevenLabs:
|
|
64
|
+
|
|
65
|
+
#### 1. ElevenMultilingualV2 (Text-to-Speech)
|
|
66
|
+
|
|
67
|
+
A versatile text-to-speech engine that supports multiple languages and voices:
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
text2speech: Elevenlabs.ElevenMultilingualV2({
|
|
71
|
+
proxyUrl: 'https://your-elevenlabs-proxy.example.com'
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Key features:
|
|
76
|
+
|
|
77
|
+
- Multiple voice options
|
|
78
|
+
- Multilingual support
|
|
79
|
+
- Adjustable speaking speed
|
|
80
|
+
- Natural-sounding speech
|
|
81
|
+
|
|
82
|
+
#### 2. ElevenSoundEffects (Text-to-Sound)
|
|
83
|
+
|
|
84
|
+
A sound effect generator that creates audio from text descriptions:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
text2sound: Elevenlabs.ElevenSoundEffects({
|
|
88
|
+
proxyUrl: 'https://your-elevenlabs-proxy.example.com'
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Key features:
|
|
93
|
+
|
|
94
|
+
- Generate sound effects from text descriptions
|
|
95
|
+
- Create ambient sounds, effects, and music
|
|
96
|
+
- Seamless integration with CreativeEditor SDK
|
|
97
|
+
- Automatic thumbnails and duration detection
|
|
98
|
+
|
|
99
|
+
### Configuration Options
|
|
100
|
+
|
|
101
|
+
The plugin accepts the following configuration options:
|
|
102
|
+
|
|
103
|
+
| Option | Type | Description | Default |
|
|
104
|
+
| ------------- | -------- | -------------------------------------------- | --------- |
|
|
105
|
+
| `text2speech` | Provider | Provider for text-to-speech generation | undefined |
|
|
106
|
+
| `text2sound` | Provider | Provider for sound effect generation | undefined |
|
|
107
|
+
| `debug` | boolean | Enable debug logging | false |
|
|
108
|
+
| `dryRun` | boolean | Simulate generation without API calls | false |
|
|
109
|
+
| `middleware` | Function | Custom middleware for the generation process | undefined |
|
|
110
|
+
|
|
111
|
+
### Using a Proxy
|
|
112
|
+
|
|
113
|
+
For security reasons, it's recommended to use a proxy server to handle API requests to ElevenLabs. The proxy URL is required when configuring providers:
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
text2speech: Elevenlabs.ElevenMultilingualV2({
|
|
117
|
+
proxyUrl: 'https://your-elevenlabs-proxy.example.com'
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
You'll need to implement a proxy server that forwards requests to ElevenLabs and handles authentication.
|
|
122
|
+
|
|
123
|
+
## API Reference
|
|
124
|
+
|
|
125
|
+
### Main Plugin
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
AudioGeneration(options: PluginConfiguration): EditorPlugin
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Creates and returns a plugin that can be added to CreativeEditor SDK.
|
|
132
|
+
|
|
133
|
+
### Plugin Configuration
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
interface PluginConfiguration {
|
|
137
|
+
// Provider for text-to-speech generation
|
|
138
|
+
text2speech?: AiAudioProvider;
|
|
139
|
+
|
|
140
|
+
// Provider for sound effect generation
|
|
141
|
+
text2sound?: AiAudioProvider;
|
|
142
|
+
|
|
143
|
+
// Enable debug logging
|
|
144
|
+
debug?: boolean;
|
|
145
|
+
|
|
146
|
+
// Skip actual API calls for testing
|
|
147
|
+
dryRun?: boolean;
|
|
148
|
+
|
|
149
|
+
// Extend the generation process
|
|
150
|
+
middleware?: GenerationMiddleware;
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### ElevenLabs Providers
|
|
155
|
+
|
|
156
|
+
#### ElevenMultilingualV2
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
Elevenlabs.ElevenMultilingualV2(config: {
|
|
160
|
+
proxyUrl: string;
|
|
161
|
+
debug?: boolean;
|
|
162
|
+
}): AiAudioProvider
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### ElevenSoundEffects
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
Elevenlabs.ElevenSoundEffects(config: {
|
|
169
|
+
proxyUrl: string;
|
|
170
|
+
debug?: boolean;
|
|
171
|
+
}): AiAudioProvider
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## UI Integration
|
|
175
|
+
|
|
176
|
+
The plugin automatically registers the following UI components:
|
|
177
|
+
|
|
178
|
+
1. **Speech Generation Panel**: A sidebar panel for text-to-speech generation
|
|
179
|
+
2. **Sound Generation Panel**: A sidebar panel for generating sound effects
|
|
180
|
+
3. **Voice Selection Panel**: A panel for choosing different voice options
|
|
181
|
+
4. **History Library**: Displays previously generated audio clips
|
|
182
|
+
|
|
183
|
+
### Panel IDs
|
|
184
|
+
|
|
185
|
+
- Main speech panel: `ly.img.ai/elevenlabs/monolingual/v1`
|
|
186
|
+
- Main sound panel: `ly.img.ai/elevenlabs/sound-generation`
|
|
187
|
+
- Voice selection panel: `ly.img.ai/audio-generation/speech/elevenlabs.voiceSelection`
|
|
188
|
+
|
|
189
|
+
### Asset History
|
|
190
|
+
|
|
191
|
+
Generated audio files are automatically stored in asset sources with the following IDs:
|
|
192
|
+
|
|
193
|
+
- Text-to-Speech: `elevenlabs/monolingual/v1.history`
|
|
194
|
+
- Sound Effects: `elevenlabs/sound-generation.history`
|
|
195
|
+
|
|
196
|
+
## Related Packages
|
|
197
|
+
|
|
198
|
+
- [@imgly/plugin-ai-generation-web](https://github.com/imgly/plugin-ai-generation-web) - Core utilities for AI generation
|
|
199
|
+
- [@imgly/plugin-ai-image-generation-web](https://github.com/imgly/plugin-ai-image-generation-web) - AI image generation
|
|
200
|
+
- [@imgly/plugin-ai-video-generation-web](https://github.com/imgly/plugin-ai-video-generation-web) - AI video generation
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
This plugin is part of the IMG.LY plugin ecosystem for CreativeEditor SDK. Please refer to the license terms in the package.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLUGIN_ID = "@imgly/plugin-ai-audio-generation-web";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Provider, type AudioOutput } from '@imgly/plugin-ai-generation-web';
|
|
2
|
+
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
3
|
+
type ElevenlabsInput = {
|
|
4
|
+
prompt: string;
|
|
5
|
+
voice_id: string;
|
|
6
|
+
speed: number;
|
|
7
|
+
};
|
|
8
|
+
type ProviderConfiguration = {
|
|
9
|
+
proxyUrl: string;
|
|
10
|
+
debug?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function ElevenMultilingualV2(config: ProviderConfiguration): (context: {
|
|
13
|
+
cesdk: CreativeEditorSDK;
|
|
14
|
+
}) => Promise<Provider<'audio', ElevenlabsInput, AudioOutput>>;
|
|
15
|
+
declare function getProvider(cesdk: CreativeEditorSDK, config: ProviderConfiguration): Provider<'audio', ElevenlabsInput, AudioOutput>;
|
|
16
|
+
export declare function generateSpeech(text: string, voiceId: string, options: {
|
|
17
|
+
stability?: number;
|
|
18
|
+
speed?: number;
|
|
19
|
+
similarityBoost?: number;
|
|
20
|
+
}, config: ProviderConfiguration, abortSignal?: AbortSignal): Promise<Blob>;
|
|
21
|
+
export default getProvider;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Provider, type AudioOutput } from '@imgly/plugin-ai-generation-web';
|
|
2
|
+
import CreativeEditorSDK from '@cesdk/cesdk-js';
|
|
3
|
+
type ElevenlabsInput = {
|
|
4
|
+
text: string;
|
|
5
|
+
duration_seconds: number;
|
|
6
|
+
};
|
|
7
|
+
type ProviderConfiguration = {
|
|
8
|
+
proxyUrl: string;
|
|
9
|
+
debug?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function ElevenSoundEffects(config: ProviderConfiguration): (context: {
|
|
12
|
+
cesdk: CreativeEditorSDK;
|
|
13
|
+
}) => Promise<Provider<'audio', ElevenlabsInput, AudioOutput>>;
|
|
14
|
+
declare function getProvider(cesdk: CreativeEditorSDK, config: ProviderConfiguration): Provider<'audio', ElevenlabsInput, AudioOutput>;
|
|
15
|
+
export declare function generateSound(text: string, duration: number | null, config: ProviderConfiguration, abortSignal?: AbortSignal): Promise<Blob>;
|
|
16
|
+
export default getProvider;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ElevenMultilingualV2 } from './ElevenMultilingualV2';
|
|
2
|
+
import { ElevenSoundEffects } from './ElevenSoundEffects';
|
|
3
|
+
declare const Elevenlabs: {
|
|
4
|
+
ElevenMultilingualV2: typeof ElevenMultilingualV2;
|
|
5
|
+
ElevenSoundEffects: typeof ElevenSoundEffects;
|
|
6
|
+
};
|
|
7
|
+
export default Elevenlabs;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var q={openapi:"3.0.0",info:{title:"Elevenlabs API",version:"1.0.0",description:"Elevenlabs API"},components:{schemas:{ElevenlabsInput:{title:"TextToSpeechInput",type:"object",properties:{prompt:{title:"Prompt",type:"string","x-imgly-builder":{component:"TextArea"}},voice_id:{title:"Voice",type:"string",description:"The voice ID to use for the speech synthesis.",default:"JBFqnCBsd6RMkjVDRZzb"},speed:{title:"Speed",type:"number",description:"The speed of the speech synthesis.",default:1,"x-imgly-step":.05,minimum:.7,maximum:1.2}},"x-elevenlabs-order-properties":["prompt","style","image_size"],required:["prompt","voice_id"]}}}};var C={version:"2.0.0",id:"ly.img.voices.eleventlabs",assets:[{id:"JBFqnCBsd6RMkjVDRZzb",label:{en:"George"},tags:{en:["British Accent","warm","middle aged","male","narration"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/JBFqnCBsd6RMkjVDRZzb/e6206d1a-0721-4787-aafb-06a6e705cac5.mp3",thumbUri:"https://ubique.img.ly/static/voices/george.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.42"}},{id:"FGY2WhTYpPnrIDTdsKH5",label:{en:"Laura"},tags:{en:["American Accent","upbeat","young","female","social media"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/FGY2WhTYpPnrIDTdsKH5/67341759-ad08-41a5-be6e-de12fe448618.mp3",thumbUri:"https://ubique.img.ly/static/voices/laura.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"2.04"}},{id:"IKne3meq5aSn9XLyUdCD",label:{en:"Charlie"},tags:{en:["Australian Accent","natural","middle aged","male","conversational"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/IKne3meq5aSn9XLyUdCD/102de6f2-22ed-43e0-a1f1-111fa75c5481.mp3",thumbUri:"https://ubique.img.ly/static/voices/charlie.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"2.53"}},{id:"9BWtsMINqrJLrRacOk9x",label:{en:"Aria"},tags:{en:["American Accent","expressive","middle-aged","female","social media"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3",thumbUri:"https://ubique.img.ly/static/voices/aria.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.71"}},{id:"EXAVITQu4vr4xnSDxMaL",label:{en:"Sarah"},tags:{en:["american Accent","soft","young","female","news"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/EXAVITQu4vr4xnSDxMaL/01a3e33c-6e99-4ee7-8543-ff2216a32186.mp3",thumbUri:"https://ubique.img.ly/static/voices/sarah2.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"2.53"}},{id:"SAz9YHcvj6GT2YYXdXww",label:{en:"River"},tags:{en:["American Accent","confident","middle-aged","non-binary","social media"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/SAz9YHcvj6GT2YYXdXww/e6c95f0b-2227-491a-b3d7-2249240decb7.mp3",thumbUri:"https://ubique.img.ly/static/voices/river.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.53"}},{id:"XrExE9yKIg1WjnnlVkGX",label:{en:"Matilda"},tags:{en:["American Accent","friendly","middle-aged","female","narration"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/XrExE9yKIg1WjnnlVkGX/b930e18d-6b4d-466e-bab2-0ae97c6d8535.mp3",thumbUri:"https://ubique.img.ly/static/voices/matilda.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"2.64"}},{id:"N2lVS1w4EtoT3dr4eOWO",label:{en:"Callum"},tags:{en:["Transatlantic Accent","intense","middle-aged","male","characters"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/N2lVS1w4EtoT3dr4eOWO/ac833bd8-ffda-4938-9ebc-b0f99ca25481.mp3",thumbUri:"https://ubique.img.ly/static/voices/callum.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"4.18"}},{id:"TX3LPaxmHKxFdv7VOQHJ",label:{en:"Liam"},tags:{en:["American Accent","articulate","young","male","narration"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/TX3LPaxmHKxFdv7VOQHJ/63148076-6363-42db-aea8-31424308b92c.mp3",thumbUri:"https://ubique.img.ly/static/voices/liam.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"4.13"}},{id:"XB0fDUnXU5powFXDhCwa",label:{en:"Charlotte"},tags:{en:["Swedish Accent","seductive","young","female","characters"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/XB0fDUnXU5powFXDhCwa/942356dc-f10d-4d89-bda5-4f8505ee038b.mp3",thumbUri:"https://ubique.img.ly/static/voices/charlotte.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"5.25"}},{id:"CwhRBWXzGAHq8TQ4Fs17",label:{en:"Roger"},tags:{en:["American Accent","confident","middle-aged","male","social media"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/CwhRBWXzGAHq8TQ4Fs17/58ee3ff5-f6f2-4628-93b8-e38eb31806b0.mp3",thumbUri:"https://ubique.img.ly/static/voices/roger.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.89"}},{id:"nPczCjzI2devNBz1zQrb",label:{en:"Brian"},tags:{en:["American Accent","deep","middle-aged","male","narration"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/nPczCjzI2devNBz1zQrb/2dd3e72c-4fd3-42f1-93ea-abc5d4e5aa1d.mp3",thumbUri:"https://ubique.img.ly/static/voices/brian.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"5.46"}},{id:"cgSgspJ2msm6clMCkdW9",label:{en:"Jessica"},tags:{en:["American Accent","expressive","young","female","conversational"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/cgSgspJ2msm6clMCkdW9/56a97bf8-b69b-448f-846c-c3a11683d45a.mp3",thumbUri:"https://ubique.img.ly/static/voices/jessica.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.89"}},{id:"Xb7hH8MSUJpSbSDYk0k2",label:{en:"Alice"},tags:{en:["British Accent","confident","middle-aged","female","news"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/Xb7hH8MSUJpSbSDYk0k2/d10f7534-11f6-41fe-a012-2de1e482d336.mp3",thumbUri:"https://ubique.img.ly/static/voices/alice.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.53"}},{id:"pFZP5JQG7iQjIQuC4Bku",label:{en:"Lily"},tags:{en:["British Accent","warm","middle-aged","female","narration"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/pFZP5JQG7iQjIQuC4Bku/89b68b35-b3dd-4348-a84a-a3c13a3c2b30.mp3",thumbUri:"https://ubique.img.ly/static/voices/lily.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.11"}},{id:"cjVigY5qzO86Huf0OWal",label:{en:"Eric"},tags:{en:["American Accent","friendly","middle-aged","male","conversational"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/cjVigY5qzO86Huf0OWal/d098fda0-6456-4030-b3d8-63aa048c9070.mp3",thumbUri:"https://ubique.img.ly/static/voices/eric.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"2.32"}},{id:"bIHbv24MWmeRgasZH58o",label:{en:"Will"},tags:{en:["American Accent","friendly","young","male","social media"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/bIHbv24MWmeRgasZH58o/8caf8f3d-ad29-4980-af41-53f20c72d7a4.mp3",thumbUri:"https://ubique.img.ly/static/voices/will.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"2.74"}},{id:"iP95p4xoKVk53GoZ742B",label:{en:"Chris"},tags:{en:["American Accent","casual","middle-aged","male","conversational"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/iP95p4xoKVk53GoZ742B/3f4bde72-cc48-40dd-829f-57fbf906f4d7.mp3",thumbUri:"https://ubique.img.ly/static/voices/chris.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"3.29"}},{id:"pqHfZKP75CvOlQylNhV4",label:{en:"Bill"},tags:{en:["American Accent","trustworthy","old","male","narration"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/pqHfZKP75CvOlQylNhV4/d782b3ff-84ba-4029-848c-acf01285524d.mp3",thumbUri:"https://ubique.img.ly/static/voices/bill.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"5.51"}},{id:"onwK4e9ZLuTAKqWW03F9",label:{en:"Daniel"},tags:{en:["British Accent","authoritative","middle-aged","male","news"]},meta:{uri:"https://storage.googleapis.com/eleven-public-prod/premade/voices/onwK4e9ZLuTAKqWW03F9/7eee0236-1a72-4b86-b303-5dcadc007ba9.mp3",thumbUri:"https://ubique.img.ly/static/voices/daniel.webp",blockType:"//ly.img.ubq/audio",mimeType:"audio/x-m4a",duration:"5.75"}}]};function E(e,i,t){return Math.min(Math.max(e,i),t)}async function x(e){return new Promise((i,t)=>{let a=new Audio;a.src=e,a.addEventListener("loadedmetadata",()=>{let n=a.duration;i(n)}),a.addEventListener("error",n=>{t(new Error(`Failed to load audio metadata: ${n.message}`))})})}var K={width:256,height:256,backgroundColor:"transparent",waveformColor:"black",pixelsPerSecond:100};async function T(e,i={}){let{width:t,height:a,backgroundColor:n,waveformColor:s,pixelsPerSecond:u}={...K,...i},o=new AudioContext,c=await e.arrayBuffer(),r=await o.decodeAudioData(c),l=r.duration,d=Math.max(t,Math.ceil(l*u)),y=r.sampleRate*l/d,h=document.createElement("canvas");h.width=t,h.height=a;let m=h.getContext("2d");m.fillStyle=n,m.fillRect(0,0,t,a);let B=r.getChannelData(0),g=a/2,D=r.length;m.strokeStyle=s,m.beginPath(),m.moveTo(0,g);for(let p=0;p<t;p++){let v=1,b=-1;for(let w=0;w<y;w++){let P=Math.floor(p*y+w);if(P<D){let f=B[P];f<v&&(v=f),f>b&&(b=f)}}let O=g-v*g,L=g-b*g;m.lineTo(p,L),m.lineTo(p,O)}return m.stroke(),new Promise((p,v)=>{h.toBlob(b=>{b?p(b):v(new Error("Canvas to Blob conversion failed"))})})}function A(e,i,t={}){let{ellipsis:a="...",preserveSentences:n=!1,minLength:s=0}=t;if(!e||e.length<=s||e.length<=i)return e;let u=i-a.length;if(n){let r=/[.!?](?:\s|$)/g,l,d=0;for(;(l=r.exec(e))!==null&&!(l.index>u);)d=l.index+1;if(d>0)return e.substring(0,d)+a}let o=e.substring(0,u),c=o.lastIndexOf(" ");return c>0&&(o=o.substring(0,c)),o+a}function I(e){return async({cesdk:i})=>F(i,e)}function F(e,i){let t="ly.img.ai/audio-generation/speech/elevenlabs",a=`${t}.voiceSelection`,n=X(e),s="elevenlabs/monolingual/v1";return e.setTranslations({en:{[`panel.${s}`]:"AI Voice",[`panel.${a}`]:"Select a Voice"}}),{id:s,kind:"audio",initialize:async()=>{e.ui.addAssetLibraryEntry({id:n,sourceIds:[n],gridColumns:3}),e.ui.registerPanel(a,({builder:o,payload:c})=>{o.Library(`${t}.voiceSelection.library`,{searchable:!0,entries:[n],onSelect:async r=>{let{id:l,label:d}=r;c?.onSelect(l,d??l,r.meta?.thumbUri),e.ui.closePanel(a)}})})},input:{panel:{type:"schema",document:q,inputReference:"#/components/schemas/ElevenlabsInput",useFlow:"generation-only",renderCustomProperty:{voice_id:o=>{let c=o.experimental.global("voice",{voiceId:"JBFqnCBsd6RMkjVDRZzb",name:"George",thumbnail:"https://ubique.img.ly/static/voices/george.webp"});return o.builder.Button(`${t}.openVoiceSelection`,{inputLabel:"Voice",icon:"@imgly/Appearance",trailingIcon:"@imgly/ChevronRight",labelAlignment:"left",label:c.value.name,onClick:()=>{e.ui.openPanel(a,{payload:{id:c.value.voiceId,onSelect:(r,l,d)=>{c.setValue({voiceId:r,name:l,thumbnail:d})}}})}}),()=>({id:"voice_id",type:"string",value:c.value.voiceId})}},getBlockInput:async o=>({audio:{label:A(o.prompt,25)}})}},output:{abortable:!0,history:"@imgly/indexedDB",generate:async(o,{abortSignal:c})=>{let r=await j(o.prompt,o.voice_id,{speed:parseFloat(o.speed.toFixed(10))},i,c),l=URL.createObjectURL(r),[d,S]=await Promise.all([T(r,{width:512,height:128}),x(l)]),y=URL.createObjectURL(d);return{kind:"audio",url:l,duration:S,thumbnailUrl:y}}},config:i}}async function j(e,i,t,a,n){let s=`${a.proxyUrl}/v1/text-to-speech/${i}`,u=await fetch(s,{signal:n,method:"POST",headers:{Accept:"audio/mpeg","Content-Type":"application/json"},body:JSON.stringify({text:e,model_id:"eleven_multilingual_v2",voice_settings:{speed:E(t?.speed||1,.7,1.2),stability:t?.stability||.5,similarity_boost:t?.similarityBoost||.5}})});if(!u.ok){let o=await u.text();throw new Error(`API error: ${u.status} - ${o}`)}return u.blob()}function X(e){let{id:i,assets:t}=C;return e.engine.asset.addLocalSource(i),t.map(async a=>{e.engine.asset.addAssetToSource(i,a)}),i}var k={openapi:"3.0.0",info:{title:"Elevenlabs Sound Effects API",version:"1.0.0",description:"Elevenlabs Sound Effects API"},components:{schemas:{TextToSoundInput:{title:"TextToSoundInput",type:"object",properties:{text:{title:"Prompt",type:"string","x-imgly-builder":{component:"TextArea"}},duration_seconds:{title:"Duration (sec.)",type:"number",minimum:.6,maximum:22,default:2}},"x-elevenlabs-order-properties":["text"],required:["text"]}}}};function U(e){return async({cesdk:i})=>W(i,e)}function W(e,i){let t="elevenlabs/sound-generation";return e.setTranslations({en:{[`panel.${t}`]:"Generate Sound"}}),{id:t,kind:"audio",initialize:async()=>{},input:{panel:{type:"schema",document:k,inputReference:"#/components/schemas/TextToSoundInput",useFlow:"generation-only",getBlockInput:async n=>({audio:{label:A(n.text,25)}})}},output:{abortable:!0,history:"@imgly/indexedDB",generate:async(n,{abortSignal:s})=>{let u=await z(n.text,n.duration_seconds,i,s),o=URL.createObjectURL(u),[c,r]=await Promise.all([T(u,{width:512,height:128}),x(o)]),l=URL.createObjectURL(c);return{kind:"audio",url:o,duration:r,thumbnailUrl:l}}},config:i}}async function z(e,i,t,a){let n=`${t.proxyUrl}/v1/sound-generation`,s=await fetch(n,{signal:a,method:"POST",headers:{Accept:"audio/mpeg","Content-Type":"application/json"},body:JSON.stringify({text:e,duration_seconds:i})});if(!s.ok){let u=await s.text();throw new Error(`API error: ${s.status} - ${u}`)}return s.blob()}var H={ElevenMultilingualV2:I,ElevenSoundEffects:U},ne=H;export{ne as default};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/elevenlabs/ElevenMultilingualV2.json", "../../src/elevenlabs/ElevenMultilingualV2.voices.json", "../../src/elevenlabs/utils.ts", "../../src/elevenlabs/ElevenMultilingualV2.ts", "../../src/elevenlabs/ElevenSoundEffects.json", "../../src/elevenlabs/ElevenSoundEffects.ts", "../../src/elevenlabs/index.ts"],
|
|
4
|
+
"sourcesContent": ["{\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"Elevenlabs API\",\n \"version\": \"1.0.0\",\n \"description\": \"Elevenlabs API\"\n },\n \"components\": {\n \"schemas\": {\n \"ElevenlabsInput\": {\n \"title\": \"TextToSpeechInput\",\n \"type\": \"object\",\n \"properties\": {\n \"prompt\": {\n \"title\": \"Prompt\",\n \"type\": \"string\",\n \"x-imgly-builder\": {\n \"component\": \"TextArea\"\n }\n },\n \"voice_id\": {\n \"title\": \"Voice\",\n \"type\": \"string\",\n \"description\": \"The voice ID to use for the speech synthesis.\",\n \"default\": \"JBFqnCBsd6RMkjVDRZzb\"\n },\n \"speed\": {\n \"title\": \"Speed\",\n \"type\": \"number\",\n \"description\": \"The speed of the speech synthesis.\",\n \"default\": 1,\n \"x-imgly-step\": 0.05,\n \"minimum\": 0.7,\n \"maximum\": 1.2\n }\n },\n \"x-elevenlabs-order-properties\": [\"prompt\", \"style\", \"image_size\"],\n \"required\": [\"prompt\", \"voice_id\"]\n }\n }\n }\n}\n", "{\n \"version\": \"2.0.0\",\n \"id\": \"ly.img.voices.eleventlabs\",\n \"assets\": [\n {\n \"id\": \"JBFqnCBsd6RMkjVDRZzb\",\n \"label\": {\n \"en\": \"George\"\n },\n \"tags\": {\n \"en\": [\"British Accent\", \"warm\", \"middle aged\", \"male\", \"narration\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/JBFqnCBsd6RMkjVDRZzb/e6206d1a-0721-4787-aafb-06a6e705cac5.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/george.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.42\"\n }\n },\n {\n \"id\": \"FGY2WhTYpPnrIDTdsKH5\",\n \"label\": {\n \"en\": \"Laura\"\n },\n \"tags\": {\n \"en\": [\"American Accent\", \"upbeat\", \"young\", \"female\", \"social media\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/FGY2WhTYpPnrIDTdsKH5/67341759-ad08-41a5-be6e-de12fe448618.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/laura.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"2.04\"\n }\n },\n {\n \"id\": \"IKne3meq5aSn9XLyUdCD\",\n \"label\": {\n \"en\": \"Charlie\"\n },\n \"tags\": {\n \"en\": [\n \"Australian Accent\",\n \"natural\",\n \"middle aged\",\n \"male\",\n \"conversational\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/IKne3meq5aSn9XLyUdCD/102de6f2-22ed-43e0-a1f1-111fa75c5481.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/charlie.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"2.53\"\n }\n },\n {\n \"id\": \"9BWtsMINqrJLrRacOk9x\",\n \"label\": {\n \"en\": \"Aria\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"expressive\",\n \"middle-aged\",\n \"female\",\n \"social media\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/aria.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.71\"\n }\n },\n {\n \"id\": \"EXAVITQu4vr4xnSDxMaL\",\n \"label\": {\n \"en\": \"Sarah\"\n },\n \"tags\": {\n \"en\": [\"american Accent\", \"soft\", \"young\", \"female\", \"news\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/EXAVITQu4vr4xnSDxMaL/01a3e33c-6e99-4ee7-8543-ff2216a32186.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/sarah2.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"2.53\"\n }\n },\n {\n \"id\": \"SAz9YHcvj6GT2YYXdXww\",\n \"label\": {\n \"en\": \"River\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"confident\",\n \"middle-aged\",\n \"non-binary\",\n \"social media\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/SAz9YHcvj6GT2YYXdXww/e6c95f0b-2227-491a-b3d7-2249240decb7.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/river.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.53\"\n }\n },\n {\n \"id\": \"XrExE9yKIg1WjnnlVkGX\",\n \"label\": {\n \"en\": \"Matilda\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"friendly\",\n \"middle-aged\",\n \"female\",\n \"narration\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/XrExE9yKIg1WjnnlVkGX/b930e18d-6b4d-466e-bab2-0ae97c6d8535.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/matilda.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"2.64\"\n }\n },\n {\n \"id\": \"N2lVS1w4EtoT3dr4eOWO\",\n \"label\": {\n \"en\": \"Callum\"\n },\n \"tags\": {\n \"en\": [\n \"Transatlantic Accent\",\n \"intense\",\n \"middle-aged\",\n \"male\",\n \"characters\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/N2lVS1w4EtoT3dr4eOWO/ac833bd8-ffda-4938-9ebc-b0f99ca25481.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/callum.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"4.18\"\n }\n },\n {\n \"id\": \"TX3LPaxmHKxFdv7VOQHJ\",\n \"label\": {\n \"en\": \"Liam\"\n },\n \"tags\": {\n \"en\": [\"American Accent\", \"articulate\", \"young\", \"male\", \"narration\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/TX3LPaxmHKxFdv7VOQHJ/63148076-6363-42db-aea8-31424308b92c.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/liam.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"4.13\"\n }\n },\n {\n \"id\": \"XB0fDUnXU5powFXDhCwa\",\n \"label\": {\n \"en\": \"Charlotte\"\n },\n \"tags\": {\n \"en\": [\"Swedish Accent\", \"seductive\", \"young\", \"female\", \"characters\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/XB0fDUnXU5powFXDhCwa/942356dc-f10d-4d89-bda5-4f8505ee038b.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/charlotte.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"5.25\"\n }\n },\n {\n \"id\": \"CwhRBWXzGAHq8TQ4Fs17\",\n \"label\": {\n \"en\": \"Roger\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"confident\",\n \"middle-aged\",\n \"male\",\n \"social media\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/CwhRBWXzGAHq8TQ4Fs17/58ee3ff5-f6f2-4628-93b8-e38eb31806b0.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/roger.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.89\"\n }\n },\n {\n \"id\": \"nPczCjzI2devNBz1zQrb\",\n \"label\": {\n \"en\": \"Brian\"\n },\n \"tags\": {\n \"en\": [\"American Accent\", \"deep\", \"middle-aged\", \"male\", \"narration\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/nPczCjzI2devNBz1zQrb/2dd3e72c-4fd3-42f1-93ea-abc5d4e5aa1d.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/brian.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"5.46\"\n }\n },\n {\n \"id\": \"cgSgspJ2msm6clMCkdW9\",\n \"label\": {\n \"en\": \"Jessica\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"expressive\",\n \"young\",\n \"female\",\n \"conversational\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/cgSgspJ2msm6clMCkdW9/56a97bf8-b69b-448f-846c-c3a11683d45a.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/jessica.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.89\"\n }\n },\n {\n \"id\": \"Xb7hH8MSUJpSbSDYk0k2\",\n \"label\": {\n \"en\": \"Alice\"\n },\n \"tags\": {\n \"en\": [\"British Accent\", \"confident\", \"middle-aged\", \"female\", \"news\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/Xb7hH8MSUJpSbSDYk0k2/d10f7534-11f6-41fe-a012-2de1e482d336.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/alice.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.53\"\n }\n },\n {\n \"id\": \"pFZP5JQG7iQjIQuC4Bku\",\n \"label\": {\n \"en\": \"Lily\"\n },\n \"tags\": {\n \"en\": [\"British Accent\", \"warm\", \"middle-aged\", \"female\", \"narration\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/pFZP5JQG7iQjIQuC4Bku/89b68b35-b3dd-4348-a84a-a3c13a3c2b30.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/lily.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.11\"\n }\n },\n {\n \"id\": \"cjVigY5qzO86Huf0OWal\",\n \"label\": {\n \"en\": \"Eric\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"friendly\",\n \"middle-aged\",\n \"male\",\n \"conversational\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/cjVigY5qzO86Huf0OWal/d098fda0-6456-4030-b3d8-63aa048c9070.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/eric.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"2.32\"\n }\n },\n {\n \"id\": \"bIHbv24MWmeRgasZH58o\",\n \"label\": {\n \"en\": \"Will\"\n },\n \"tags\": {\n \"en\": [\"American Accent\", \"friendly\", \"young\", \"male\", \"social media\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/bIHbv24MWmeRgasZH58o/8caf8f3d-ad29-4980-af41-53f20c72d7a4.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/will.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"2.74\"\n }\n },\n {\n \"id\": \"iP95p4xoKVk53GoZ742B\",\n \"label\": {\n \"en\": \"Chris\"\n },\n \"tags\": {\n \"en\": [\n \"American Accent\",\n \"casual\",\n \"middle-aged\",\n \"male\",\n \"conversational\"\n ]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/iP95p4xoKVk53GoZ742B/3f4bde72-cc48-40dd-829f-57fbf906f4d7.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/chris.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"3.29\"\n }\n },\n {\n \"id\": \"pqHfZKP75CvOlQylNhV4\",\n \"label\": {\n \"en\": \"Bill\"\n },\n \"tags\": {\n \"en\": [\"American Accent\", \"trustworthy\", \"old\", \"male\", \"narration\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/pqHfZKP75CvOlQylNhV4/d782b3ff-84ba-4029-848c-acf01285524d.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/bill.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"5.51\"\n }\n },\n {\n \"id\": \"onwK4e9ZLuTAKqWW03F9\",\n \"label\": {\n \"en\": \"Daniel\"\n },\n \"tags\": {\n \"en\": [\"British Accent\", \"authoritative\", \"middle-aged\", \"male\", \"news\"]\n },\n \"meta\": {\n \"uri\": \"https://storage.googleapis.com/eleven-public-prod/premade/voices/onwK4e9ZLuTAKqWW03F9/7eee0236-1a72-4b86-b303-5dcadc007ba9.mp3\",\n \"thumbUri\": \"https://ubique.img.ly/static/voices/daniel.webp\",\n \"blockType\": \"//ly.img.ubq/audio\",\n \"mimeType\": \"audio/x-m4a\",\n \"duration\": \"5.75\"\n }\n }\n ]\n}\n", "/**\n * Clamps a value between a minimum and maximum value\n * @param {number} value - The value to clamp\n * @param {number} min - The minimum allowed value\n * @param {number} max - The maximum allowed value\n * @returns {number} The clamped value\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n/**\n * Returns the duration of an audio blob in seconds\n * @param audioBlob - The audio blob to get the duration from\n * @returns A promise that resolves to the duration in seconds\n */\nexport async function getAudioDuration(audioUrl: string): Promise<number> {\n return new Promise((resolve, reject) => {\n // Create an audio element\n const audio = new Audio();\n\n // Set the audio source to the blob URL\n audio.src = audioUrl;\n\n // Listen for the metadata to load\n audio.addEventListener('loadedmetadata', () => {\n // Get the duration\n const duration = audio.duration;\n\n // Revoke the URL to free memory\n\n // Resolve with the duration\n resolve(duration);\n });\n\n // Handle errors\n audio.addEventListener('error', (error) => {\n // Revoke the URL to free memory\n\n // Reject with the error\n reject(new Error(`Failed to load audio metadata: ${error.message}`));\n });\n });\n}\n\nconst DEFAULT_OPTIONS = {\n width: 256,\n height: 256,\n backgroundColor: 'transparent',\n waveformColor: 'black',\n pixelsPerSecond: 100\n};\n\nexport async function createThumbnailFromAudio(\n audio: Blob,\n options: Partial<typeof DEFAULT_OPTIONS> = {}\n): Promise<Blob> {\n const { width, height, backgroundColor, waveformColor, pixelsPerSecond } = {\n ...DEFAULT_OPTIONS,\n ...options\n };\n\n // Create an AudioContext to decode the audio\n const audioContext = new AudioContext();\n const data = await audio.arrayBuffer();\n const audioBuffer = await audioContext.decodeAudioData(data);\n\n // Calculate effective width of the waveform\n const totalDuration = audioBuffer.duration;\n const effectiveWidth = Math.max(\n width,\n Math.ceil(totalDuration * pixelsPerSecond)\n );\n const sampleRate = audioBuffer.sampleRate;\n const samplesPerPixel = (sampleRate * totalDuration) / effectiveWidth;\n\n // Create a canvas element\n const canvas = document.createElement('canvas');\n canvas.width = width; // Use the provided width for the canvas\n canvas.height = height;\n const context = canvas.getContext('2d')!;\n\n // Draw background\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, width, height);\n\n // Draw the waveform\n const dataArray = audioBuffer.getChannelData(0); // Use the first channel\n const amp = height / 2;\n const numSamples = audioBuffer.length;\n\n context.strokeStyle = waveformColor;\n context.beginPath();\n context.moveTo(0, amp);\n\n for (let i = 0; i < width; i++) {\n let min = 1.0;\n let max = -1.0;\n for (let j = 0; j < samplesPerPixel; j++) {\n const index = Math.floor(i * samplesPerPixel + j);\n if (index < numSamples) {\n const datum = dataArray[index];\n if (datum < min) min = datum;\n if (datum > max) max = datum;\n }\n }\n const yLow = amp - min * amp;\n const yHigh = amp - max * amp;\n context.lineTo(i, yHigh);\n context.lineTo(i, yLow);\n }\n\n context.stroke();\n\n // Convert canvas to a blob\n return new Promise((resolve, reject) => {\n canvas.toBlob((blob) => {\n if (blob) {\n resolve(blob);\n } else {\n reject(new Error('Canvas to Blob conversion failed'));\n }\n });\n });\n}\n\n/**\n * Smartly truncates text to a specified length while preserving word boundaries\n * and adding an ellipsis to indicate truncation.\n *\n * @param {string} text - The text to truncate\n * @param {number} maxLength - Maximum length of the truncated text (including ellipsis)\n * @param {Object} options - Optional configuration\n * @param {string} options.ellipsis - The ellipsis string (default: '...')\n * @param {boolean} options.preserveSentences - Try to truncate at sentence boundaries (default: false)\n * @param {number} options.minLength - Minimum length before truncation (default: 0)\n * @return {string} The truncated text with ellipsis if truncated\n */\nexport function truncate(\n text: string,\n maxLength: number,\n options: {\n ellipsis?: string;\n preserveSentences?: boolean;\n minLength?: number;\n } = {}\n): string {\n // Default options\n const {\n ellipsis = '...',\n preserveSentences = false,\n minLength = 0\n } = options;\n\n // Return original text if it's shorter than minLength or maxLength\n if (!text || text.length <= minLength || text.length <= maxLength) {\n return text;\n }\n\n // Calculate maximum content length (accounting for ellipsis)\n const maxContentLength = maxLength - ellipsis.length;\n\n // If preserving sentences is enabled, try to find a sentence boundary\n if (preserveSentences) {\n // Common sentence ending patterns\n const sentenceEndings = /[.!?](?:\\s|$)/g;\n let match;\n let lastValidEnd = 0;\n\n // Find the last sentence ending within maxContentLength\n // eslint-disable-next-line no-cond-assign\n while ((match = sentenceEndings.exec(text)) !== null) {\n if (match.index > maxContentLength) break;\n lastValidEnd = match.index + 1; // Include the punctuation\n }\n\n // If we found a sentence ending, use it\n if (lastValidEnd > 0) {\n return text.substring(0, lastValidEnd) + ellipsis;\n }\n }\n\n // Otherwise, truncate at word boundary\n let truncatedText = text.substring(0, maxContentLength);\n\n // Find the last space to avoid cutting words in half\n const lastSpace = truncatedText.lastIndexOf(' ');\n\n if (lastSpace > 0) {\n truncatedText = truncatedText.substring(0, lastSpace);\n }\n\n return truncatedText + ellipsis;\n}\n", "import {\n type Provider,\n type AudioOutput\n} from '@imgly/plugin-ai-generation-web';\nimport CreativeEditorSDK from '@cesdk/cesdk-js';\nimport schema from './ElevenMultilingualV2.json';\nimport voices from './ElevenMultilingualV2.voices.json';\nimport {\n clamp,\n getAudioDuration,\n createThumbnailFromAudio,\n truncate\n} from './utils';\n\ntype ElevenlabsInput = {\n prompt: string;\n voice_id: string;\n speed: number;\n};\n\ntype ProviderConfiguration = {\n proxyUrl: string;\n debug?: boolean;\n};\n\nexport function ElevenMultilingualV2(\n config: ProviderConfiguration\n): (context: {\n cesdk: CreativeEditorSDK;\n}) => Promise<Provider<'audio', ElevenlabsInput, AudioOutput>> {\n return async ({ cesdk }: { cesdk: CreativeEditorSDK }) => {\n return getProvider(cesdk, config);\n };\n}\n\nfunction getProvider(\n cesdk: CreativeEditorSDK,\n config: ProviderConfiguration\n): Provider<'audio', ElevenlabsInput, AudioOutput> {\n const prefix = 'ly.img.ai/audio-generation/speech/elevenlabs';\n const voiceSelectionPanelId = `${prefix}.voiceSelection`;\n const voiceAssetSourceId = createVoicesAssetSource(cesdk);\n const modelKey = 'elevenlabs/monolingual/v1';\n\n cesdk.setTranslations({\n en: {\n [`panel.${modelKey}`]: 'AI Voice',\n [`panel.${voiceSelectionPanelId}`]: 'Select a Voice'\n }\n });\n\n const provider: Provider<'audio', ElevenlabsInput, AudioOutput> = {\n id: modelKey,\n kind: 'audio',\n initialize: async () => {\n cesdk.ui.addAssetLibraryEntry({\n id: voiceAssetSourceId,\n sourceIds: [voiceAssetSourceId],\n gridColumns: 3\n });\n\n cesdk.ui.registerPanel<{\n id: string;\n onSelect: (voiceId: string, name: string, thumbnail?: string) => void;\n }>(voiceSelectionPanelId, ({ builder, payload }) => {\n builder.Library(`${prefix}.voiceSelection.library`, {\n searchable: true,\n entries: [voiceAssetSourceId],\n onSelect: async (entry) => {\n const { id, label } = entry;\n payload?.onSelect(\n id,\n label ?? id,\n entry.meta?.thumbUri as string | undefined\n );\n cesdk.ui.closePanel(voiceSelectionPanelId);\n }\n });\n });\n },\n input: {\n panel: {\n type: 'schema',\n // @ts-ignore\n document: schema,\n inputReference: '#/components/schemas/ElevenlabsInput',\n useFlow: 'generation-only',\n\n renderCustomProperty: {\n voice_id: (context) => {\n const voiceState = context.experimental.global<{\n voiceId: string;\n name: string;\n thumbnail?: string;\n }>('voice', {\n voiceId: 'JBFqnCBsd6RMkjVDRZzb',\n name: 'George',\n thumbnail: 'https://ubique.img.ly/static/voices/george.webp'\n });\n\n context.builder.Button(`${prefix}.openVoiceSelection`, {\n inputLabel: 'Voice',\n icon: '@imgly/Appearance',\n trailingIcon: '@imgly/ChevronRight',\n labelAlignment: 'left',\n label: voiceState.value.name,\n onClick: () => {\n cesdk.ui.openPanel(voiceSelectionPanelId, {\n payload: {\n id: voiceState.value.voiceId,\n onSelect: (\n voiceId: string,\n name: string,\n thumbnail?: string\n ) => {\n voiceState.setValue({ voiceId, name, thumbnail });\n }\n }\n });\n }\n });\n\n return () => {\n return {\n id: 'voice_id',\n type: 'string',\n value: voiceState.value.voiceId\n };\n };\n }\n },\n\n getBlockInput: async (input) => {\n // Thumbnail and duration needs to be determined from the\n // audio output.\n return {\n audio: {\n label: truncate(input.prompt, 25)\n }\n };\n }\n }\n },\n output: {\n abortable: true,\n history: '@imgly/indexedDB',\n generate: async (\n input: ElevenlabsInput,\n { abortSignal }: { abortSignal?: AbortSignal }\n ) => {\n const audioBlob = await generateSpeech(\n input.prompt,\n input.voice_id,\n {\n speed: parseFloat(input.speed.toFixed(10))\n },\n config,\n abortSignal\n );\n\n // TODO: Use upload!\n const audioUrl = URL.createObjectURL(audioBlob);\n\n const [thumbnailBlob, audioDuration] = await Promise.all([\n createThumbnailFromAudio(audioBlob, { width: 512, height: 128 }),\n getAudioDuration(audioUrl)\n ]);\n\n const thumbnailUrl = URL.createObjectURL(thumbnailBlob);\n\n return {\n kind: 'audio',\n url: audioUrl,\n duration: audioDuration,\n thumbnailUrl\n };\n }\n },\n config\n };\n\n return provider;\n}\n\n// Function to generate speech using ElevenLabs API\nexport async function generateSpeech(\n text: string,\n voiceId: string,\n options: {\n stability?: number;\n speed?: number;\n similarityBoost?: number;\n },\n config: ProviderConfiguration,\n abortSignal?: AbortSignal\n) {\n const url = `${config.proxyUrl}/v1/text-to-speech/${voiceId}`;\n\n const response = await fetch(url, {\n signal: abortSignal,\n method: 'POST',\n headers: {\n Accept: 'audio/mpeg',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n text,\n model_id: 'eleven_multilingual_v2',\n voice_settings: {\n speed: clamp(options?.speed || 1, 0.7, 1.2),\n stability: options?.stability || 0.5,\n similarity_boost: options?.similarityBoost || 0.5\n }\n })\n });\n\n if (!response.ok) {\n const errorData = await response.text();\n throw new Error(`API error: ${response.status} - ${errorData}`);\n }\n\n return response.blob();\n}\n\nfunction createVoicesAssetSource(cesdk: CreativeEditorSDK): string {\n const { id, assets } = voices;\n cesdk.engine.asset.addLocalSource(id);\n assets.map(async (asset) => {\n cesdk.engine.asset.addAssetToSource(id, asset);\n });\n return id;\n}\nexport default getProvider;\n", "{\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"Elevenlabs Sound Effects API\",\n \"version\": \"1.0.0\",\n \"description\": \"Elevenlabs Sound Effects API\"\n },\n \"components\": {\n \"schemas\": {\n \"TextToSoundInput\": {\n \"title\": \"TextToSoundInput\",\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"title\": \"Prompt\",\n \"type\": \"string\",\n \"x-imgly-builder\": {\n \"component\": \"TextArea\"\n }\n },\n \"duration_seconds\": {\n \"title\": \"Duration (sec.)\",\n \"type\": \"number\",\n \"minimum\": 0.6,\n \"maximum\": 22,\n \"default\": 2\n }\n },\n \"x-elevenlabs-order-properties\": [\"text\"],\n \"required\": [\"text\"]\n }\n }\n }\n}\n", "import {\n type Provider,\n type AudioOutput\n} from '@imgly/plugin-ai-generation-web';\nimport CreativeEditorSDK from '@cesdk/cesdk-js';\nimport schema from './ElevenSoundEffects.json';\nimport { getAudioDuration, createThumbnailFromAudio, truncate } from './utils';\n\ntype ElevenlabsInput = {\n text: string;\n duration_seconds: number;\n};\n\ntype ProviderConfiguration = {\n proxyUrl: string;\n debug?: boolean;\n};\n\nexport function ElevenSoundEffects(\n config: ProviderConfiguration\n): (context: {\n cesdk: CreativeEditorSDK;\n}) => Promise<Provider<'audio', ElevenlabsInput, AudioOutput>> {\n return async ({ cesdk }: { cesdk: CreativeEditorSDK }) => {\n return getProvider(cesdk, config);\n };\n}\n\nfunction getProvider(\n cesdk: CreativeEditorSDK,\n config: ProviderConfiguration\n): Provider<'audio', ElevenlabsInput, AudioOutput> {\n const modelKey = 'elevenlabs/sound-generation';\n\n cesdk.setTranslations({\n en: {\n [`panel.${modelKey}`]: 'Generate Sound'\n }\n });\n\n const provider: Provider<'audio', ElevenlabsInput, AudioOutput> = {\n id: modelKey,\n kind: 'audio',\n initialize: async () => {},\n input: {\n panel: {\n type: 'schema',\n // @ts-ignore\n document: schema,\n inputReference: '#/components/schemas/TextToSoundInput',\n useFlow: 'generation-only',\n\n getBlockInput: async (input) => {\n // Thumbnail and duration needs to be determined from the\n // audio output.\n return {\n audio: {\n label: truncate(input.text, 25)\n }\n };\n }\n }\n },\n output: {\n abortable: true,\n history: '@imgly/indexedDB',\n generate: async (\n input: ElevenlabsInput,\n { abortSignal }: { abortSignal?: AbortSignal }\n ) => {\n const audioBlob = await generateSound(\n input.text,\n input.duration_seconds,\n config,\n abortSignal\n );\n\n // TODO: Use upload!\n const audioUrl = URL.createObjectURL(audioBlob);\n\n const [thumbnailBlob, audioDuration] = await Promise.all([\n createThumbnailFromAudio(audioBlob, { width: 512, height: 128 }),\n getAudioDuration(audioUrl)\n ]);\n\n const thumbnailUrl = URL.createObjectURL(thumbnailBlob);\n\n return {\n kind: 'audio',\n url: audioUrl,\n duration: audioDuration,\n thumbnailUrl\n };\n }\n },\n config\n };\n\n return provider;\n}\n\n// Function to generate speech using ElevenLabs API\nexport async function generateSound(\n text: string,\n duration: number | null,\n config: ProviderConfiguration,\n abortSignal?: AbortSignal\n) {\n const url = `${config.proxyUrl}/v1/sound-generation`;\n\n const response = await fetch(url, {\n signal: abortSignal,\n method: 'POST',\n headers: {\n Accept: 'audio/mpeg',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n text,\n duration_seconds: duration\n })\n });\n\n if (!response.ok) {\n const errorData = await response.text();\n throw new Error(`API error: ${response.status} - ${errorData}`);\n }\n\n return response.blob();\n}\n\nexport default getProvider;\n", "import { ElevenMultilingualV2 } from './ElevenMultilingualV2';\nimport { ElevenSoundEffects } from './ElevenSoundEffects';\n\nconst Elevenlabs = {\n ElevenMultilingualV2,\n ElevenSoundEffects\n};\n\nexport default Elevenlabs;\n"],
|
|
5
|
+
"mappings": "AAAA,IAAAA,EAAA,CACE,QAAW,QACX,KAAQ,CACN,MAAS,iBACT,QAAW,QACX,YAAe,gBACjB,EACA,WAAc,CACZ,QAAW,CACT,gBAAmB,CACjB,MAAS,oBACT,KAAQ,SACR,WAAc,CACZ,OAAU,CACR,MAAS,SACT,KAAQ,SACR,kBAAmB,CACjB,UAAa,UACf,CACF,EACA,SAAY,CACV,MAAS,QACT,KAAQ,SACR,YAAe,gDACf,QAAW,sBAC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nB,KAAAS,EACA,iBAAkBC,CACpB,CAAC,CACH,CAAC,EAED,GAAI,CAACE,EAAS,GAAI,CAChB,IAAMC,EAAY,MAAMD,EAAS,KAAK,EACtC,MAAM,IAAI,MAAM,cAAcA,EAAS,MAAM,MAAMC,CAAS,EAAE,CAChE,CAEA,OAAOD,EAAS,KAAK,CACvB,CC9HA,IAAME,EAAa,CACjB,qBAAAC,EACA,mBAAAC,CACF,EAEOC,GAAQH",
|
|
6
|
+
"names": ["ElevenMultilingualV2_default", "ElevenMultilingualV2_voices_default", "clamp", "value", "min", "max", "getAudioDuration", "audioUrl", "resolve", "reject", "audio", "duration", "error", "DEFAULT_OPTIONS", "createThumbnailFromAudio", "options", "width", "height", "backgroundColor", "waveformColor", "pixelsPerSecond", "audioContext", "data", "audioBuffer", "totalDuration", "effectiveWidth", "samplesPerPixel", "canvas", "context", "dataArray", "amp", "numSamples", "i", "j", "index", "datum", "yLow", "yHigh", "blob", "truncate", "text", "maxLength", "ellipsis", "preserveSentences", "minLength", "maxContentLength", "sentenceEndings", "match", "lastValidEnd", "truncatedText", "lastSpace", "ElevenMultilingualV2", "config", "cesdk", "getProvider", "prefix", "voiceSelectionPanelId", "voiceAssetSourceId", "createVoicesAssetSource", "modelKey", "builder", "payload", "entry", "id", "label", "ElevenMultilingualV2_default", "context", "voiceState", "voiceId", "name", "thumbnail", "input", "truncate", "abortSignal", "audioBlob", "generateSpeech", "audioUrl", "thumbnailBlob", "audioDuration", "createThumbnailFromAudio", "getAudioDuration", "thumbnailUrl", "text", "options", "url", "response", "clamp", "errorData", "assets", "ElevenMultilingualV2_voices_default", "asset", "ElevenSoundEffects_default", "ElevenSoundEffects", "config", "cesdk", "getProvider", "modelKey", "ElevenSoundEffects_default", "input", "truncate", "abortSignal", "audioBlob", "generateSound", "audioUrl", "thumbnailBlob", "audioDuration", "createThumbnailFromAudio", "getAudioDuration", "thumbnailUrl", "text", "duration", "url", "response", "errorData", "Elevenlabs", "ElevenMultilingualV2", "ElevenSoundEffects", "elevenlabs_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clamps a value between a minimum and maximum value
|
|
3
|
+
* @param {number} value - The value to clamp
|
|
4
|
+
* @param {number} min - The minimum allowed value
|
|
5
|
+
* @param {number} max - The maximum allowed value
|
|
6
|
+
* @returns {number} The clamped value
|
|
7
|
+
*/
|
|
8
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the duration of an audio blob in seconds
|
|
11
|
+
* @param audioBlob - The audio blob to get the duration from
|
|
12
|
+
* @returns A promise that resolves to the duration in seconds
|
|
13
|
+
*/
|
|
14
|
+
export declare function getAudioDuration(audioUrl: string): Promise<number>;
|
|
15
|
+
declare const DEFAULT_OPTIONS: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
waveformColor: string;
|
|
20
|
+
pixelsPerSecond: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function createThumbnailFromAudio(audio: Blob, options?: Partial<typeof DEFAULT_OPTIONS>): Promise<Blob>;
|
|
23
|
+
/**
|
|
24
|
+
* Smartly truncates text to a specified length while preserving word boundaries
|
|
25
|
+
* and adding an ellipsis to indicate truncation.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} text - The text to truncate
|
|
28
|
+
* @param {number} maxLength - Maximum length of the truncated text (including ellipsis)
|
|
29
|
+
* @param {Object} options - Optional configuration
|
|
30
|
+
* @param {string} options.ellipsis - The ellipsis string (default: '...')
|
|
31
|
+
* @param {boolean} options.preserveSentences - Try to truncate at sentence boundaries (default: false)
|
|
32
|
+
* @param {number} options.minLength - Minimum length before truncation (default: 0)
|
|
33
|
+
* @return {string} The truncated text with ellipsis if truncated
|
|
34
|
+
*/
|
|
35
|
+
export declare function truncate(text: string, maxLength: number, options?: {
|
|
36
|
+
ellipsis?: string;
|
|
37
|
+
preserveSentences?: boolean;
|
|
38
|
+
minLength?: number;
|
|
39
|
+
}): string;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const PLUGIN_ICON_SET_ID = "@imgly/plugin-ai-audio-generation";
|
|
2
|
+
declare const iconSprite = "\n <svg>\n <symbol\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n id=\"@imgly/Sparkle\"\n >\n <path d=\"M5.35545 2.06745C5.24149 1.72556 4.7579 1.72556 4.64394 2.06745L4.05898 3.82232C4.02166 3.93429 3.9338 4.02215 3.82184 4.05948L2.06694 4.64459C1.72506 4.75858 1.72509 5.24217 2.06699 5.3561L3.82179 5.9409C3.93378 5.97822 4.02166 6.06609 4.05899 6.17808L4.64394 7.93291C4.7579 8.2748 5.24149 8.2748 5.35545 7.93291L5.9404 6.17806C5.97773 6.06608 6.06559 5.97821 6.17757 5.94089L7.93242 5.35594C8.27431 5.24198 8.27431 4.75839 7.93242 4.64442L6.17757 4.05947C6.06559 4.02215 5.97773 3.93428 5.9404 3.8223L5.35545 2.06745Z\" fill=\"currentColor\"/>\n<path d=\"M17.9632 3.23614C17.8026 2.80788 17.1968 2.80788 17.0362 3.23614L16.0787 5.78951C16.0285 5.92337 15.9229 6.02899 15.789 6.07918L13.2356 7.0367C12.8074 7.19729 12.8074 7.80307 13.2356 7.96366L15.789 8.92118C15.9229 8.97138 16.0285 9.077 16.0787 9.21085L17.0362 11.7642C17.1968 12.1925 17.8026 12.1925 17.9632 11.7642L18.9207 9.21086C18.9709 9.077 19.0765 8.97138 19.2104 8.92118L21.7637 7.96366C22.192 7.80307 22.192 7.1973 21.7637 7.0367L19.2104 6.07918C19.0765 6.02899 18.9709 5.92337 18.9207 5.78951L17.9632 3.23614Z\" fill=\"currentColor\"/>\n<path d=\"M9.30058 7.82012C9.54712 7.1791 10.454 7.1791 10.7006 7.82012L12.3809 12.189C12.4571 12.3871 12.6136 12.5436 12.8117 12.6198L17.1806 14.3001C17.8216 14.5466 17.8216 15.4536 17.1806 15.7001L12.8117 17.3804C12.6136 17.4566 12.4571 17.6131 12.3809 17.8112L10.7006 22.1801C10.454 22.8211 9.54712 22.8211 9.30058 22.1801L7.62024 17.8112C7.54406 17.6131 7.38754 17.4566 7.18947 17.3804L2.82061 15.7001C2.17959 15.4536 2.17959 14.5466 2.82061 14.3001L7.18947 12.6198C7.38754 12.5436 7.54406 12.3871 7.62024 12.189L9.30058 7.82012Z\" fill=\"currentColor\"/>\n\n </symbol>\n </svg>\n";
|
|
3
|
+
export default iconSprite;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PluginConfiguration } from './types';
|
|
2
|
+
declare const Plugin: (pluginConfiguration: PluginConfiguration) => {
|
|
3
|
+
initialize: (context: import("@cesdk/cesdk-js").EnginePluginContext & {
|
|
4
|
+
cesdk?: import("@cesdk/cesdk-js").default;
|
|
5
|
+
}) => void;
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
};
|
|
9
|
+
export default Plugin;
|