@leiboss/dsh-tts 0.0.0-stage → 0.3.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/LICENSE +21 -0
  3. package/README.md +374 -2
  4. package/cordis.patch.yml +4 -0
  5. package/dist/audio/mp3-duration.d.ts +23 -0
  6. package/dist/audio/mp3-duration.d.ts.map +1 -0
  7. package/dist/audio/mp3-duration.js +140 -0
  8. package/dist/audio/mp3-duration.js.map +1 -0
  9. package/dist/audio-route.d.ts +122 -0
  10. package/dist/audio-route.d.ts.map +1 -0
  11. package/dist/audio-route.js +408 -0
  12. package/dist/audio-route.js.map +1 -0
  13. package/dist/cache.d.ts +50 -0
  14. package/dist/cache.d.ts.map +1 -0
  15. package/dist/cache.js +105 -0
  16. package/dist/cache.js.map +1 -0
  17. package/dist/chunked-tts.d.ts +34 -0
  18. package/dist/chunked-tts.d.ts.map +1 -0
  19. package/dist/chunked-tts.js +121 -0
  20. package/dist/chunked-tts.js.map +1 -0
  21. package/dist/chunker.d.ts +19 -0
  22. package/dist/chunker.d.ts.map +1 -0
  23. package/dist/chunker.js +98 -0
  24. package/dist/chunker.js.map +1 -0
  25. package/dist/client.js +90 -0
  26. package/dist/concurrency.d.ts +33 -0
  27. package/dist/concurrency.d.ts.map +1 -0
  28. package/dist/concurrency.js +95 -0
  29. package/dist/concurrency.js.map +1 -0
  30. package/dist/config.d.ts +174 -0
  31. package/dist/config.d.ts.map +1 -0
  32. package/dist/config.js +186 -0
  33. package/dist/config.js.map +1 -0
  34. package/dist/edge-tts.d.ts +74 -0
  35. package/dist/edge-tts.d.ts.map +1 -0
  36. package/dist/edge-tts.js +161 -0
  37. package/dist/edge-tts.js.map +1 -0
  38. package/dist/engine-health.d.ts +108 -0
  39. package/dist/engine-health.d.ts.map +1 -0
  40. package/dist/engine-health.js +170 -0
  41. package/dist/engine-health.js.map +1 -0
  42. package/dist/engines/edge-js.d.ts +51 -0
  43. package/dist/engines/edge-js.d.ts.map +1 -0
  44. package/dist/engines/edge-js.js +98 -0
  45. package/dist/engines/edge-js.js.map +1 -0
  46. package/dist/errors.d.ts +66 -0
  47. package/dist/errors.d.ts.map +1 -0
  48. package/dist/errors.js +110 -0
  49. package/dist/errors.js.map +1 -0
  50. package/dist/fallback.d.ts +69 -0
  51. package/dist/fallback.d.ts.map +1 -0
  52. package/dist/fallback.js +89 -0
  53. package/dist/fallback.js.map +1 -0
  54. package/dist/index.d.ts +72 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +723 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/probe.d.ts +42 -0
  59. package/dist/probe.d.ts.map +1 -0
  60. package/dist/probe.js +63 -0
  61. package/dist/probe.js.map +1 -0
  62. package/dist/provider.d.ts +33 -0
  63. package/dist/provider.d.ts.map +1 -0
  64. package/dist/provider.js +7 -0
  65. package/dist/provider.js.map +1 -0
  66. package/dist/register-service.d.ts +25 -0
  67. package/dist/register-service.d.ts.map +1 -0
  68. package/dist/register-service.js +33 -0
  69. package/dist/register-service.js.map +1 -0
  70. package/dist/sapi-tts.d.ts +29 -0
  71. package/dist/sapi-tts.d.ts.map +1 -0
  72. package/dist/sapi-tts.js +131 -0
  73. package/dist/sapi-tts.js.map +1 -0
  74. package/dist/self-check.d.ts +32 -0
  75. package/dist/self-check.d.ts.map +1 -0
  76. package/dist/self-check.js +75 -0
  77. package/dist/self-check.js.map +1 -0
  78. package/dist/service.d.ts +119 -0
  79. package/dist/service.d.ts.map +1 -0
  80. package/dist/service.js +404 -0
  81. package/dist/service.js.map +1 -0
  82. package/dist/voices.d.ts +21 -0
  83. package/dist/voices.d.ts.map +1 -0
  84. package/dist/voices.js +74 -0
  85. package/dist/voices.js.map +1 -0
  86. package/icon.svg +6 -0
  87. package/locale/en.json +6 -0
  88. package/locale/zh.json +6 -0
  89. package/package.json +93 -3
package/icon.svg ADDED
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Speech synthesis">
2
+ <rect x="4" y="4" width="56" height="56" rx="14" fill="#2f6fed"/>
3
+ <path d="M22 26h7l9-7v26l-9-7h-7a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3z" fill="#fff"/>
4
+ <path d="M43 24a11 11 0 0 1 0 16" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round"/>
5
+ <path d="M48 19a18 18 0 0 1 0 26" fill="none" stroke="#fff" stroke-width="3.5" stroke-linecap="round" opacity=".7"/>
6
+ </svg>
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Text to speech",
4
+ "description": "Synthesize text into audio files with multiple voices, long-text chunking, web playback links, and fallbacks."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "语音合成",
4
+ "description": "把文字合成为音频文件,支持多音色、长文本分块、Web 播放链接与降级兜底。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,96 @@
1
1
  {
2
2
  "name": "@leiboss/dsh-tts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.3.0",
4
+ "description": "Reliable TTS engine for DSH plugins: concurrency-safe synthesis, layered error semantics, chunked long-text, provider fallback, and an injectable ctx.tts service.",
5
+ "license": "MIT",
6
+ "author": "leiboss",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/leiboss/dsh-tts.git",
10
+ "directory": "packages/tts"
11
+ },
12
+ "homepage": "https://github.com/leiboss/dsh-tts/tree/main/packages/tts#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/leiboss/dsh-tts/issues"
15
+ },
16
+ "keywords": [
17
+ "dsh-plugin",
18
+ "dsh",
19
+ "tts",
20
+ "edge-tts",
21
+ "text-to-speech",
22
+ "voice",
23
+ "tts-backend",
24
+ "tts-provider",
25
+ "voice-infrastructure",
26
+ "plugin-infrastructure"
27
+ ],
28
+ "type": "module",
29
+ "main": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "exports": {
32
+ ".": "./dist/index.js",
33
+ "./provider": "./dist/provider.js",
34
+ "./service": "./dist/service.js",
35
+ "./client": "./dist/client.js",
36
+ "./locale/*.json": "./locale/*.json",
37
+ "./icon": "./icon.svg",
38
+ "./package.json": "./package.json"
39
+ },
40
+ "dsh": {
41
+ "bundle": {
42
+ "patch": "./cordis.patch.yml"
43
+ },
44
+ "client": {
45
+ "platform": "web",
46
+ "inject": [
47
+ "@deepseek-ai/dsh-client-runtime",
48
+ "@deepseek-ai/dsh-client-ui-tool",
49
+ "@deepseek-ai/dsh-client-ui-slots"
50
+ ],
51
+ "immediately": true
52
+ }
53
+ },
54
+ "files": [
55
+ "dist",
56
+ "cordis.patch.yml",
57
+ "locale/*.json",
58
+ "icon.svg",
59
+ "README.md",
60
+ "CHANGELOG.md"
61
+ ],
62
+ "engines": {
63
+ "node": ">=22.18",
64
+ "dsh": ">=0.2.2-rc.1"
65
+ },
66
+ "scripts": {
67
+ "build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
68
+ "pretest": "node ../../scripts/check-node.mjs",
69
+ "test": "node --test \"test/**/*.test.ts\"",
70
+ "test:integration": "node test/integration.ts",
71
+ "check:engines": "node scripts/check-engines.mjs",
72
+ "prepublishOnly": "node ../../scripts/check-node.mjs && npm run build && npm test"
73
+ },
74
+ "publishConfig": {
75
+ "access": "public"
76
+ },
77
+ "peerDependencies": {
78
+ "@deepseek-ai/cordis": ">=4.1.0 <5",
79
+ "@deepseek-ai/dsh-llm": ">=0.0.1-rc.1 <1",
80
+ "@deepseek-ai/dsh-tools": ">=0.0.1-rc.1 <1"
81
+ },
82
+ "dependencies": {
83
+ "@deepseek-ai/schemastery": "^3.18.1-rc.1"
84
+ },
85
+ "optionalDependencies": {
86
+ "node-edge-tts": "^1.2.12"
87
+ },
88
+ "devDependencies": {
89
+ "@deepseek-ai/cordis": "4.1.0",
90
+ "@deepseek-ai/dsh-llm": "0.0.1-rc.5",
91
+ "@deepseek-ai/dsh-tools": "0.0.1-rc.1",
92
+ "@types/node": "^24.0.0",
93
+ "semver": "^7.6.0",
94
+ "typescript": "^5.9.0"
95
+ }
6
96
  }