@suitecut/audio-vits 1.0.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/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # VITS and Piper audio plugin
2
+
3
+ Install only this adapter when SuiteCut narration uses a VITS or Piper model.
4
+
5
+ ```sh
6
+ npm install --save-dev @suitecut/audio-vits
7
+ ```
8
+
9
+ ```ts
10
+ {
11
+ provider: 'piper-amy',
12
+ module: '@suitecut/audio-vits',
13
+ options: {
14
+ model: './models/piper/en_US-amy-low.onnx',
15
+ tokens: './models/piper/tokens.txt',
16
+ dataDir: './models/piper/espeak-ng-data',
17
+ },
18
+ }
19
+ ```
@@ -0,0 +1,3 @@
1
+ declare const _default: import("../../../dist/audio-plugin.js").SuiteCutAudioPlugin;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAmBA,wBAcE"}
package/dist/index.js ADDED
@@ -0,0 +1,28 @@
1
+ import { createSherpaAudioPlugin, sherpaCommonOptionsShape, sherpaFilePathSchema, sherpaPositiveScaleSchema, } from '@suitecut/audio-sherpa-core';
2
+ import { z } from 'zod';
3
+ const OptionsSchema = z.strictObject({
4
+ ...sherpaCommonOptionsShape,
5
+ model: sherpaFilePathSchema,
6
+ tokens: sherpaFilePathSchema,
7
+ lexicon: sherpaFilePathSchema.exactOptional(),
8
+ dataDir: sherpaFilePathSchema.exactOptional(),
9
+ noiseScale: sherpaPositiveScaleSchema.exactOptional(),
10
+ noiseScaleW: sherpaPositiveScaleSchema.exactOptional(),
11
+ lengthScale: sherpaPositiveScaleSchema.exactOptional(),
12
+ });
13
+ export default createSherpaAudioPlugin({
14
+ family: 'vits',
15
+ schema: OptionsSchema,
16
+ model: (options) => ({
17
+ vits: {
18
+ model: options.model,
19
+ tokens: options.tokens,
20
+ ...(options.lexicon === undefined ? {} : { lexicon: options.lexicon }),
21
+ ...(options.dataDir === undefined ? {} : { dataDir: options.dataDir }),
22
+ ...(options.noiseScale === undefined ? {} : { noiseScale: options.noiseScale }),
23
+ ...(options.noiseScaleW === undefined ? {} : { noiseScaleW: options.noiseScaleW }),
24
+ ...(options.lengthScale === undefined ? {} : { lengthScale: options.lengthScale }),
25
+ },
26
+ }),
27
+ });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,aAAa,GAAG,CAAC,CAAC,YAAY,CAAC;IACnC,GAAG,wBAAwB;IAC3B,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,oBAAoB;IAC5B,OAAO,EAAE,oBAAoB,CAAC,aAAa,EAAE;IAC7C,OAAO,EAAE,oBAAoB,CAAC,aAAa,EAAE;IAC7C,UAAU,EAAE,yBAAyB,CAAC,aAAa,EAAE;IACrD,WAAW,EAAE,yBAAyB,CAAC,aAAa,EAAE;IACtD,WAAW,EAAE,yBAAyB,CAAC,aAAa,EAAE;CACvD,CAAC,CAAA;AAEF,eAAe,uBAAuB,CAAC;IACrC,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACnB,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;YACtE,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;YACtE,GAAG,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;YAC/E,GAAG,CAAC,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;YAClF,GAAG,CAAC,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;SACnF;KACF,CAAC;CACH,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@suitecut/audio-vits",
3
+ "version": "1.0.0",
4
+ "description": "VITS and Piper WebAssembly text-to-speech plugin for SuiteCut.",
5
+ "keywords": [
6
+ "suitecut",
7
+ "vits",
8
+ "piper",
9
+ "webassembly",
10
+ "text-to-speech"
11
+ ],
12
+ "homepage": "https://github.com/skyaara/suitecut/tree/main/plugins/vits",
13
+ "bugs": {
14
+ "url": "https://github.com/skyaara/suitecut/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/skyaara/suitecut.git",
19
+ "directory": "plugins/vits"
20
+ },
21
+ "type": "module",
22
+ "license": "MIT",
23
+ "sideEffects": false,
24
+ "main": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "default": "./dist/index.js"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "README.md"
35
+ ],
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "pnpm clean:dist && tsc -p tsconfig.json",
41
+ "check": "tsc --noEmit -p tsconfig.json",
42
+ "clean:dist": "node ../../scripts/clean-plugin-dist.mjs",
43
+ "prepack": "pnpm build"
44
+ },
45
+ "peerDependencies": {
46
+ "suitecut": ">=1.0.0 <2"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "suitecut": {
50
+ "optional": true
51
+ }
52
+ },
53
+ "dependencies": {
54
+ "@suitecut/audio-sherpa-core": "^1.0.0",
55
+ "zod": "^4.4.3"
56
+ },
57
+ "engines": {
58
+ "node": ">=22.0.0"
59
+ }
60
+ }