@leejungkiin/awkit 1.3.8 → 1.4.2
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/bin/awk.js +630 -52
- package/bin/claude-generators.js +122 -0
- package/core/AGENTS.md +54 -0
- package/core/CLAUDE.md +155 -0
- package/core/GEMINI.md +44 -9
- package/core/GEMINI.md.bak +126 -199
- package/package.json +1 -1
- package/skills/ai-sprite-maker/SKILL.md +81 -0
- package/skills/ai-sprite-maker/scripts/animate_sprite.py +102 -0
- package/skills/ai-sprite-maker/scripts/process_sprites.py +140 -0
- package/skills/awf-session-restore/SKILL.md +12 -2
- package/skills/brainstorm-agent/SKILL.md +11 -8
- package/skills/code-review/SKILL.md +21 -33
- package/skills/gitnexus/gitnexus-cli/SKILL.md +82 -0
- package/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/skills/gitnexus/gitnexus-guide/SKILL.md +64 -0
- package/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/skills/lucylab-tts/SKILL.md +64 -0
- package/skills/lucylab-tts/resources/voices_library.json +908 -0
- package/skills/lucylab-tts/scripts/.env +1 -0
- package/skills/lucylab-tts/scripts/lucylab_tts.py +506 -0
- package/skills/nm-memory-sync/SKILL.md +14 -1
- package/skills/orchestrator/SKILL.md +5 -38
- package/skills/ship-to-code/SKILL.md +115 -0
- package/skills/short-maker/SKILL.md +150 -0
- package/skills/short-maker/_backup/storyboard.html +106 -0
- package/skills/short-maker/_backup/video_mixer.py +296 -0
- package/skills/short-maker/outputs/fitbite-promo/background.jpg +0 -0
- package/skills/short-maker/outputs/fitbite-promo/final/promo-final.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/script.md +19 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-01.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-02.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-03.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-04.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-01.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-02.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-03.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-04.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard.html +133 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard.json +38 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/merged_chroma.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/merged_crossfaded.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_00.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_01.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_02.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_03.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/manifest.json +31 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-01.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-02.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-03.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-04.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts_script.txt +11 -0
- package/skills/short-maker/scripts/google-flow-cli/.project-identity +41 -0
- package/skills/short-maker/scripts/google-flow-cli/.trae/rules/project_rules.md +52 -0
- package/skills/short-maker/scripts/google-flow-cli/CODEBASE.md +67 -0
- package/skills/short-maker/scripts/google-flow-cli/GoogleFlowCli.code-workspace +29 -0
- package/skills/short-maker/scripts/google-flow-cli/README.md +168 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/PROJECT.md +12 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/REQUIREMENTS.md +22 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/ROADMAP.md +16 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/TECH-SPEC.md +13 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/__init__.py +3 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/__init__.py +19 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/client.py +1921 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/models.py +64 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/rpc_ids.py +98 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/__init__.py +15 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/browser_auth.py +692 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/humanizer.py +417 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/proxy_ext.py +120 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/recaptcha.py +482 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/__init__.py +5 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/client.py +414 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/cli/__init__.py +1 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/cli/main.py +1075 -0
- package/skills/short-maker/scripts/google-flow-cli/pyproject.toml +36 -0
- package/skills/short-maker/scripts/google-flow-cli/script.txt +22 -0
- package/skills/short-maker/scripts/google-flow-cli/tests/__init__.py +0 -0
- package/skills/short-maker/scripts/google-flow-cli/tests/test_batchexecute.py +113 -0
- package/skills/short-maker/scripts/google-flow-cli/tests/test_client.py +190 -0
- package/skills/short-maker/templates/aida_script.md +40 -0
- package/skills/short-maker/templates/mimic_analyzer.md +29 -0
- package/skills/single-flow-task-execution/SKILL.md +412 -0
- package/skills/single-flow-task-execution/code-quality-reviewer-prompt.md +20 -0
- package/skills/single-flow-task-execution/implementer-prompt.md +78 -0
- package/skills/single-flow-task-execution/spec-reviewer-prompt.md +61 -0
- package/skills/skill-creator/SKILL.md +44 -0
- package/skills/spm-build-analysis/SKILL.md +92 -0
- package/skills/spm-build-analysis/references/build-optimization-sources.md +155 -0
- package/skills/spm-build-analysis/references/recommendation-format.md +85 -0
- package/skills/spm-build-analysis/references/spm-analysis-checks.md +105 -0
- package/skills/spm-build-analysis/scripts/check_spm_pins.py +118 -0
- package/skills/symphony-enforcer/SKILL.md +83 -97
- package/skills/symphony-orchestrator/SKILL.md +1 -1
- package/skills/trello-sync/SKILL.md +52 -45
- package/skills/verification-gate/SKILL.md +13 -2
- package/skills/xcode-build-benchmark/SKILL.md +88 -0
- package/skills/xcode-build-benchmark/references/benchmark-artifacts.md +94 -0
- package/skills/xcode-build-benchmark/references/benchmarking-workflow.md +67 -0
- package/skills/xcode-build-benchmark/schemas/build-benchmark.schema.json +230 -0
- package/skills/xcode-build-benchmark/scripts/benchmark_builds.py +308 -0
- package/skills/xcode-build-fixer/SKILL.md +218 -0
- package/skills/xcode-build-fixer/references/build-settings-best-practices.md +216 -0
- package/skills/xcode-build-fixer/references/fix-patterns.md +290 -0
- package/skills/xcode-build-fixer/references/recommendation-format.md +85 -0
- package/skills/xcode-build-fixer/scripts/benchmark_builds.py +308 -0
- package/skills/xcode-build-orchestrator/SKILL.md +156 -0
- package/skills/xcode-build-orchestrator/references/benchmark-artifacts.md +94 -0
- package/skills/xcode-build-orchestrator/references/build-settings-best-practices.md +216 -0
- package/skills/xcode-build-orchestrator/references/orchestration-report-template.md +143 -0
- package/skills/xcode-build-orchestrator/references/recommendation-format.md +85 -0
- package/skills/xcode-build-orchestrator/scripts/benchmark_builds.py +308 -0
- package/skills/xcode-build-orchestrator/scripts/diagnose_compilation.py +273 -0
- package/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py +533 -0
- package/skills/xcode-compilation-analyzer/SKILL.md +89 -0
- package/skills/xcode-compilation-analyzer/references/build-optimization-sources.md +155 -0
- package/skills/xcode-compilation-analyzer/references/code-compilation-checks.md +106 -0
- package/skills/xcode-compilation-analyzer/references/recommendation-format.md +85 -0
- package/skills/xcode-compilation-analyzer/scripts/diagnose_compilation.py +273 -0
- package/skills/xcode-project-analyzer/SKILL.md +76 -0
- package/skills/xcode-project-analyzer/references/build-optimization-sources.md +155 -0
- package/skills/xcode-project-analyzer/references/build-settings-best-practices.md +216 -0
- package/skills/xcode-project-analyzer/references/project-audit-checks.md +101 -0
- package/skills/xcode-project-analyzer/references/recommendation-format.md +85 -0
- package/templates/CODEBASE.md +26 -42
- package/templates/configs/trello-config.json +2 -2
- package/templates/workflow_dual_mode_template.md +5 -5
- package/workflows/_uncategorized/conductor-codex.md +125 -0
- package/workflows/_uncategorized/conductor.md +97 -0
- package/workflows/_uncategorized/ship-to-code.md +85 -0
- package/workflows/_uncategorized/trello-sync.md +52 -0
- package/workflows/context/codebase-sync.md +10 -87
- package/workflows/quality/visual-debug.md +66 -12
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-impact-analysis
|
|
3
|
+
description: "Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Impact Analysis with GitNexus
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- "Is it safe to change this function?"
|
|
11
|
+
- "What will break if I modify X?"
|
|
12
|
+
- "Show me the blast radius"
|
|
13
|
+
- "Who uses this code?"
|
|
14
|
+
- Before making non-trivial code changes
|
|
15
|
+
- Before committing — to understand what your changes affect
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
|
|
21
|
+
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
|
|
22
|
+
3. gitnexus_detect_changes() → Map current git changes to affected flows
|
|
23
|
+
4. Assess risk and report to user
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
27
|
+
|
|
28
|
+
## Checklist
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
|
|
32
|
+
- [ ] Review d=1 items first (these WILL BREAK)
|
|
33
|
+
- [ ] Check high-confidence (>0.8) dependencies
|
|
34
|
+
- [ ] READ processes to check affected execution flows
|
|
35
|
+
- [ ] gitnexus_detect_changes() for pre-commit check
|
|
36
|
+
- [ ] Assess risk level and report to user
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Understanding Output
|
|
40
|
+
|
|
41
|
+
| Depth | Risk Level | Meaning |
|
|
42
|
+
| ----- | ---------------- | ------------------------ |
|
|
43
|
+
| d=1 | **WILL BREAK** | Direct callers/importers |
|
|
44
|
+
| d=2 | LIKELY AFFECTED | Indirect dependencies |
|
|
45
|
+
| d=3 | MAY NEED TESTING | Transitive effects |
|
|
46
|
+
|
|
47
|
+
## Risk Assessment
|
|
48
|
+
|
|
49
|
+
| Affected | Risk |
|
|
50
|
+
| ------------------------------ | -------- |
|
|
51
|
+
| <5 symbols, few processes | LOW |
|
|
52
|
+
| 5-15 symbols, 2-5 processes | MEDIUM |
|
|
53
|
+
| >15 symbols or many processes | HIGH |
|
|
54
|
+
| Critical path (auth, payments) | CRITICAL |
|
|
55
|
+
|
|
56
|
+
## Tools
|
|
57
|
+
|
|
58
|
+
**gitnexus_impact** — the primary tool for symbol blast radius:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
gitnexus_impact({
|
|
62
|
+
target: "validateUser",
|
|
63
|
+
direction: "upstream",
|
|
64
|
+
minConfidence: 0.8,
|
|
65
|
+
maxDepth: 3
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
→ d=1 (WILL BREAK):
|
|
69
|
+
- loginHandler (src/auth/login.ts:42) [CALLS, 100%]
|
|
70
|
+
- apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
|
|
71
|
+
|
|
72
|
+
→ d=2 (LIKELY AFFECTED):
|
|
73
|
+
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**gitnexus_detect_changes** — git-diff based impact analysis:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
gitnexus_detect_changes({scope: "staged"})
|
|
80
|
+
|
|
81
|
+
→ Changed: 5 symbols in 3 files
|
|
82
|
+
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
|
|
83
|
+
→ Risk: MEDIUM
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Example: "What breaks if I change validateUser?"
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
1. gitnexus_impact({target: "validateUser", direction: "upstream"})
|
|
90
|
+
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
|
|
91
|
+
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
|
|
92
|
+
|
|
93
|
+
2. READ gitnexus://repo/my-app/processes
|
|
94
|
+
→ LoginFlow and TokenRefresh touch validateUser
|
|
95
|
+
|
|
96
|
+
3. Risk: 2 direct callers, 2 processes = MEDIUM
|
|
97
|
+
```
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitnexus-refactoring
|
|
3
|
+
description: "Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: \"Rename this function\", \"Extract this into a module\", \"Refactor this class\", \"Move this to a separate file\""
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Refactoring with GitNexus
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
|
|
10
|
+
- "Rename this function safely"
|
|
11
|
+
- "Extract this into a module"
|
|
12
|
+
- "Split this service"
|
|
13
|
+
- "Move this to a new file"
|
|
14
|
+
- Any task involving renaming, extracting, splitting, or restructuring code
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
1. gitnexus_impact({target: "X", direction: "upstream"}) → Map all dependents
|
|
20
|
+
2. gitnexus_query({query: "X"}) → Find execution flows involving X
|
|
21
|
+
3. gitnexus_context({name: "X"}) → See all incoming/outgoing refs
|
|
22
|
+
4. Plan update order: interfaces → implementations → callers → tests
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
|
|
26
|
+
|
|
27
|
+
## Checklists
|
|
28
|
+
|
|
29
|
+
### Rename Symbol
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
- [ ] gitnexus_rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits
|
|
33
|
+
- [ ] Review graph edits (high confidence) and ast_search edits (review carefully)
|
|
34
|
+
- [ ] If satisfied: gitnexus_rename({..., dry_run: false}) — apply edits
|
|
35
|
+
- [ ] gitnexus_detect_changes() — verify only expected files changed
|
|
36
|
+
- [ ] Run tests for affected processes
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Extract Module
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
- [ ] gitnexus_context({name: target}) — see all incoming/outgoing refs
|
|
43
|
+
- [ ] gitnexus_impact({target, direction: "upstream"}) — find all external callers
|
|
44
|
+
- [ ] Define new module interface
|
|
45
|
+
- [ ] Extract code, update imports
|
|
46
|
+
- [ ] gitnexus_detect_changes() — verify affected scope
|
|
47
|
+
- [ ] Run tests for affected processes
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Split Function/Service
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
- [ ] gitnexus_context({name: target}) — understand all callees
|
|
54
|
+
- [ ] Group callees by responsibility
|
|
55
|
+
- [ ] gitnexus_impact({target, direction: "upstream"}) — map callers to update
|
|
56
|
+
- [ ] Create new functions/services
|
|
57
|
+
- [ ] Update callers
|
|
58
|
+
- [ ] gitnexus_detect_changes() — verify affected scope
|
|
59
|
+
- [ ] Run tests for affected processes
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Tools
|
|
63
|
+
|
|
64
|
+
**gitnexus_rename** — automated multi-file rename:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
|
|
68
|
+
→ 12 edits across 8 files
|
|
69
|
+
→ 10 graph edits (high confidence), 2 ast_search edits (review)
|
|
70
|
+
→ Changes: [{file_path, edits: [{line, old_text, new_text, confidence}]}]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**gitnexus_impact** — map all dependents first:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
gitnexus_impact({target: "validateUser", direction: "upstream"})
|
|
77
|
+
→ d=1: loginHandler, apiMiddleware, testUtils
|
|
78
|
+
→ Affected Processes: LoginFlow, TokenRefresh
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**gitnexus_detect_changes** — verify your changes after refactoring:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
gitnexus_detect_changes({scope: "all"})
|
|
85
|
+
→ Changed: 8 files, 12 symbols
|
|
86
|
+
→ Affected processes: LoginFlow, TokenRefresh
|
|
87
|
+
→ Risk: MEDIUM
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**gitnexus_cypher** — custom reference queries:
|
|
91
|
+
|
|
92
|
+
```cypher
|
|
93
|
+
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
|
|
94
|
+
RETURN caller.name, caller.filePath ORDER BY caller.filePath
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Risk Rules
|
|
98
|
+
|
|
99
|
+
| Risk Factor | Mitigation |
|
|
100
|
+
| ------------------- | ----------------------------------------- |
|
|
101
|
+
| Many callers (>5) | Use gitnexus_rename for automated updates |
|
|
102
|
+
| Cross-area refs | Use detect_changes after to verify scope |
|
|
103
|
+
| String/dynamic refs | gitnexus_query to find them |
|
|
104
|
+
| External/public API | Version and deprecate properly |
|
|
105
|
+
|
|
106
|
+
## Example: Rename `validateUser` to `authenticateUser`
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
1. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
|
|
110
|
+
→ 12 edits: 10 graph (safe), 2 ast_search (review)
|
|
111
|
+
→ Files: validator.ts, login.ts, middleware.ts, config.json...
|
|
112
|
+
|
|
113
|
+
2. Review ast_search edits (config.json: dynamic reference!)
|
|
114
|
+
|
|
115
|
+
3. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
|
|
116
|
+
→ Applied 12 edits across 8 files
|
|
117
|
+
|
|
118
|
+
4. gitnexus_detect_changes({scope: "all"})
|
|
119
|
+
→ Affected: LoginFlow, TokenRefresh
|
|
120
|
+
→ Risk: MEDIUM — run tests for these flows
|
|
121
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lucylab-tts
|
|
3
|
+
description: |
|
|
4
|
+
Công cụ tạo Text-to-Speech (TTS) sử dụng API của LucyLab với nhiều giọng đọc khác nhau.
|
|
5
|
+
Hỗ trợ tạo giọng đọc từ kịch bản có sẵn, quản lý voice library và xuất file âm thanh chất lượng cao.
|
|
6
|
+
metadata:
|
|
7
|
+
stage: workflow
|
|
8
|
+
version: "1.0"
|
|
9
|
+
requires: "python3, requests"
|
|
10
|
+
tags: [tts, lucylab, voice, audio, text-to-speech]
|
|
11
|
+
trigger: explicit
|
|
12
|
+
activation_keywords:
|
|
13
|
+
- "/lucylab"
|
|
14
|
+
- "/tts"
|
|
15
|
+
- "chuyển văn bản thành giọng nói"
|
|
16
|
+
- "tạo giọng đọc"
|
|
17
|
+
- "đọc script"
|
|
18
|
+
- "tạo tts"
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# 🎙️ LucyLab TTS (Text-to-Speech Generator)
|
|
22
|
+
|
|
23
|
+
> **Mục tiêu**: Tự động hóa quá trình tạo giọng đọc (Voiceover) từ văn bản hoặc kịch bản phân cảnh (Scenes) bằng API của LucyLab, hỗ trợ nhiều giọng đọc vùng miền và giới tính khác nhau. Được tách ra thành skill độc lập để dễ dàng gọi từ các workflow khác (ví dụ: short-maker).
|
|
24
|
+
|
|
25
|
+
## 📡 Chế độ hoạt động (Triggers)
|
|
26
|
+
|
|
27
|
+
- **Plain Text Mode**: Nhập một đoạn văn bản (text), Tool sẽ dùng một giọng mặc định để đọc toàn bộ.
|
|
28
|
+
- **Script Scenes Mode**: Nhập kịch bản phân cảnh (SCENE 1, SCENE 2,...). Tool sẽ tự động phân tách từng câu thoại của mỗi cảnh và gọi LucyLab API để tạo các file lẻ. Rất phù hợp với quá trình tạo video tự động (Short Maker).
|
|
29
|
+
|
|
30
|
+
## 🧱 Quy trình hoạt động (Mandatory Flow)
|
|
31
|
+
|
|
32
|
+
0. **Giai đoạn Setup (Authentication)**: AI CẦN PHẢI KIỂM TRA QUYỀN TRUY CẬP TRƯỚC TIÊN:
|
|
33
|
+
- Quét file `.env` (tại thư mục làm việc hiện tại hoặc `~/.gemini/antigravity/.env`) tìm `LUCYLAB_BEARER`. Nếu KHÔNG TỒN TẠI, AI phải yêu cầu người dùng cung cấp API Key của LucyLab để lưu vào `.env`. Tuyệt đối không được chạy script trực tiếp để tránh lỗi do thiếu Authorization.
|
|
34
|
+
1. **Chuẩn bị Kịch bản**: Kịch bản cần được đưa vào file text (ví dụ: `script.txt`) chứa thoại, hoặc truyền trực tiếp chữ thông qua `--text`.
|
|
35
|
+
2. **Chọn Giọng đọc**: Dựa trên danh sách giọng trong `~/.gemini/antigravity/skills/lucylab-tts/resources/voices_library.json` hoặc truyền trực tiếp `--voice <id>`. Có các template phân nhóm: Nam/Nữ, miền Bắc/Nam.
|
|
36
|
+
3. **Thực thi Tạo Audio**:
|
|
37
|
+
- Tool kích hoạt script Python nằm trong: `~/.gemini/antigravity/skills/lucylab-tts/scripts/lucylab_tts.py`.
|
|
38
|
+
- Tool tự động lấy `LUCYLAB_BEARER` từ `.env` (hỗ trợ .env cục bộ hoặc ~/.gemini/antigravity/.env).
|
|
39
|
+
4. **Hậu kiểm Output**:
|
|
40
|
+
- Files MP3/WAV sẽ được lưu vào thư mục định sẵn (mặc định `outputs/tts-lucylab/<voice-slug>/`) với các file như `scene-01.mp3`, `scene-02.mp3`...
|
|
41
|
+
- Sẵn sàng dùng kết hợp với FFmpeg để ráp vào video.
|
|
42
|
+
|
|
43
|
+
## 💻 Cấu trúc lệnh (CLI Reference)
|
|
44
|
+
|
|
45
|
+
Để gọi engine TTS, bạn có thể thực thi lệnh thông qua bash:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Đọc một đoạn text đơn giản (không chia cảnh)
|
|
49
|
+
python ~/.gemini/antigravity/skills/lucylab-tts/scripts/lucylab_tts.py \
|
|
50
|
+
--text "Chào mừng bạn đến với hệ thống." \
|
|
51
|
+
--voice "12345:Giọng chuẩn" \
|
|
52
|
+
--mode plain \
|
|
53
|
+
--out-dir "outputs/sample"
|
|
54
|
+
|
|
55
|
+
# Đọc từ kịch bản chia cảnh, chọn nhiều giọng từ thư viện
|
|
56
|
+
python ~/.gemini/antigravity/skills/lucylab-tts/scripts/lucylab_tts.py \
|
|
57
|
+
--text-file "script.txt" \
|
|
58
|
+
--mode auto \
|
|
59
|
+
--voice-json "/Users/trungkientn/.gemini/antigravity/skills/lucylab-tts/resources/voices_library.json" \
|
|
60
|
+
--voices "Nam miền Bắc" \
|
|
61
|
+
--out-dir "outputs/tts"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
> ⚠️ **Lưu ý**: Chắc chắn rằng biến môi trường `LUCYLAB_BEARER` đã được cấu hình trong dự án hiện tại (`.env`) hoặc `~/.gemini/antigravity/skills/lucylab-tts/scripts/.env` để được phép Authentication.
|