Two small things:

- you got a tab here instead of 4-spaces
- traditionally we use `$record['extra']` or `$record['context']` for such things. Maybe it should read from these instead of from the sound key. First context.sound and if missing try extra.sound and if missing skip it.