agentvibes 5.1.4 → 5.2.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/.agentvibes/config.json +23 -13
- package/.claude/commands/agent-vibes/verbosity.md +98 -89
- package/.claude/config/audio-effects.cfg +4 -1
- package/.claude/hooks/bmad-speak.sh +2 -2
- package/.claude/hooks/piper-download-voices.sh +233 -225
- package/.claude/hooks/piper-installer.sh +1 -1
- package/.claude/hooks/piper-voice-manager.sh +125 -0
- package/.claude/hooks/play-tts-agentvibes-receiver-for-voiceless-connections.sh +97 -90
- package/.claude/hooks/play-tts-enhanced.sh +1 -1
- package/.claude/hooks/play-tts-piper.sh +16 -5
- package/.claude/hooks/play-tts-ssh-remote.sh +168 -167
- package/.claude/hooks/play-tts.sh +21 -9
- package/.claude/hooks/session-start-tts.sh +4 -1
- package/.claude/hooks/stop-tts.sh +1 -1
- package/.claude/hooks/verbosity-manager.sh +185 -178
- package/.claude/hooks-windows/download-extra-voices.ps1 +243 -185
- package/.claude/hooks-windows/play-tts-piper.ps1 +7 -2
- package/.claude/hooks-windows/play-tts.ps1 +7 -1
- package/.claude/hooks-windows/session-start-tts.ps1 +2 -1
- package/.claude/hooks-windows/verbosity-manager.ps1 +126 -119
- package/README.md +10 -2
- package/RELEASE_NOTES.md +36 -0
- package/bin/agentvibes-voice-browser.js +1939 -1840
- package/mcp-server/server.py +52 -9
- package/package.json +1 -1
- package/src/console/tabs/receiver-tab.js +1527 -1483
- package/src/console/tabs/settings-tab.js +2 -2
- package/src/console/tabs/setup-tab.js +53 -8
- package/src/console/tabs/voices-tab.js +130 -13
- package/src/i18n/en.js +202 -202
- package/src/services/verbosity-service.js +159 -157
- package/templates/agentvibes-receiver.sh +3 -2
|
@@ -1,185 +1,243 @@
|
|
|
1
|
-
#
|
|
2
|
-
# File: .claude/hooks-windows/download-extra-voices.ps1
|
|
3
|
-
#
|
|
4
|
-
# AgentVibes - Download Extra Piper Voice Models (Windows)
|
|
5
|
-
# Downloads custom high-quality voices from HuggingFace
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
param(
|
|
9
|
-
[switch]$yes
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
$AUTO_YES = $yes -or ($args -contains "--yes") -or ($args -contains "-y")
|
|
13
|
-
|
|
14
|
-
# Configuration
|
|
15
|
-
$VoiceDir = "$env:USERPROFILE\.claude\piper-voices"
|
|
16
|
-
$PiperExe = "$env:LOCALAPPDATA\Programs\Piper\piper.exe"
|
|
17
|
-
|
|
18
|
-
# HuggingFace repository for custom voices
|
|
19
|
-
$HuggingFaceRepo = "agentvibes/piper-custom-voices"
|
|
20
|
-
$HuggingFaceBaseUrl = "https://huggingface.co/$HuggingFaceRepo/resolve/main"
|
|
21
|
-
|
|
22
|
-
# Extra custom voices to download
|
|
23
|
-
$ExtraVoices = @(
|
|
24
|
-
@{
|
|
25
|
-
name = "kristin"
|
|
26
|
-
description = "Kristin (US English female, Public Domain, 64MB)"
|
|
27
|
-
sizeMB = 64
|
|
28
|
-
},
|
|
29
|
-
@{
|
|
30
|
-
name = "jenny"
|
|
31
|
-
description = "Jenny (UK English female with Irish accent, CC BY, 64MB)"
|
|
32
|
-
sizeMB = 64
|
|
33
|
-
},
|
|
34
|
-
@{
|
|
35
|
-
name = "16Speakers"
|
|
36
|
-
description = "Tracy/16Speakers (Multi-speaker: 12 US + 4 UK voices, Public Domain, 77MB)"
|
|
37
|
-
sizeMB = 77
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
Write-Host ""
|
|
42
|
-
Write-Host "AgentVibes Extra Voice Downloader" -ForegroundColor Cyan
|
|
43
|
-
Write-Host ("=" * 40) -ForegroundColor Cyan
|
|
44
|
-
Write-Host ""
|
|
45
|
-
Write-Host "This will download high-quality custom Piper voices from HuggingFace."
|
|
46
|
-
Write-Host ""
|
|
47
|
-
|
|
48
|
-
# Check if Piper is installed
|
|
49
|
-
if (-not (Test-Path $PiperExe)) {
|
|
50
|
-
Write-Host "[ERROR] Piper not found at: $PiperExe" -ForegroundColor Red
|
|
51
|
-
Write-Host "Run: .\setup-windows.ps1 to install Piper" -ForegroundColor Yellow
|
|
52
|
-
exit 1
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
# Create voice directory
|
|
56
|
-
if (-not (Test-Path $VoiceDir)) {
|
|
57
|
-
New-Item -ItemType Directory -Path $VoiceDir -Force | Out-Null
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
Write-Host "Voice directory: $VoiceDir" -ForegroundColor Gray
|
|
61
|
-
Write-Host ""
|
|
62
|
-
|
|
63
|
-
# Check status of each voice
|
|
64
|
-
$alreadyDownloaded = @()
|
|
65
|
-
$needDownload = @()
|
|
66
|
-
|
|
67
|
-
foreach ($voice in $ExtraVoices) {
|
|
68
|
-
$modelFile = "$VoiceDir\$($voice.name).onnx"
|
|
69
|
-
$configFile = "$VoiceDir\$($voice.name).onnx.json"
|
|
70
|
-
|
|
71
|
-
if ((Test-Path $modelFile) -and (Test-Path $configFile)) {
|
|
72
|
-
$alreadyDownloaded += $voice
|
|
73
|
-
} else {
|
|
74
|
-
$needDownload += $voice
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
Write-Host "Status:" -ForegroundColor Cyan
|
|
79
|
-
Write-Host " Already downloaded: $($alreadyDownloaded.Count) voice(s)"
|
|
80
|
-
Write-Host " Need to download: $($needDownload.Count) voice(s)"
|
|
81
|
-
Write-Host ""
|
|
82
|
-
|
|
83
|
-
if ($alreadyDownloaded.Count -gt 0) {
|
|
84
|
-
Write-Host "Already downloaded (skipped):" -ForegroundColor Green
|
|
85
|
-
foreach ($voice in $alreadyDownloaded) {
|
|
86
|
-
Write-Host " [OK] $($voice.description)" -ForegroundColor Green
|
|
87
|
-
}
|
|
88
|
-
Write-Host ""
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if ($needDownload.Count -eq 0) {
|
|
92
|
-
Write-Host "All extra voices already downloaded!" -ForegroundColor Green
|
|
93
|
-
exit 0
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
# Calculate total size
|
|
97
|
-
$totalSizeMB = ($needDownload | Measure-Object -Property sizeMB -Sum).Sum
|
|
98
|
-
|
|
99
|
-
Write-Host "Voices to download:" -ForegroundColor Yellow
|
|
100
|
-
foreach ($voice in $needDownload) {
|
|
101
|
-
Write-Host " - $($voice.description)"
|
|
102
|
-
}
|
|
103
|
-
Write-Host ""
|
|
104
|
-
Write-Host "Total download size: ~${totalSizeMB}MB" -ForegroundColor Yellow
|
|
105
|
-
Write-Host ""
|
|
106
|
-
|
|
107
|
-
# Confirm download
|
|
108
|
-
if (-not $AUTO_YES) {
|
|
109
|
-
$reply = Read-Host "Download $($needDownload.Count) extra voice(s)? [Y/n]"
|
|
110
|
-
if ($reply -and $reply -notmatch '^[Yy]') {
|
|
111
|
-
Write-Host "Download cancelled" -ForegroundColor Red
|
|
112
|
-
exit 0
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
Write-Host "Auto-downloading $($needDownload.Count) extra voice(s)..." -ForegroundColor Cyan
|
|
116
|
-
Write-Host ""
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
# Download each voice
|
|
120
|
-
$downloaded = 0
|
|
121
|
-
$failed = 0
|
|
122
|
-
|
|
123
|
-
foreach ($voice in $needDownload) {
|
|
124
|
-
$voiceName = $voice.name
|
|
125
|
-
Write-Host ""
|
|
126
|
-
Write-Host "Downloading: $($voice.description)..." -ForegroundColor Cyan
|
|
127
|
-
|
|
128
|
-
$modelUrl = "$HuggingFaceBaseUrl/$voiceName.onnx"
|
|
129
|
-
$jsonUrl = "$HuggingFaceBaseUrl/$voiceName.onnx.json"
|
|
130
|
-
$modelFile = "$VoiceDir\$voiceName.onnx"
|
|
131
|
-
$jsonFile = "$VoiceDir\$voiceName.onnx.json"
|
|
132
|
-
|
|
133
|
-
$success = $true
|
|
134
|
-
|
|
135
|
-
try {
|
|
136
|
-
Write-Host " Downloading model file..." -ForegroundColor Yellow
|
|
137
|
-
Invoke-WebRequest -Uri $modelUrl -OutFile $modelFile -ErrorAction Stop
|
|
138
|
-
|
|
139
|
-
Write-Host " Downloading config file..." -ForegroundColor Yellow
|
|
140
|
-
Invoke-WebRequest -Uri $jsonUrl -OutFile $jsonFile -ErrorAction Stop
|
|
141
|
-
|
|
142
|
-
$modelSize = [math]::Round((Get-Item $modelFile).Length / 1MB, 2)
|
|
143
|
-
Write-Host " [OK] Downloaded ($modelSize MB)" -ForegroundColor Green
|
|
144
|
-
}
|
|
145
|
-
catch {
|
|
146
|
-
Write-Host " [ERROR] Failed to download: $_" -ForegroundColor Red
|
|
147
|
-
$success = $false
|
|
148
|
-
# Clean up partial downloads
|
|
149
|
-
Remove-Item -Path $modelFile -ErrorAction SilentlyContinue
|
|
150
|
-
Remove-Item -Path $jsonFile -ErrorAction SilentlyContinue
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if ($success) {
|
|
154
|
-
$downloaded++
|
|
155
|
-
Write-Host " Successfully downloaded: $voiceName" -ForegroundColor Green
|
|
156
|
-
} else {
|
|
157
|
-
$failed++
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
if (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
1
|
+
#
|
|
2
|
+
# File: .claude/hooks-windows/download-extra-voices.ps1
|
|
3
|
+
#
|
|
4
|
+
# AgentVibes - Download Extra Piper Voice Models (Windows)
|
|
5
|
+
# Downloads custom high-quality voices from HuggingFace
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
param(
|
|
9
|
+
[switch]$yes
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
$AUTO_YES = $yes -or ($args -contains "--yes") -or ($args -contains "-y")
|
|
13
|
+
|
|
14
|
+
# Configuration
|
|
15
|
+
$VoiceDir = "$env:USERPROFILE\.claude\piper-voices"
|
|
16
|
+
$PiperExe = "$env:LOCALAPPDATA\Programs\Piper\piper.exe"
|
|
17
|
+
|
|
18
|
+
# HuggingFace repository for custom voices
|
|
19
|
+
$HuggingFaceRepo = "agentvibes/piper-custom-voices"
|
|
20
|
+
$HuggingFaceBaseUrl = "https://huggingface.co/$HuggingFaceRepo/resolve/main"
|
|
21
|
+
|
|
22
|
+
# Extra custom voices to download
|
|
23
|
+
$ExtraVoices = @(
|
|
24
|
+
@{
|
|
25
|
+
name = "kristin"
|
|
26
|
+
description = "Kristin (US English female, Public Domain, 64MB)"
|
|
27
|
+
sizeMB = 64
|
|
28
|
+
},
|
|
29
|
+
@{
|
|
30
|
+
name = "jenny"
|
|
31
|
+
description = "Jenny (UK English female with Irish accent, CC BY, 64MB)"
|
|
32
|
+
sizeMB = 64
|
|
33
|
+
},
|
|
34
|
+
@{
|
|
35
|
+
name = "16Speakers"
|
|
36
|
+
description = "Tracy/16Speakers (Multi-speaker: 12 US + 4 UK voices, Public Domain, 77MB)"
|
|
37
|
+
sizeMB = 77
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
Write-Host ""
|
|
42
|
+
Write-Host "AgentVibes Extra Voice Downloader" -ForegroundColor Cyan
|
|
43
|
+
Write-Host ("=" * 40) -ForegroundColor Cyan
|
|
44
|
+
Write-Host ""
|
|
45
|
+
Write-Host "This will download high-quality custom Piper voices from HuggingFace."
|
|
46
|
+
Write-Host ""
|
|
47
|
+
|
|
48
|
+
# Check if Piper is installed
|
|
49
|
+
if (-not (Test-Path $PiperExe)) {
|
|
50
|
+
Write-Host "[ERROR] Piper not found at: $PiperExe" -ForegroundColor Red
|
|
51
|
+
Write-Host "Run: .\setup-windows.ps1 to install Piper" -ForegroundColor Yellow
|
|
52
|
+
exit 1
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# Create voice directory
|
|
56
|
+
if (-not (Test-Path $VoiceDir)) {
|
|
57
|
+
New-Item -ItemType Directory -Path $VoiceDir -Force | Out-Null
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Write-Host "Voice directory: $VoiceDir" -ForegroundColor Gray
|
|
61
|
+
Write-Host ""
|
|
62
|
+
|
|
63
|
+
# Check status of each voice
|
|
64
|
+
$alreadyDownloaded = @()
|
|
65
|
+
$needDownload = @()
|
|
66
|
+
|
|
67
|
+
foreach ($voice in $ExtraVoices) {
|
|
68
|
+
$modelFile = "$VoiceDir\$($voice.name).onnx"
|
|
69
|
+
$configFile = "$VoiceDir\$($voice.name).onnx.json"
|
|
70
|
+
|
|
71
|
+
if ((Test-Path $modelFile) -and (Test-Path $configFile)) {
|
|
72
|
+
$alreadyDownloaded += $voice
|
|
73
|
+
} else {
|
|
74
|
+
$needDownload += $voice
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Write-Host "Status:" -ForegroundColor Cyan
|
|
79
|
+
Write-Host " Already downloaded: $($alreadyDownloaded.Count) voice(s)"
|
|
80
|
+
Write-Host " Need to download: $($needDownload.Count) voice(s)"
|
|
81
|
+
Write-Host ""
|
|
82
|
+
|
|
83
|
+
if ($alreadyDownloaded.Count -gt 0) {
|
|
84
|
+
Write-Host "Already downloaded (skipped):" -ForegroundColor Green
|
|
85
|
+
foreach ($voice in $alreadyDownloaded) {
|
|
86
|
+
Write-Host " [OK] $($voice.description)" -ForegroundColor Green
|
|
87
|
+
}
|
|
88
|
+
Write-Host ""
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if ($needDownload.Count -eq 0) {
|
|
92
|
+
Write-Host "All extra voices already downloaded!" -ForegroundColor Green
|
|
93
|
+
exit 0
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
# Calculate total size
|
|
97
|
+
$totalSizeMB = ($needDownload | Measure-Object -Property sizeMB -Sum).Sum
|
|
98
|
+
|
|
99
|
+
Write-Host "Voices to download:" -ForegroundColor Yellow
|
|
100
|
+
foreach ($voice in $needDownload) {
|
|
101
|
+
Write-Host " - $($voice.description)"
|
|
102
|
+
}
|
|
103
|
+
Write-Host ""
|
|
104
|
+
Write-Host "Total download size: ~${totalSizeMB}MB" -ForegroundColor Yellow
|
|
105
|
+
Write-Host ""
|
|
106
|
+
|
|
107
|
+
# Confirm download
|
|
108
|
+
if (-not $AUTO_YES) {
|
|
109
|
+
$reply = Read-Host "Download $($needDownload.Count) extra voice(s)? [Y/n]"
|
|
110
|
+
if ($reply -and $reply -notmatch '^[Yy]') {
|
|
111
|
+
Write-Host "Download cancelled" -ForegroundColor Red
|
|
112
|
+
exit 0
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
Write-Host "Auto-downloading $($needDownload.Count) extra voice(s)..." -ForegroundColor Cyan
|
|
116
|
+
Write-Host ""
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
# Download each voice
|
|
120
|
+
$downloaded = 0
|
|
121
|
+
$failed = 0
|
|
122
|
+
|
|
123
|
+
foreach ($voice in $needDownload) {
|
|
124
|
+
$voiceName = $voice.name
|
|
125
|
+
Write-Host ""
|
|
126
|
+
Write-Host "Downloading: $($voice.description)..." -ForegroundColor Cyan
|
|
127
|
+
|
|
128
|
+
$modelUrl = "$HuggingFaceBaseUrl/$voiceName.onnx"
|
|
129
|
+
$jsonUrl = "$HuggingFaceBaseUrl/$voiceName.onnx.json"
|
|
130
|
+
$modelFile = "$VoiceDir\$voiceName.onnx"
|
|
131
|
+
$jsonFile = "$VoiceDir\$voiceName.onnx.json"
|
|
132
|
+
|
|
133
|
+
$success = $true
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
Write-Host " Downloading model file..." -ForegroundColor Yellow
|
|
137
|
+
Invoke-WebRequest -Uri $modelUrl -OutFile $modelFile -ErrorAction Stop
|
|
138
|
+
|
|
139
|
+
Write-Host " Downloading config file..." -ForegroundColor Yellow
|
|
140
|
+
Invoke-WebRequest -Uri $jsonUrl -OutFile $jsonFile -ErrorAction Stop
|
|
141
|
+
|
|
142
|
+
$modelSize = [math]::Round((Get-Item $modelFile).Length / 1MB, 2)
|
|
143
|
+
Write-Host " [OK] Downloaded ($modelSize MB)" -ForegroundColor Green
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
Write-Host " [ERROR] Failed to download: $_" -ForegroundColor Red
|
|
147
|
+
$success = $false
|
|
148
|
+
# Clean up partial downloads
|
|
149
|
+
Remove-Item -Path $modelFile -ErrorAction SilentlyContinue
|
|
150
|
+
Remove-Item -Path $jsonFile -ErrorAction SilentlyContinue
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if ($success) {
|
|
154
|
+
$downloaded++
|
|
155
|
+
Write-Host " Successfully downloaded: $voiceName" -ForegroundColor Green
|
|
156
|
+
} else {
|
|
157
|
+
$failed++
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
# Patch LibriTTS speaker names for any libritts models (existing or just downloaded)
|
|
162
|
+
foreach ($voice in $ExtraVoices) {
|
|
163
|
+
$voiceName = $voice.name
|
|
164
|
+
$jsonFile = "$VoiceDir\$voiceName.onnx.json"
|
|
165
|
+
if ((Test-Path $jsonFile)) {
|
|
166
|
+
try {
|
|
167
|
+
$data = Get-Content $jsonFile -Raw | ConvertFrom-Json
|
|
168
|
+
$sidMap = $data.speaker_id_map
|
|
169
|
+
if ($sidMap -and ($data.num_speakers -gt 1)) {
|
|
170
|
+
# Check if already patched (first key doesn't start with 'p' + digits)
|
|
171
|
+
$firstKey = ($sidMap.PSObject.Properties | Select-Object -First 1).Name
|
|
172
|
+
if ($firstKey -match '^p\d+$') {
|
|
173
|
+
# Find voice-assignments.json
|
|
174
|
+
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
175
|
+
$ProjectRoot = Split-Path -Parent (Split-Path -Parent $ScriptDir)
|
|
176
|
+
$CatalogPath = Join-Path $ProjectRoot "voice-assignments.json"
|
|
177
|
+
if (-not (Test-Path $CatalogPath)) {
|
|
178
|
+
# Try npm global install location
|
|
179
|
+
$npmRoot = & npm root -g 2>$null
|
|
180
|
+
if ($npmRoot) {
|
|
181
|
+
$CatalogPath = Join-Path $npmRoot "agentvibes\voice-assignments.json"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (Test-Path $CatalogPath) {
|
|
185
|
+
$catalog = Get-Content $CatalogPath -Raw | ConvertFrom-Json
|
|
186
|
+
$speakers = $catalog.libritts_speakers
|
|
187
|
+
|
|
188
|
+
# Build reverse map: index -> p-name
|
|
189
|
+
$indexToP = @{}
|
|
190
|
+
foreach ($prop in $sidMap.PSObject.Properties) {
|
|
191
|
+
$indexToP[$prop.Value] = $prop.Name
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
# Rebuild with friendly names
|
|
195
|
+
$newMap = [ordered]@{}
|
|
196
|
+
foreach ($entry in $indexToP.GetEnumerator() | Sort-Object Key) {
|
|
197
|
+
$idx = [string]$entry.Key
|
|
198
|
+
$pname = $entry.Value
|
|
199
|
+
$friendly = $speakers.$idx.voice_name
|
|
200
|
+
if ($friendly) {
|
|
201
|
+
$newMap[$friendly] = [int]$idx
|
|
202
|
+
} else {
|
|
203
|
+
$newMap[$pname] = [int]$idx
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
$data.speaker_id_map = $newMap
|
|
208
|
+
$data | ConvertTo-Json -Depth 10 | Set-Content $jsonFile -Encoding UTF8
|
|
209
|
+
Write-Host " Patched LibriTTS speaker names to friendly names: $voiceName" -ForegroundColor Green
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
} catch {
|
|
214
|
+
# Non-fatal — patching is best-effort
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
Write-Host ""
|
|
220
|
+
Write-Host ("=" * 40) -ForegroundColor Cyan
|
|
221
|
+
Write-Host "Download Summary:" -ForegroundColor Cyan
|
|
222
|
+
Write-Host " Successfully downloaded: $downloaded" -ForegroundColor Green
|
|
223
|
+
if ($failed -gt 0) {
|
|
224
|
+
Write-Host " Failed: $failed" -ForegroundColor Red
|
|
225
|
+
}
|
|
226
|
+
Write-Host " Total extra voices available: $($alreadyDownloaded.Count + $downloaded)"
|
|
227
|
+
Write-Host ""
|
|
228
|
+
|
|
229
|
+
if ($downloaded -gt 0) {
|
|
230
|
+
Write-Host "Extra voices ready to use!" -ForegroundColor Green
|
|
231
|
+
Write-Host ""
|
|
232
|
+
Write-Host "Try them:"
|
|
233
|
+
Write-Host " /agent-vibes:provider switch piper"
|
|
234
|
+
Write-Host " /agent-vibes:switch kristin"
|
|
235
|
+
Write-Host " /agent-vibes:switch jenny"
|
|
236
|
+
Write-Host " /agent-vibes:switch 16Speakers"
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if ($downloaded -gt 0 -or $alreadyDownloaded.Count -gt 0) {
|
|
240
|
+
exit 0
|
|
241
|
+
} else {
|
|
242
|
+
exit 1
|
|
243
|
+
}
|
|
@@ -229,10 +229,15 @@ try {
|
|
|
229
229
|
Write-Host "[OK] Saved to: $AudioFile" -ForegroundColor Green
|
|
230
230
|
Write-Host "[VOICE] Voice used: $VoiceName (Piper)" -ForegroundColor Green
|
|
231
231
|
|
|
232
|
-
# Apply audio effects (reverb, background music) if processor script exists
|
|
232
|
+
# Apply audio effects (reverb, background music) if processor script exists.
|
|
233
|
+
# SKIP when AGENTVIBES_NO_PLAY is set — that means the parent play-tts.ps1
|
|
234
|
+
# will handle reverb/bg-music post-processing itself. Running audio-processor
|
|
235
|
+
# here AND letting the parent do its own effects causes double-processing:
|
|
236
|
+
# this creates .effected.wav which the parent ignores, then the parent applies
|
|
237
|
+
# effects to the original wav again.
|
|
233
238
|
$ProcessorScript = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) "audio-processor.ps1"
|
|
234
239
|
$ProcessedFile = $AudioFile
|
|
235
|
-
if (Test-Path $ProcessorScript) {
|
|
240
|
+
if (-not $env:AGENTVIBES_NO_PLAY -and (Test-Path $ProcessorScript)) {
|
|
236
241
|
# Lookup order: agent name → LLM key (from --llm) → default
|
|
237
242
|
$AgentName = if ($env:AGENTVIBES_AGENT_NAME) { $env:AGENTVIBES_AGENT_NAME } elseif ($env:AGENTVIBES_LLM_KEY) { $env:AGENTVIBES_LLM_KEY } else { "default" }
|
|
238
243
|
$EffectedFile = "$AudioFile.effected.wav"
|
|
@@ -553,7 +553,7 @@ if (($BgEnabled -or $HasReverb) -and $HasFfmpeg) {
|
|
|
553
553
|
if ($parts.Length -ge 3 -and $parts[2]) {
|
|
554
554
|
$trackName = $parts[2].Trim()
|
|
555
555
|
# Validate: filename only, no path separators or traversal
|
|
556
|
-
if ($trackName -match '^[a-zA-Z0-9_\-\.]+$') {
|
|
556
|
+
if ($trackName -match '^[a-zA-Z0-9_\-\. ]+$') {
|
|
557
557
|
$DefaultTrack = $trackName
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -635,3 +635,9 @@ if (($BgEnabled -or $HasReverb) -and $HasFfmpeg) {
|
|
|
635
635
|
} else {
|
|
636
636
|
Remove-Item env:AGENTVIBES_NO_PLAY -ErrorAction SilentlyContinue
|
|
637
637
|
}
|
|
638
|
+
|
|
639
|
+
# Explicit exit 0 so that $LASTEXITCODE from native commands (piper.exe,
|
|
640
|
+
# ffmpeg, sox, etc.) doesn't leak through as the process exit code.
|
|
641
|
+
# Without this, bash/Claude Code sees whatever random exit code the last
|
|
642
|
+
# native command returned (e.g. 127) and treats it as a TTS failure.
|
|
643
|
+
exit 0
|
|
@@ -56,6 +56,7 @@ $VerbositySection = switch ($Verbosity) {
|
|
|
56
56
|
"low" { "## Verbosity: LOW`n- Acknowledgment: Action only`n- Completion: Result + errors only`n- Skip: Reasoning, decisions" }
|
|
57
57
|
"medium" { "## Verbosity: MEDIUM`n- Acknowledgment: Action + key approach`n- Completion: Result + important decisions`n- Include: Major choices only" }
|
|
58
58
|
"high" { "## Verbosity: HIGH`n- Acknowledgment: Action + approach + why`n- Completion: Result + decisions + trade-offs`n- Include: Full reasoning, alternatives" }
|
|
59
|
+
"caveman" { "## Verbosity: CAVEMAN`n- Respond terse. All technical substance stays. Only fluff dies.`n- Drop: articles (a/an/the), filler (just/really/basically), pleasantries, hedging`n- Abbreviate: DB/auth/config/req/res/fn/impl. Use arrows (X -> Y). Strip conjunctions.`n- Fragments OK. Short synonyms. Technical terms exact. Code unchanged.`n- Pattern: [thing] [action] [reason]. [next step].`n- TTS: Ultra-short. Max 60 chars." }
|
|
59
60
|
default { "## Verbosity: LOW`n- Acknowledgment: Action only`n- Completion: Result + errors only" }
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -86,7 +87,7 @@ $VerbositySection
|
|
|
86
87
|
4. Keep under 150 chars
|
|
87
88
|
5. Always include errors
|
|
88
89
|
|
|
89
|
-
Quick Ref: low=action+result | medium=+key decisions | high=+full reasoning
|
|
90
|
+
Quick Ref: low=action+result | medium=+key decisions | high=+full reasoning | caveman=ultra-terse fragments
|
|
90
91
|
|
|
91
92
|
## BMAD Agent Voice Routing
|
|
92
93
|
If ``.bmad-agent-context`` exists, check its content:
|