Back to Hooks

Claudio Sound Effects

Notification

Adds delightful OS-native sounds to Claude Code events for audio feedback during tasks

audionotificationfeedbackproductivity

Hook Script

#!/bin/bash
# Claudio - Sound effects for Claude Code
# Plays OS-native sounds for different events

EVENT_TYPE="$1"

play_sound() {
  local sound_name="$1"

  # macOS
  if [[ "$OSTYPE" == "darwin"* ]]; then
    case "$sound_name" in
      "success") afplay /System/Library/Sounds/Glass.aiff ;;
      "error") afplay /System/Library/Sounds/Basso.aiff ;;
      "notification") afplay /System/Library/Sounds/Pop.aiff ;;
      *) afplay /System/Library/Sounds/Tink.aiff ;;
    esac
  fi

  # Linux (using paplay if available)
  if [[ "$OSTYPE" == "linux-gnu"* ]]; then
    if command -v paplay &> /dev/null; then
      case "$sound_name" in
        "success") paplay /usr/share/sounds/freedesktop/stereo/complete.oga 2>/dev/null ;;
        "error") paplay /usr/share/sounds/freedesktop/stereo/dialog-error.oga 2>/dev/null ;;
        "notification") paplay /usr/share/sounds/freedesktop/stereo/message.oga 2>/dev/null ;;
      esac
    fi
  fi
}

case "$EVENT_TYPE" in
  "task_complete") play_sound "success" ;;
  "error") play_sound "error" ;;
  *) play_sound "notification" ;;
esac

Settings Configuration

{
  "hooks": {
    "Notification": [
      {
        "command": "./hooks/claudio.sh"
      }
    ]
  }
}

How to use

  1. Create a hooks directory in your project: mkdir hooks
  2. Save the hook script as hooks/claudio.sh
  3. Make it executable: chmod +x hooks/claudio.sh
  4. Add the configuration to your Claude Code settings
  5. Restart Claude Code to apply changes