44 lines
1.4 KiB
Markdown
44 lines
1.4 KiB
Markdown
# Greeting audio asset
|
|
|
|
GoWelcome plays a single greeting clip when it reaches the `GREET` state.
|
|
|
|
## What to drop here
|
|
|
|
Put your greeting file at:
|
|
|
|
assets/greeting.wav
|
|
|
|
(This path is the default `config.GreetConfig.wav_path`; override at runtime
|
|
with `--wav /path/to/other.wav`.)
|
|
|
|
## Required format
|
|
|
|
For maximum compatibility across the host audio backends (`simpleaudio` and the
|
|
`aplay` fallback) and the experimental Go2 `audiohub` path, the clip should be:
|
|
|
|
- **WAV / PCM** container
|
|
- **16 kHz** sample rate
|
|
- **mono** (1 channel)
|
|
- **16-bit** signed little-endian samples (`pcm_s16le`)
|
|
|
|
## Converting an existing file
|
|
|
|
Use `ffmpeg` to convert any source audio (mp3, m4a, a stereo/48 kHz wav, ...)
|
|
into the expected format:
|
|
|
|
ffmpeg -i your_source.mp3 -ar 16000 -ac 1 -c:a pcm_s16le assets/greeting.wav
|
|
|
|
Breakdown:
|
|
- `-ar 16000` -> resample to 16 kHz
|
|
- `-ac 1` -> downmix to mono
|
|
- `-c:a pcm_s16le` -> 16-bit signed little-endian PCM
|
|
|
|
## Notes
|
|
|
|
- This file (`greeting.README.md`) is documentation only and is never played.
|
|
- `greeting.wav` itself is intentionally **not** committed; add your own.
|
|
- If `greeting.wav` is missing, the audio backend logs a warning and the greet
|
|
proceeds without sound (gestures still run) -- it never crashes the loop.
|
|
- Keep the clip short (a few seconds); `GreetConfig.gesture_gap` /
|
|
`GreetConfig.cooldown` govern timing around it.
|