Create say-out-loud skill: chime, built-in speakers, sets volume, speaks answer

This commit is contained in:
Adolfo Reyna
2026-02-14 21:27:50 -05:00
parent d1676d11ef
commit 1b75c79179
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# SKILL.md - Say Out Loud
## Purpose
Announce messages out loud through the Mac minis built-in speakers. Plays a chime, sets volume to 80%, and uses the macOS default system voice. Triggers on phrases like “talk to us” or “say out loud.”
## Triggers
- “talk to us”
- “say out loud”
- “announce”
- or by explicit command in the interface
## How it works
- Sets output to built-in speakers (if available)
- Sets volume to 80%
- Plays the macOS "Glass" chime
- Speaks the full answer using the system's default voice (can be changed to Alex, David, etc. on request)
## Usage
Just say “talk to us” or any of the trigger phrases and Bro will say the next message out loud for everyone in the room.
---
Script: `say_out_loud.sh` (see alongside this file)

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# say_out_loud.sh
# Usage: ./say_out_loud.sh "message to say"
MESSAGE="$1"
# Set output to built-in speakers — comment this line if not needed
default_output="$(system_profiler SPAudioDataType | grep -B 5 'Built-in Output' | grep 'Device ID' | awk -F ": " '{print $2}' | head -n1)"
if [[ -n "$default_output" ]]; then
SwitchAudioSource -s "$default_output" 2>/dev/null
fi
# Set system volume to 80%
osascript -e 'set volume output volume 80'
# Play chime
afplay /System/Library/Sounds/Glass.aiff
# Speak the message (default voice)
say "$MESSAGE"