Skip to content

Commit 8f3215f

Browse files
authored
Adds audio clip documations. (#99)
1 parent a1f8283 commit 8f3215f

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

content/docs/server/headless.mdx

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ services:
111111
AvatarPassword: ""
112112
volumes:
113113
- Basis:/root/.config/unity3d/Basis Unity/Basis Unity # For Sharing Cached files. If running on Windows you should do it this way.
114-
- "${APPDATA}/../LocalLow/Basis Unity/Basis Unity:/root/.config/unity3d/Basis Unity/Basis Unity" # If you want to use your own cache and avatar files. Slower on Windows as its having the overhead from WSL2 *Corruption possible
115-
- ./config.xml:/app/HeadlessLinuxServer_Data/config.xml # Optional will be overridden when using environment variables
114+
#- "${APPDATA}/../LocalLow/Basis Unity/Basis Unity:/root/.config/unity3d/Basis Unity/Basis Unity" # If you want to use your own cache and avatar files. Slower on Windows as its having the overhead from WSL2 *Corruption possible
115+
#- ./config.xml:/app/HeadlessLinuxServer_Data/config.xml # Optional will be overridden when using environment variables
116116
healthcheck:
117117
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:10666/health"]
118118
interval: 30s
@@ -145,7 +145,7 @@ The examples above use the minimum values needed to connect:
145145
146146
| Variable | Purpose |
147147
|----------|---------|
148-
| `IP` | Hostname or IP address of the Basis server |
148+
| `Ip` | Hostname or IP address of the Basis server |
149149
| `Port` | UDP port the server listens on, usually `4296` |
150150
| `Password` | Server password required to join |
151151
| `HealthCheckEnabled` | Enable or Disable HealthCheckEndpoint |
@@ -154,9 +154,39 @@ The examples above use the minimum values needed to connect:
154154
| `HealthPath` | Path for Health info |
155155
| `AvatarFileLocation` | Combined URL support of avatar#base64 |
156156
| `AvatarPassword` | Avatar password |
157+
| `StrictMemoryCleanupEnabled` | Remove all textures that are loaded |
157158

158159
If you mount a `config.xml`, treat it as the file-based fallback configuration. If you also set environment variables, the docs for the main server note that environment values override xml values, so keep one source of truth where possible to avoid confusion during testing.
159160

161+
## Optional Voice Simulation with AudioClips
162+
163+
Headless clients can optionally simulate microphone traffic by streaming a `.wav` or `.opus` file as voice audio.
164+
165+
Basis checks the `AudioClips` folder inside the headless player's data directory during startup. If one or more files are present, the headless client randomly picks one file, loops it, Opus-encodes it, and sends it as normal voice traffic.
166+
167+
If the folder does not exist, Basis creates it. If the folder exists but contains no audio files, the headless client stays silent.
168+
169+
Non-48 kHz files are resampled automatically to mono `48 kHz`.
170+
171+
### Where to put the files
172+
173+
For a normal extracted build, place files in the headless data folder under:
174+
175+
- `AudioClips/`
176+
177+
For Docker, mount a folder into the player's data directory `AudioClips` folder.
178+
179+
Example for Linux headless:
180+
181+
```yml
182+
services:
183+
basis-headless:
184+
image: ghcr.io/basisvr/basis-headless:nightly-linux
185+
volumes:
186+
- ./AudioClips:/app/HeadlessLinuxServer_Data/AudioClips
187+
...
188+
```
189+
160190

161191
## Running at Scale
162192

0 commit comments

Comments
 (0)