@goodandready/dsh-tts 0.3.23 → 0.4.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 +12 -12
- package/README.ru.md +13 -10
- package/README.zh.md +10 -10
- package/lib/cache.js +4 -5
- package/lib/client.js +69 -81
- package/lib/engines/f5.js +45 -33
- package/lib/engines/kokoro.js +21 -29
- package/lib/engines/types.js +26 -13
- package/lib/http-util.js +27 -0
- package/lib/index.js +41 -455
- package/lib/providers.js +29 -18
- package/lib/routes.js +400 -0
- package/lib/stream-hub.js +31 -0
- package/lib/text.js +19 -19
- package/package.json +5 -2
- package/scripts/f5_daemon.py +40 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""F5-TTS control stub.
|
|
3
|
+
|
|
4
|
+
Honest status only: ping answers when this script can run. It does not
|
|
5
|
+
synthesize audio. Real F5 inference is out of scope for this package until a
|
|
6
|
+
supported external runtime is documented and wired.
|
|
7
|
+
"""
|
|
8
|
+
import sys
|
|
9
|
+
import json
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
if len(sys.argv) > 1 and sys.argv[1] == '--ping':
|
|
14
|
+
print(json.dumps({"ok": True, "status": "ready", "synthesize": False}))
|
|
15
|
+
sys.exit(0)
|
|
16
|
+
|
|
17
|
+
for line in sys.stdin:
|
|
18
|
+
line = line.strip()
|
|
19
|
+
if not line:
|
|
20
|
+
continue
|
|
21
|
+
try:
|
|
22
|
+
req = json.loads(line)
|
|
23
|
+
cmd = req.get("cmd")
|
|
24
|
+
if cmd == "ping":
|
|
25
|
+
print(json.dumps({"ok": True, "status": "pong", "synthesize": False}))
|
|
26
|
+
elif cmd == "synthesize":
|
|
27
|
+
print(json.dumps({
|
|
28
|
+
"ok": False,
|
|
29
|
+
"error": "F5 synthesis is not bundled; use Edge/Piper/eSpeak offline providers",
|
|
30
|
+
}))
|
|
31
|
+
else:
|
|
32
|
+
print(json.dumps({"ok": False, "error": f"unknown cmd: {cmd}"}))
|
|
33
|
+
sys.stdout.flush()
|
|
34
|
+
except Exception as e:
|
|
35
|
+
print(json.dumps({"ok": False, "error": str(e)}))
|
|
36
|
+
sys.stdout.flush()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if __name__ == "__main__":
|
|
40
|
+
main()
|