@imgly/plugin-ai-audio-generation-web 0.1.10 → 0.2.1

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/plugin.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type EditorPlugin } from '@cesdk/cesdk-js';
2
+ import { Output } from '@imgly/plugin-ai-generation-web';
2
3
  import { PluginConfiguration } from './types';
3
4
  export { PLUGIN_ID } from './constants';
4
- export declare function AudioGeneration(options: PluginConfiguration): Omit<EditorPlugin, 'name' | 'version'>;
5
+ export declare function AudioGeneration<I, O extends Output>(config: PluginConfiguration<I, O>): Omit<EditorPlugin, 'name' | 'version'>;
5
6
  export default AudioGeneration;
package/dist/types.d.ts CHANGED
@@ -1,32 +1,23 @@
1
- import type CreativeEditorSDK from '@cesdk/cesdk-js';
2
- import { type Provider, type GenerationMiddleware } from '@imgly/plugin-ai-generation-web';
3
- type AiAudioProvider = (context: {
4
- cesdk: CreativeEditorSDK;
5
- }) => Promise<Provider<'audio', any, any>>;
6
- export interface PluginConfiguration {
1
+ import { CommonPluginConfiguration, GetProvider, Output } from '@imgly/plugin-ai-generation-web';
2
+ export interface PluginConfiguration<I, O extends Output> extends CommonPluginConfiguration<'audio', I, O> {
3
+ providers?: {
4
+ /**
5
+ * Provider of a model for speech generation just from a (prompt) text.
6
+ */
7
+ text2speech?: GetProvider<'audio'>[] | GetProvider<'audio'>;
8
+ /**
9
+ * Provider of a model for speech generation just from a (prompt) text.
10
+ */
11
+ text2sound?: GetProvider<'audio'>[] | GetProvider<'audio'>;
12
+ };
7
13
  /**
8
14
  * Provider of a model for speech generation just from a (prompt) text.
15
+ * @deprecated Use `providers.text2speech` instead.
9
16
  */
10
- text2speech?: AiAudioProvider;
17
+ text2speech?: GetProvider<'audio'>[] | GetProvider<'audio'>;
11
18
  /**
12
19
  * Provider of a model for speech generation just from a (prompt) text.
20
+ * @deprecated Use `providers.text2sound` instead.
13
21
  */
14
- text2sound?: AiAudioProvider;
15
- /**
16
- * Render console logs for debugging purposes.
17
- */
18
- debug?: boolean;
19
- /**
20
- * Dry run mode. If set to true, the plugin will not make any API calls.
21
- */
22
- dryRun?: boolean;
23
- /**
24
- * Is called when the generation process is started. Can be used to
25
- * extend the generation process with additional steps.
26
- *
27
- * @param generate A function that starts the actual generation process.
28
- * @param context The context of the generation process.
29
- */
30
- middleware?: GenerationMiddleware;
22
+ text2sound?: GetProvider<'audio'>[] | GetProvider<'audio'>;
31
23
  }
32
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/plugin-ai-audio-generation-web",
3
- "version": "0.1.10",
3
+ "version": "0.2.1",
4
4
  "description": "AI audio generation plugin for the CE.SDK editor",
5
5
  "keywords": ["CE.SDK", "plugin", "AI", "audio-generation"],
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "build": "pnpm run clean && pnpm _syncPnpm && pnpm exec node scripts/build.mjs",
39
39
  "test": "echo No tests",
40
40
  "dev": "pnpm --filter \"${npm_package_name}^...\" --parallel run dev:wait && pnpm exec concurrently 'node scripts/watch.mjs' 'pnpm _syncPnpm --watch' --names 'build,sync deps'",
41
- "dev:wait": "pnpm exec wait-on ./dist/index.mjs ./dist/index.d.ts ./dist/elevenlabs/index.mjs ./dist/elevenlabs/index.d.ts --window 250 --timeout 30000",
41
+ "dev:wait": "pnpm exec wait-on ./dist/index.mjs ./dist/index.d.ts ./dist/elevenlabs/index.mjs ./dist/elevenlabs/index.d.ts --window 250 --timeout 60000",
42
42
  "dev:types": "tsc --emitDeclarationOnly --watch --preserveWatchOutput",
43
43
  "publish:latest": "pnpm run build && npm publish --tag latest --access public",
44
44
  "publish:next": "pnpm run build && npm publish --tag next --access public",