@suitecut/audio-pocket 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 +23 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Pocket TTS audio plugin
|
|
2
|
+
|
|
3
|
+
Install only this adapter when SuiteCut narration uses a Pocket TTS model.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install --save-dev @suitecut/audio-pocket
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
{
|
|
11
|
+
provider: 'pocket',
|
|
12
|
+
module: '@suitecut/audio-pocket',
|
|
13
|
+
options: {
|
|
14
|
+
lmFlow: './models/pocket/lm-flow.onnx',
|
|
15
|
+
lmMain: './models/pocket/lm-main.onnx',
|
|
16
|
+
encoder: './models/pocket/encoder.onnx',
|
|
17
|
+
decoder: './models/pocket/decoder.onnx',
|
|
18
|
+
textConditioner: './models/pocket/text-conditioner.onnx',
|
|
19
|
+
vocabJson: './models/pocket/vocab.json',
|
|
20
|
+
tokenScoresJson: './models/pocket/token-scores.json',
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAmBA,wBAiBE"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createSherpaAudioPlugin, sherpaCommonOptionsShape, sherpaFilePathSchema, } from '@suitecut/audio-sherpa-core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const OptionsSchema = z.strictObject({
|
|
4
|
+
...sherpaCommonOptionsShape,
|
|
5
|
+
lmFlow: sherpaFilePathSchema,
|
|
6
|
+
lmMain: sherpaFilePathSchema,
|
|
7
|
+
encoder: sherpaFilePathSchema,
|
|
8
|
+
decoder: sherpaFilePathSchema,
|
|
9
|
+
textConditioner: sherpaFilePathSchema,
|
|
10
|
+
vocabJson: sherpaFilePathSchema,
|
|
11
|
+
tokenScoresJson: sherpaFilePathSchema,
|
|
12
|
+
voiceEmbeddingCacheCapacity: z.number().int().positive().exactOptional(),
|
|
13
|
+
});
|
|
14
|
+
export default createSherpaAudioPlugin({
|
|
15
|
+
family: 'pocket',
|
|
16
|
+
schema: OptionsSchema,
|
|
17
|
+
model: (options) => ({
|
|
18
|
+
pocket: {
|
|
19
|
+
lmFlow: options.lmFlow,
|
|
20
|
+
lmMain: options.lmMain,
|
|
21
|
+
encoder: options.encoder,
|
|
22
|
+
decoder: options.decoder,
|
|
23
|
+
textConditioner: options.textConditioner,
|
|
24
|
+
vocabJson: options.vocabJson,
|
|
25
|
+
tokenScoresJson: options.tokenScoresJson,
|
|
26
|
+
...(options.voiceEmbeddingCacheCapacity === undefined
|
|
27
|
+
? {}
|
|
28
|
+
: { voiceEmbeddingCacheCapacity: options.voiceEmbeddingCacheCapacity }),
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
//# 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,GACrB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,aAAa,GAAG,CAAC,CAAC,YAAY,CAAC;IACnC,GAAG,wBAAwB;IAC3B,MAAM,EAAE,oBAAoB;IAC5B,MAAM,EAAE,oBAAoB;IAC5B,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,oBAAoB;IAC7B,eAAe,EAAE,oBAAoB;IACrC,SAAS,EAAE,oBAAoB;IAC/B,eAAe,EAAE,oBAAoB;IACrC,2BAA2B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE;CACzE,CAAC,CAAA;AAEF,eAAe,uBAAuB,CAAC;IACrC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACnB,MAAM,EAAE;YACN,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,eAAe,EAAE,OAAO,CAAC,eAAe;YACxC,GAAG,CAAC,OAAO,CAAC,2BAA2B,KAAK,SAAS;gBACnD,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,2BAA2B,EAAE,OAAO,CAAC,2BAA2B,EAAE,CAAC;SAC1E;KACF,CAAC;CACH,CAAC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@suitecut/audio-pocket",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Pocket TTS WebAssembly text-to-speech plugin for SuiteCut.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"suitecut",
|
|
7
|
+
"pocket-tts",
|
|
8
|
+
"webassembly",
|
|
9
|
+
"text-to-speech"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/skyaara/suitecut/tree/main/plugins/pocket",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/skyaara/suitecut/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/skyaara/suitecut.git",
|
|
18
|
+
"directory": "plugins/pocket"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "pnpm clean:dist && tsc -p tsconfig.json",
|
|
40
|
+
"check": "tsc --noEmit -p tsconfig.json",
|
|
41
|
+
"clean:dist": "node ../../scripts/clean-plugin-dist.mjs",
|
|
42
|
+
"prepack": "pnpm build"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"suitecut": ">=1.0.0 <2"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"suitecut": {
|
|
49
|
+
"optional": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@suitecut/audio-sherpa-core": "^1.0.0",
|
|
54
|
+
"zod": "^4.4.3"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=22.0.0"
|
|
58
|
+
}
|
|
59
|
+
}
|