@vibesdotdev/integrations-bark 0.0.0-stage → 1.0.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/LICENSE +126 -0
- package/README.md +22 -2
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +5 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/metadata.plugin.d.ts +6 -0
- package/dist/ai/metadata.plugin.d.ts.map +1 -0
- package/dist/ai/metadata.plugin.js +70 -0
- package/dist/ai/metadata.plugin.js.map +1 -0
- package/dist/ai/provider.consumer.plugin.d.ts +5 -0
- package/dist/ai/provider.consumer.plugin.d.ts.map +1 -0
- package/dist/ai/provider.consumer.plugin.js +33 -0
- package/dist/ai/provider.consumer.plugin.js.map +1 -0
- package/dist/ai/provider.plugin.d.ts +2 -0
- package/dist/ai/provider.plugin.d.ts.map +1 -0
- package/dist/ai/provider.plugin.js +2 -0
- package/dist/ai/provider.plugin.js.map +1 -0
- package/dist/ai/providers/bark/bark.provider.impl.d.ts +24 -0
- package/dist/ai/providers/bark/bark.provider.impl.d.ts.map +1 -0
- package/dist/ai/providers/bark/bark.provider.impl.js +89 -0
- package/dist/ai/providers/bark/bark.provider.impl.js.map +1 -0
- package/dist/ai/providers/bark/detection/index.d.ts +2 -0
- package/dist/ai/providers/bark/detection/index.d.ts.map +1 -0
- package/dist/ai/providers/bark/detection/index.js +2 -0
- package/dist/ai/providers/bark/detection/index.js.map +1 -0
- package/dist/ai/providers/bark/detection/system.d.ts +13 -0
- package/dist/ai/providers/bark/detection/system.d.ts.map +1 -0
- package/dist/ai/providers/bark/detection/system.js +38 -0
- package/dist/ai/providers/bark/detection/system.js.map +1 -0
- package/dist/ai/providers/bark/docs/ai.providers.bark.docs.descriptor.d.ts +4 -0
- package/dist/ai/providers/bark/docs/ai.providers.bark.docs.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/bark/docs/ai.providers.bark.docs.descriptor.js +40 -0
- package/dist/ai/providers/bark/docs/ai.providers.bark.docs.descriptor.js.map +1 -0
- package/dist/ai/providers/bark/index.d.ts +4 -0
- package/dist/ai/providers/bark/index.d.ts.map +1 -0
- package/dist/ai/providers/bark/index.js +4 -0
- package/dist/ai/providers/bark/index.js.map +1 -0
- package/dist/ai/providers/bark/recommendations.d.ts +23 -0
- package/dist/ai/providers/bark/recommendations.d.ts.map +1 -0
- package/dist/ai/providers/bark/recommendations.js +71 -0
- package/dist/ai/providers/bark/recommendations.js.map +1 -0
- package/dist/ai/providers/local/speech/bark/config/config.bark.descriptor.d.ts +4194 -0
- package/dist/ai/providers/local/speech/bark/config/config.bark.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/local/speech/bark/config/config.bark.descriptor.js +63 -0
- package/dist/ai/providers/local/speech/bark/config/config.bark.descriptor.js.map +1 -0
- package/dist/ai/providers/local/speech/bark/config/schemas/index.d.ts +11 -0
- package/dist/ai/providers/local/speech/bark/config/schemas/index.d.ts.map +1 -0
- package/dist/ai/providers/local/speech/bark/config/schemas/index.js +9 -0
- package/dist/ai/providers/local/speech/bark/config/schemas/index.js.map +1 -0
- package/dist/ai/providers/local/speech/bark/index.d.ts +5 -0
- package/dist/ai/providers/local/speech/bark/index.d.ts.map +1 -0
- package/dist/ai/providers/local/speech/bark/index.js +4 -0
- package/dist/ai/providers/local/speech/bark/index.js.map +1 -0
- package/dist/ai/providers/local/speech/bark/provider.bark.descriptor.d.ts +183 -0
- package/dist/ai/providers/local/speech/bark/provider.bark.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/local/speech/bark/provider.bark.descriptor.js +48 -0
- package/dist/ai/providers/local/speech/bark/provider.bark.descriptor.js.map +1 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.descriptor.d.ts +36 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.descriptor.d.ts.map +1 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.descriptor.js +25 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.descriptor.js.map +1 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.impl.d.ts +25 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.impl.d.ts.map +1 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.impl.js +138 -0
- package/dist/ai/specs/bark-cli/bark-cli.spec.impl.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/speech.d.ts +52 -0
- package/dist/schemas/speech.d.ts.map +1 -0
- package/dist/schemas/speech.js +27 -0
- package/dist/schemas/speech.js.map +1 -0
- package/package.json +73 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: VIBES DEV LLC
|
|
6
|
+
Licensed Work: @vibesdotdev/integrations-bark
|
|
7
|
+
The Licensed Work is (c) 2026 VIBES DEV LLC.
|
|
8
|
+
Additional Use Grant: In this grant, "Vibes Platform" means the hosted services VIBES DEV LLC
|
|
9
|
+
operates at vibes.dev and its subdomains.
|
|
10
|
+
|
|
11
|
+
You may make production use of the Licensed Work, including commercial
|
|
12
|
+
use, subject to the limits below. Permitted production use includes:
|
|
13
|
+
building, operating and selling your own applications, agents and services
|
|
14
|
+
on or with the Vibes Platform; self-hosting the Licensed Work for use inside
|
|
15
|
+
your own organization; and providing consulting, integration or development
|
|
16
|
+
services to clients who build on the Vibes Platform.
|
|
17
|
+
|
|
18
|
+
The production use permitted above does not include use that:
|
|
19
|
+
|
|
20
|
+
(a) offers third parties a hosted, managed or embedded service that
|
|
21
|
+
substitutes for the Vibes Platform or a material part of it (including
|
|
22
|
+
agent hosting; fleet, sandbox or container provisioning; package
|
|
23
|
+
registry; source hosting and continuous integration; and managed AI,
|
|
24
|
+
storage, secrets or messaging), where the Licensed Work provides a
|
|
25
|
+
material part of that service's value and that service earns more than
|
|
26
|
+
US$1,000,000 in gross revenue in any twelve-month period;
|
|
27
|
+
(b) sells, rents, sublicenses or white-labels the Licensed Work, or access
|
|
28
|
+
to Vibes Platform functionality, as a product in its own right;
|
|
29
|
+
(c) removes, disables or works around entitlement checks, usage metering,
|
|
30
|
+
quotas or plan limits, or reaches Vibes Platform features the user's
|
|
31
|
+
account is not entitled to;
|
|
32
|
+
(d) scrapes, bulk-exports or harvests data or content from the Vibes
|
|
33
|
+
Platform or its users other than through documented interfaces and
|
|
34
|
+
within their terms, or uses outputs or data obtained from the Vibes
|
|
35
|
+
Platform to train or improve a product that competes with it;
|
|
36
|
+
(e) violates applicable law, infringes anyone's rights, commits fraud or
|
|
37
|
+
deception, conducts unlawful surveillance or harassment, distributes
|
|
38
|
+
malware, or accesses systems without authorization; or
|
|
39
|
+
(f) violates applicable antitrust or competition law.
|
|
40
|
+
|
|
41
|
+
A written permission from the Licensor extends this grant.
|
|
42
|
+
Change Date: Four years from the date the Licensed Work is published.
|
|
43
|
+
Change License: MIT
|
|
44
|
+
|
|
45
|
+
For information about alternative licensing arrangements for the Licensed Work,
|
|
46
|
+
contact VIBES DEV LLC through https://vibes.dev.
|
|
47
|
+
|
|
48
|
+
Notice
|
|
49
|
+
|
|
50
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
51
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
52
|
+
under an Open Source License, as stated in this License.
|
|
53
|
+
|
|
54
|
+
-----------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
Business Source License 1.1
|
|
57
|
+
|
|
58
|
+
License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
59
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
60
|
+
|
|
61
|
+
Terms
|
|
62
|
+
|
|
63
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
64
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
65
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
66
|
+
production use.
|
|
67
|
+
|
|
68
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
69
|
+
available distribution of a specific version of the Licensed Work under this
|
|
70
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
71
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
72
|
+
above terminate.
|
|
73
|
+
|
|
74
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
75
|
+
currently in effect as described in this License, you must purchase a
|
|
76
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
77
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
78
|
+
|
|
79
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
80
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
81
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
82
|
+
for each version of the Licensed Work released by Licensor.
|
|
83
|
+
|
|
84
|
+
You must conspicuously display this License on each original or modified copy
|
|
85
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
86
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
87
|
+
License apply to your use of that work.
|
|
88
|
+
|
|
89
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
90
|
+
terminate your rights under this License for the current and all other
|
|
91
|
+
versions of the Licensed Work.
|
|
92
|
+
|
|
93
|
+
This License does not grant you any right in any trademark or logo of
|
|
94
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
95
|
+
Licensor as expressly required by this License).
|
|
96
|
+
|
|
97
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
98
|
+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
99
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
100
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
101
|
+
TITLE.
|
|
102
|
+
|
|
103
|
+
MariaDB hereby grants you permission to use this License’s text to license
|
|
104
|
+
your works, and to refer to it using the trademark “Business Source License”,
|
|
105
|
+
as long as you comply with the Covenants of Licensor below.
|
|
106
|
+
|
|
107
|
+
Covenants of Licensor
|
|
108
|
+
|
|
109
|
+
In consideration of the right to use this License’s text and the “Business
|
|
110
|
+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
111
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
112
|
+
|
|
113
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
114
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
115
|
+
where “compatible” means that software provided under the Change License can
|
|
116
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
117
|
+
later version. Licensor may specify additional Change Licenses without
|
|
118
|
+
limitation.
|
|
119
|
+
|
|
120
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
121
|
+
impose any additional restriction on the right granted in this License, as
|
|
122
|
+
the Additional Use Grant; or (b) insert the text “None”.
|
|
123
|
+
|
|
124
|
+
3. To specify a Change Date.
|
|
125
|
+
|
|
126
|
+
4. Not to modify this License in any other way.
|
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vibesdotdev/integrations-bark
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Local Suno Bark speech through Vibes AI's Python process transport.
|
|
4
|
+
|
|
5
|
+
Compose AI and Config, then `@vibesdotdev/integrations-bark/ai/plugin` on a
|
|
6
|
+
consumer host. The compatible entrypoint includes the metadata slice and consumer
|
|
7
|
+
loaders. Universal hosts can compose `./ai/metadata.plugin` without importing
|
|
8
|
+
consumer implementations. Use the existing AI semantic client for generation.
|
|
9
|
+
|
|
10
|
+
The stored connection schema owns the defaults. Speech accepts `text`,
|
|
11
|
+
`speaker`/`voiceId`, `textTemp`/`style`, and `waveformTemp`/`stability`. Speaker
|
|
12
|
+
precedence is request option, selected model (a speaker preset), connection,
|
|
13
|
+
default; temperatures are request option, connection, default, clamped to [0, 1].
|
|
14
|
+
The connection `modelsDir` is Bark's checkpoint cache. Audio is always WAV, including when
|
|
15
|
+
a caller requests a different format.
|
|
16
|
+
|
|
17
|
+
Malformed requests refuse with `INVALID_INPUT / bark-speech-invalid`; empty audio
|
|
18
|
+
refuses with `UNAVAILABLE / bark-audio-empty`. Details contain no request values.
|
|
19
|
+
Process failures propagate. Detection returns no provider when Python or Bark is
|
|
20
|
+
unavailable. No hosted API or credential is required.
|
|
21
|
+
|
|
22
|
+
Root exports contain schemas and descriptors. Concrete implementations remain at
|
|
23
|
+
their explicit AI subpaths. See [SPEC.md](./SPEC.md) for the supported contract.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,cAAc,uDAAuD,CAAC;AACtE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sBAAsB,CAAC"}
|
package/dist/ai/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,cAAc,uDAAuD,CAAC;AACtE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuntimePlugin } from '@vibesdotdev/kernel';
|
|
2
|
+
/** Universal Bark descriptors and connection schema; no consumer implementation imports. */
|
|
3
|
+
export declare function createBarkMetadataPlugin(): RuntimePlugin;
|
|
4
|
+
declare const _default: RuntimePlugin;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=metadata.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.plugin.d.ts","sourceRoot":"","sources":["../../src/ai/metadata.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4C9E,4FAA4F;AAC5F,wBAAgB,wBAAwB,IAAI,aAAa,CAgCxD;;AAED,wBAA0C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { createRuntimePlugin } from '@vibesdotdev/kernel';
|
|
2
|
+
import { AI_PROVIDER_SCHEMA_KIND } from '@vibesdotdev/ai/providers-runtime/provider-schema-registration';
|
|
3
|
+
import { AI_PROVIDER_RECOMMENDATION_KIND, createAIProviderRecommendationDescriptor } from '@vibesdotdev/ai/recommendations/runtime';
|
|
4
|
+
import providerDocsDescriptor from "./providers/bark/docs/ai.providers.bark.docs.descriptor.js";
|
|
5
|
+
import barkCliDescriptor from "./specs/bark-cli/bark-cli.spec.descriptor.js";
|
|
6
|
+
import providerDescriptor from "./providers/local/speech/bark/provider.bark.descriptor.js";
|
|
7
|
+
import providerConfigDescriptor from "./providers/local/speech/bark/config/config.bark.descriptor.js";
|
|
8
|
+
import { barkConnectionSchema } from "./providers/local/speech/bark/config/schemas/index.js";
|
|
9
|
+
const providerDetectionDescriptor = {
|
|
10
|
+
id: 'bark',
|
|
11
|
+
kind: 'ai/provider-detection',
|
|
12
|
+
providerId: 'bark',
|
|
13
|
+
description: `System detection loader for ${'bark'}`
|
|
14
|
+
};
|
|
15
|
+
const providerRecommendationDescriptor = createAIProviderRecommendationDescriptor({
|
|
16
|
+
id: 'bark',
|
|
17
|
+
providerType: 'bark',
|
|
18
|
+
displayName: 'Bark',
|
|
19
|
+
name: 'Bark provider recommendation',
|
|
20
|
+
description: 'Run private local Bark synthesis through the Python process runtime.',
|
|
21
|
+
hardware: ['consumer'],
|
|
22
|
+
enabled: true,
|
|
23
|
+
tags: ['bark', 'local', 'tts', 'audio']
|
|
24
|
+
});
|
|
25
|
+
const providerSchemaDescriptor = {
|
|
26
|
+
id: 'integrations/bark/ai/bark',
|
|
27
|
+
kind: AI_PROVIDER_SCHEMA_KIND,
|
|
28
|
+
providerId: 'bark',
|
|
29
|
+
schemaKind: 'connection',
|
|
30
|
+
sourcePath: 'integrations/bark/src/ai/providers/local/speech/bark/config/schemas/index.ts',
|
|
31
|
+
version: '0.1.0-rc.0',
|
|
32
|
+
name: 'Bark',
|
|
33
|
+
description: 'Local transformer-based text-to-speech with realistic voices.'
|
|
34
|
+
};
|
|
35
|
+
/** Universal Bark descriptors and connection schema; no consumer implementation imports. */
|
|
36
|
+
export function createBarkMetadataPlugin() {
|
|
37
|
+
return createRuntimePlugin({
|
|
38
|
+
id: 'integrations-bark/ai/metadata',
|
|
39
|
+
name: 'Bark AI Integration',
|
|
40
|
+
description: 'Registers Bark metadata and connection schema',
|
|
41
|
+
dependencies: ['ai.runtime', 'config'],
|
|
42
|
+
onRegister(runtime) {
|
|
43
|
+
runtime.registerDescriptor('ai/provider', providerDescriptor);
|
|
44
|
+
runtime.registerDescriptor('config/manifest', providerConfigDescriptor);
|
|
45
|
+
runtime.registerDescriptor('ai/provider-detection', providerDetectionDescriptor);
|
|
46
|
+
runtime.registerDescriptor(AI_PROVIDER_SCHEMA_KIND, providerSchemaDescriptor);
|
|
47
|
+
runtime.registerDescriptor(AI_PROVIDER_RECOMMENDATION_KIND, providerRecommendationDescriptor);
|
|
48
|
+
runtime.registerDescriptor('ai/spec', barkCliDescriptor);
|
|
49
|
+
if (runtime.hasKind('docs/topic'))
|
|
50
|
+
runtime.registerDescriptor('docs/topic', providerDocsDescriptor);
|
|
51
|
+
},
|
|
52
|
+
onActivate(runtime) {
|
|
53
|
+
runtime.registerLoader(AI_PROVIDER_SCHEMA_KIND, providerSchemaDescriptor.id, async () => ({
|
|
54
|
+
meta: { id: providerSchemaDescriptor.id, kind: AI_PROVIDER_SCHEMA_KIND, priority: 0 },
|
|
55
|
+
impl: {
|
|
56
|
+
connectionSchema: barkConnectionSchema,
|
|
57
|
+
metadata: {
|
|
58
|
+
name: 'Bark',
|
|
59
|
+
description: 'Local transformer-based text-to-speech with realistic voices.',
|
|
60
|
+
category: 'local',
|
|
61
|
+
capabilities: ['audio', 'connection'],
|
|
62
|
+
fields: []
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export default createBarkMetadataPlugin();
|
|
70
|
+
//# sourceMappingURL=metadata.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.plugin.js","sourceRoot":"","sources":["../../src/ai/metadata.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACN,uBAAuB,EAEvB,MAAM,gEAAgE,CAAC;AACxE,OAAO,EACN,+BAA+B,EAC/B,wCAAwC,EACxC,MAAM,yCAAyC,CAAC;AAGjD,OAAO,sBAAsB,MAAM,4DAA4D,CAAC;AAChG,OAAO,iBAAiB,MAAM,8CAA8C,CAAC;AAC7E,OAAO,kBAAkB,MAAM,2DAA2D,CAAC;AAC3F,OAAO,wBAAwB,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAE7F,MAAM,2BAA2B,GAAkC;IAClE,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,uBAAuB;IAC7B,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,+BAA+B,MAAM,EAAE;CACpD,CAAC;AACF,MAAM,gCAAgC,GAAG,wCAAwC,CAAC;IACjF,EAAE,EAAE,MAAM;IACV,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE,sEAAsE;IACnF,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CACvC,CAAC,CAAC;AACH,MAAM,wBAAwB,GAA2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E;oBACL,gBAAgB,EAAE,oBAAoB;oBACtC,QAAQ,EAAE;wBACT,IAAI,EAAE,MAAM;wBACZ,WAAW,EAAE,+DAA+D;wBAC5E,QAAQ,EAAE,OAAgB;wBAC1B,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;wBACrC,MAAM,EAAE,EAAE;qBACV;iBACD;aACD,CAAC,CAAC,CAAC;QACL,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AAED,eAAe,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.consumer.plugin.d.ts","sourceRoot":"","sources":["../../src/ai/provider.consumer.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG9E,wBAAgB,kBAAkB,IAAI,aAAa,CAsClD;AACD,eAAO,MAAM,YAAY,eAAuB,CAAC;AACjD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRuntimePlugin } from '@vibesdotdev/kernel';
|
|
2
|
+
import metadataPlugin from "./metadata.plugin.js";
|
|
3
|
+
export function createBarkAIPlugin() {
|
|
4
|
+
return createRuntimePlugin({
|
|
5
|
+
id: 'integrations-bark/ai',
|
|
6
|
+
dependencies: ['ai.runtime'],
|
|
7
|
+
onRegister: async (runtime) => { await runtime.registerPlugin(metadataPlugin); },
|
|
8
|
+
onActivate(runtime) {
|
|
9
|
+
runtime.registerLoader('ai/provider', 'bark', async () => ({
|
|
10
|
+
meta: { id: 'bark', kind: 'ai/provider', priority: 0 },
|
|
11
|
+
impl: (await import("./providers/bark/bark.provider.impl.js")).BarkProviderType
|
|
12
|
+
}), { constraint: { hardware: ['consumer'] } });
|
|
13
|
+
runtime.registerLoader('ai/provider-detection', 'bark', async () => ({
|
|
14
|
+
meta: { id: 'bark', kind: 'ai/provider-detection', priority: 0 },
|
|
15
|
+
impl: (await import("./providers/bark/detection/system.js")).BarkSystemDetection
|
|
16
|
+
}), { constraint: { hardware: ['consumer'] } });
|
|
17
|
+
runtime.registerLoader('ai/provider-recommendation', 'bark', async () => ({
|
|
18
|
+
meta: {
|
|
19
|
+
id: 'bark',
|
|
20
|
+
kind: 'ai/provider-recommendation',
|
|
21
|
+
priority: 0
|
|
22
|
+
},
|
|
23
|
+
impl: (await import("./providers/bark/recommendations.js")).BarkRecommendation
|
|
24
|
+
}), { constraint: { hardware: ['consumer'] } });
|
|
25
|
+
runtime.registerLoader('ai/spec', 'bark-cli', async () => ({
|
|
26
|
+
impl: (await import("./specs/bark-cli/bark-cli.spec.impl.js")).BarkCliSpec
|
|
27
|
+
}), { constraint: { hardware: ['consumer'] } });
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export const barkAIPlugin = createBarkAIPlugin();
|
|
32
|
+
export default barkAIPlugin;
|
|
33
|
+
//# sourceMappingURL=provider.consumer.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.consumer.plugin.js","sourceRoot":"","sources":["../../src/ai/provider.consumer.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAElD,MAAM,UAAU,kBAAkB;IACjC,OAAO,mBAAmB,CAAC;QAC1B,EAAE,EAAE,sBAAsB;QAC1B,YAAY,EAAE,CAAC,YAAY,CAAC;QAC5B,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAChF,UAAU,CAAC,OAAO;YACjB,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;gBAC1D,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ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,CAAC,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAC;AACjD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.plugin.d.ts","sourceRoot":"","sources":["../../src/ai/provider.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.plugin.js","sourceRoot":"","sources":["../../src/ai/provider.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AIProviderTypeContext, AIProviderTypeInterface, ConnectionValidationResult, DetectedProviderInstance, ModelRecommendation, ProviderGenerateOptions, ProviderGenerateResult, ProviderHealthCheckResult } from '@vibesdotdev/ai/interfaces/provider-type';
|
|
2
|
+
import type { GenerationRequest } from '@vibesdotdev/ai/interfaces/adapter';
|
|
3
|
+
import type { AIModelDescriptor, Modality } from '@vibesdotdev/ai/models/schemas';
|
|
4
|
+
import type { AIProviderDescriptor } from '@vibesdotdev/ai/providers-runtime/schemas/provider-descriptor';
|
|
5
|
+
import type { AIProviderTypeDescriptor } from '@vibesdotdev/ai/providers-runtime/schemas/type-descriptor';
|
|
6
|
+
import { type BarkConnectionInput } from '../local/speech/bark/config/schemas/index.ts';
|
|
7
|
+
export declare class BarkProviderType implements AIProviderTypeInterface {
|
|
8
|
+
readonly descriptor: AIProviderTypeDescriptor;
|
|
9
|
+
private readonly context;
|
|
10
|
+
constructor(descriptor: AIProviderTypeDescriptor, context: AIProviderTypeContext);
|
|
11
|
+
generate<T extends Modality>(provider: AIProviderDescriptor, model: AIModelDescriptor, request: GenerationRequest<T>, options?: ProviderGenerateOptions): Promise<ProviderGenerateResult<T>>;
|
|
12
|
+
detectInstalled(): Promise<DetectedProviderInstance[]>;
|
|
13
|
+
recommendModels(useCase: string): Promise<ModelRecommendation[]>;
|
|
14
|
+
/**
|
|
15
|
+
* The stored connection is parsed before use: a malformed connection is an
|
|
16
|
+
* unhealthy, typed result rather than a silently defaulted interpreter.
|
|
17
|
+
*/
|
|
18
|
+
checkHealth(config: BarkConnectionInput, options?: {
|
|
19
|
+
timeout?: number;
|
|
20
|
+
}): Promise<ProviderHealthCheckResult>;
|
|
21
|
+
validateConnection(config: BarkConnectionInput): Promise<ConnectionValidationResult>;
|
|
22
|
+
dispose(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=bark.provider.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bark.provider.impl.d.ts","sourceRoot":"","sources":["../../../../src/ai/providers/bark/bark.provider.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AAE1G,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,8CAA8C,CAAC;AAStD,qBAAa,gBAAiB,YAAW,uBAAuB;IAE9D,QAAQ,CAAC,UAAU,EAAE,wBAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADf,UAAU,EAAE,wBAAwB,EAC5B,OAAO,EAAE,qBAAqB;IAGhD,QAAQ,CAAC,CAAC,SAAS,QAAQ,EAC1B,QAAQ,EAAE,oBAAoB,EAC9B,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAI/B,eAAe,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAMtD,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAYtE;;;OAGG;IACG,WAAW,CAChB,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,yBAAyB,CAAC;IAuC/B,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAWpF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAC9B"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { executeGeneration } from '@vibesdotdev/ai/providers-runtime/utils/provider-type-helpers';
|
|
2
|
+
import { barkConnectionSchema } from "../local/speech/bark/config/schemas/index.js";
|
|
3
|
+
import { detectBarkSystem } from "./detection/system.js";
|
|
4
|
+
const BARK_SPEAKERS = [
|
|
5
|
+
'v2/en_speaker_6',
|
|
6
|
+
'v2/en_speaker_9',
|
|
7
|
+
'v2/en_speaker_3'
|
|
8
|
+
];
|
|
9
|
+
export class BarkProviderType {
|
|
10
|
+
descriptor;
|
|
11
|
+
context;
|
|
12
|
+
constructor(descriptor, context) {
|
|
13
|
+
this.descriptor = descriptor;
|
|
14
|
+
this.context = context;
|
|
15
|
+
}
|
|
16
|
+
generate(provider, model, request, options) {
|
|
17
|
+
return executeGeneration(this.context, provider, model, request, options);
|
|
18
|
+
}
|
|
19
|
+
async detectInstalled() {
|
|
20
|
+
const detected = await detectBarkSystem(this.context.runtime);
|
|
21
|
+
if (!detected)
|
|
22
|
+
return [];
|
|
23
|
+
return [{ name: 'Bark (Local Python)', config: { ...detected.configuration }, source: 'system' }];
|
|
24
|
+
}
|
|
25
|
+
async recommendModels(useCase) {
|
|
26
|
+
if (useCase !== 'audio' && useCase !== 'tts')
|
|
27
|
+
return [];
|
|
28
|
+
return BARK_SPEAKERS.map((speaker, index) => ({
|
|
29
|
+
modelId: speaker,
|
|
30
|
+
modelName: speaker,
|
|
31
|
+
score: 90 - index * 5,
|
|
32
|
+
reason: 'Local Bark speaker preset for private text-to-speech',
|
|
33
|
+
capabilities: ['audio'],
|
|
34
|
+
useCaseFit: 90 - index * 5
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The stored connection is parsed before use: a malformed connection is an
|
|
39
|
+
* unhealthy, typed result rather than a silently defaulted interpreter.
|
|
40
|
+
*/
|
|
41
|
+
async checkHealth(config, options) {
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
const parsed = barkConnectionSchema.safeParse(config);
|
|
44
|
+
if (!parsed.success) {
|
|
45
|
+
return {
|
|
46
|
+
healthy: false,
|
|
47
|
+
message: 'Bark connection configuration is invalid',
|
|
48
|
+
error: {
|
|
49
|
+
code: 'CONFIG_INVALID',
|
|
50
|
+
message: parsed.error.issues.map((issue) => issue.message).join('; ')
|
|
51
|
+
},
|
|
52
|
+
checkedAt: new Date()
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const detected = await detectBarkSystem(this.context.runtime, parsed.data, options?.timeout ?? 5000);
|
|
56
|
+
const latencyMs = Date.now() - startTime;
|
|
57
|
+
if (!detected) {
|
|
58
|
+
return {
|
|
59
|
+
healthy: false,
|
|
60
|
+
latencyMs,
|
|
61
|
+
message: 'Bark is not available to the configured Python executable',
|
|
62
|
+
error: {
|
|
63
|
+
code: 'PYTHON_PACKAGE_NOT_FOUND',
|
|
64
|
+
message: 'Python could not import Bark'
|
|
65
|
+
},
|
|
66
|
+
checkedAt: new Date()
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
healthy: true,
|
|
71
|
+
latencyMs,
|
|
72
|
+
message: 'Bark is available through the local Python process runtime',
|
|
73
|
+
availableModalities: ['audio'],
|
|
74
|
+
checkedAt: new Date()
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
async validateConnection(config) {
|
|
78
|
+
const parsed = barkConnectionSchema.safeParse(config);
|
|
79
|
+
if (!parsed.success) {
|
|
80
|
+
return {
|
|
81
|
+
valid: false,
|
|
82
|
+
errors: parsed.error.issues.map((issue) => issue.message)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return { valid: true };
|
|
86
|
+
}
|
|
87
|
+
async dispose() { }
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=bark.provider.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bark.provider.impl.js","sourceRoot":"","sources":["../../../../src/ai/providers/bark/bark.provider.impl.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAC;AAClG,OAAO,EACN,oBAAoB,EAEpB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,aAAa,GAAG;IACrB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;CACR,CAAC;AAEX,MAAM,OAAO,gBAAgB;IAElB;IACQ;IAFlB,YACU,UAAoC,EAC5B,OAA8B;QADtC,eAAU,GAAV,UAAU,CAA0B;QAC5B,YAAO,GAAP,OAAO,CAAuB;IAC7C,CAAC;IAEJ,QAAQ,CACP,QAA8B,EAC9B,KAAwB,EACxB,OAA6B,EAC7B,OAAiC;QAEjC,OAAO,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK,CAAC,eAAe;QACpB,MA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"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/providers/bark/detection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DetectedProvider } from '@vibesdotdev/ai/providers-runtime/client/types';
|
|
2
|
+
import type { KindContext, VibesRuntime } from '@vibesdotdev/kernel';
|
|
3
|
+
import type { AIProviderDetectionDescriptor, ProviderDetectionImplementation } from '@vibesdotdev/ai/providers-runtime/schemas';
|
|
4
|
+
import { type BarkConnectionInput } from '../../local/speech/bark/config/schemas/index.ts';
|
|
5
|
+
export declare const BARK_IMPORT_PROBE = "from bark import generate_audio; print(\"ok\")";
|
|
6
|
+
/** Detect Bark using the host's public process transport; runtime owns the deadline. */
|
|
7
|
+
export declare function detectBarkSystem(runtime: VibesRuntime, config?: BarkConnectionInput, timeoutMs?: number): Promise<DetectedProvider | null>;
|
|
8
|
+
export declare class BarkSystemDetection implements ProviderDetectionImplementation {
|
|
9
|
+
private readonly context;
|
|
10
|
+
constructor(_descriptor: AIProviderDetectionDescriptor, context: KindContext<VibesRuntime>);
|
|
11
|
+
detect(): Promise<DetectedProvider | null>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../../src/ai/providers/bark/detection/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAGhI,OAAO,EAAwB,KAAK,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEjH,eAAO,MAAM,iBAAiB,mDAAiD,CAAC;AAEhF,wFAAwF;AACxF,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,YAAY,EACrB,MAAM,GAAE,mBAAwB,EAChC,SAAS,SAAO,GACd,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAsBlC;AAED,qBAAa,mBAAoB,YAAW,+BAA+B;IAGzE,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADxB,WAAW,EAAE,6BAA6B,EACzB,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC;IAGpD,MAAM,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAG1C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { barkConnectionSchema } from "../../local/speech/bark/config/schemas/index.js";
|
|
2
|
+
export const BARK_IMPORT_PROBE = 'from bark import generate_audio; print("ok")';
|
|
3
|
+
/** Detect Bark using the host's public process transport; runtime owns the deadline. */
|
|
4
|
+
export async function detectBarkSystem(runtime, config = {}, timeoutMs = 3000) {
|
|
5
|
+
const configuration = barkConnectionSchema.parse(config);
|
|
6
|
+
const transport = await runtime.query('ai/transport')
|
|
7
|
+
.withId('process').resolve();
|
|
8
|
+
const available = await runtime.lifecycle.wait(async (signal) => {
|
|
9
|
+
for await (const chunk of transport.send({
|
|
10
|
+
method: 'POST', path: '', headers: {}, streaming: false,
|
|
11
|
+
body: { args: ['-c', BARK_IMPORT_PROBE], suppressStdout: true }
|
|
12
|
+
}, { runtime, endpointBase: configuration.pythonExecutable, signal, timeoutMs, framing: 'none' })) {
|
|
13
|
+
if (chunk.kind === 'error')
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
}, { timeoutMs, reason: 'Bark import probe' });
|
|
18
|
+
if (!available)
|
|
19
|
+
return null;
|
|
20
|
+
return {
|
|
21
|
+
providerType: 'bark',
|
|
22
|
+
name: 'Bark (Local Python)',
|
|
23
|
+
description: 'Private offline text-to-speech through the local Bark Python package',
|
|
24
|
+
status: 'available',
|
|
25
|
+
models: [configuration.speaker],
|
|
26
|
+
configuration
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export class BarkSystemDetection {
|
|
30
|
+
context;
|
|
31
|
+
constructor(_descriptor, context) {
|
|
32
|
+
this.context = context;
|
|
33
|
+
}
|
|
34
|
+
detect() {
|
|
35
|
+
return detectBarkSystem(this.context.runtime);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../../src/ai/providers/bark/detection/system.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAA4B,MAAM,iDAAiD,CAAC;AAEjH,MAAM,CAAC,MAAM,iBAAiB,GAAG,8CAA8C,CAAC;AAEhF,wFAAwF;AACxF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,OAAqB,EACrB,SAA8B,EAAE,EAChC,SAAS,GAAG,IAAI;IAEhB,MAAM,aAAa,GAAG,oBAAoB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,KAAK,CAA8C,cAAc,CAAC;SAChG,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC/D,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,SAAS,CAAC,IAAI,CAAC;YACxC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK;YACvD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE;SAC/D,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;YACnG,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAO,KAAK,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;IAC/C,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO;QACN,YAAY,EAAE,MAAM;QACpB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,sEAAsE;QACnF,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;QAC/B,aAAa;KACb,CAAC;AACH,CAAC;AAED,MAAM,OAAO,mBAAmB;IAGb;IAFlB,YACC,WAA0C,EACzB,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;IACjD,CAAC;IAEJ,MAAM;QACL,OAAO,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.providers.bark.docs.descriptor.d.ts","sourceRoot":"","sources":["../../../../../src/ai/providers/bark/docs/ai.providers.bark.docs.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,QAAA,MAAM,UAAU,EAAE,mBAqCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const descriptor = {
|
|
2
|
+
kind: 'docs/topic',
|
|
3
|
+
id: 'ai.providers.bark',
|
|
4
|
+
title: 'Bark provider',
|
|
5
|
+
summary: 'Run private local Bark synthesis through the Python process runtime.',
|
|
6
|
+
body: {
|
|
7
|
+
type: 'markdown',
|
|
8
|
+
sourceType: 'raw',
|
|
9
|
+
source: `# Bark
|
|
10
|
+
|
|
11
|
+
Install Bark and its PyTorch dependencies, then let runtime detection verify them
|
|
12
|
+
through the neutral process transport. The connection schema owns every default
|
|
13
|
+
(Python executable, speaker, sampling temperatures).
|
|
14
|
+
|
|
15
|
+
## Speaker and sampling precedence
|
|
16
|
+
|
|
17
|
+
- Speaker: request \`speaker\`, then \`voiceId\`, then the selected model id (a Bark
|
|
18
|
+
speaker preset such as \`v2/en_speaker_9\`), then the connection \`speaker\`, then
|
|
19
|
+
the schema default.
|
|
20
|
+
- \`textTemp\` / \`waveformTemp\`: request option (\`style\` / \`stability\` aliases),
|
|
21
|
+
then the connection, then the schema default. Values are clamped to [0, 1].
|
|
22
|
+
- Response \`metadata.modelVersion\` reports the speaker actually used.
|
|
23
|
+
- The connection \`modelsDir\` becomes the Bark checkpoint cache (\`XDG_CACHE_HOME\`)
|
|
24
|
+
of the spawned Python process.
|
|
25
|
+
|
|
26
|
+
Audio is always WAV and validated with AudioGenerationResponseSchema. Malformed
|
|
27
|
+
speech refuses with INVALID_INPUT/bark-speech-invalid; empty audio refuses with
|
|
28
|
+
UNAVAILABLE/bark-audio-empty. Compose ./ai/plugin on consumer hosts or
|
|
29
|
+
./ai/metadata.plugin for metadata only.
|
|
30
|
+
`
|
|
31
|
+
},
|
|
32
|
+
tags: ['ai', 'providers', 'bark', 'local', 'tts'],
|
|
33
|
+
parent: 'ai.providers',
|
|
34
|
+
order: 60,
|
|
35
|
+
surfaces: ['cli', 'web', 'in-app'],
|
|
36
|
+
hardware: ['consumer'],
|
|
37
|
+
enabled: true
|
|
38
|
+
};
|
|
39
|
+
export default descriptor;
|
|
40
|
+
//# sourceMappingURL=ai.providers.bark.docs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.providers.bark.docs.descriptor.js","sourceRoot":"","sources":["../../../../../src/ai/providers/bark/docs/ai.providers.bark.docs.descriptor.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAwB;IACvC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,sEAAsE;IAC/E,IAAI,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;CAqBT;KACC;IACD,IAAI,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACjD,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IAClC,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/providers/bark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/providers/bark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|