Setup-sound generator scripts
Use these commands to exchange a VK token for a fresh provisioning xToken and generate a Capsula Mini setup WAV. The scripts contact VK directly, then encode audio locally with the native-validated ADSSS implementation. To generate from a manually supplied xToken instead, use the standalone browser setup-sound generator.
Downloads and prerequisites
Download the complete portable ZIP and extract it. It contains both wrappers, the shared encoder, all ADSSS modules, and the stock reference PCM at their required relative paths. Node.js 18 or newer is the only runtime dependency.
Individual files are also available for repository users:
- PowerShell script — Windows PowerShell 5.1+ or PowerShell 7+
- Bash script — Linux, macOS, or WSL
- Shared encoder — required beside either wrapper
Keep individual downloads in the same directory and preserve the repository's docs/assets/adsss/ modules and reference.pcm beside it. The ZIP already has this layout.
The VK input can be either:
- a raw VK OAuth access token; or
- the full
blank.htmlredirect URL containingaccess_tokenand, optionally,user_id.
When user_id is absent, the script calls api.vk.com/method/users.get. It then calls registration/by_vk, registration/get_session, and account/create_xtoken at vc.go.mail.ru.
PowerShell
From the repository root:
& .\scripts\New-CapsulaSetupSound.ps1 `
-VkToken 'https://oauth.vk.com/blank.html#access_token=YOUR_TOKEN&user_id=YOUR_ID' `
-Ssid 'YourWiFi' `
-Psk 'YourPassword' `
-OutputPath .\capsula-setup.wav
A raw token works too:
& .\scripts\New-CapsulaSetupSound.ps1 -VkToken 'YOUR_TOKEN' -Ssid 'YourWiFi' -Psk 'YourPassword'
Optional parameters: -Country RU, -AccountId ID, -Timezone Europe/Moscow. -Psk may be empty for an open network. -OutputPath defaults to capsula-setup.wav in the current directory.
Bash
From the repository root:
bash scripts/new-capsula-setup-sound.sh \
--output capsula-setup.wav \
'https://oauth.vk.com/blank.html#access_token=YOUR_TOKEN&user_id=YOUR_ID' \
'YourWiFi' \
'YourPassword'
Or use the executable bit directly after chmod +x scripts/new-capsula-setup-sound.sh. Quote the redirect URL: it contains & characters.
Optional flags: --cc RU, --account-id ID, --timezone ZONE, --output FILE (or -o). The Wi-Fi password positional argument may be omitted for an open network.
On WSL, install Node.js 18+ or point CAPSULA_NODE at a Windows node.exe; the wrapper uses wslpath for the encoder and output paths:
CAPSULA_NODE=/mnt/c/path/to/node.exe bash scripts/new-capsula-setup-sound.sh 'YOUR_TOKEN' 'YourWiFi' 'YourPassword'
Output and privacy
The result is a 10.1-second, 16 kHz mono IEEE-float WAV. Play it near the Mini while it is in pairing mode, or transfer it to a phone for playback.
- A new VK session and xToken are created on every run.
- Session credentials and Wi-Fi details are held only in process memory; the scripts write no session JSON.
- Tokens and passwords are not printed or placed in child-process command-line arguments.
- The WAV contains your Wi-Fi credentials and short-lived xToken. Treat it as a secret and delete it after use.
- Generate a fresh WAV instead of replaying one indefinitely; xToken expiry is server-enforced.