Create say-out-loud skill: chime, built-in speakers, sets volume, speaks answer
This commit is contained in:
23
skills/say-out-loud/SKILL.md
Normal file
23
skills/say-out-loud/SKILL.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# SKILL.md - Say Out Loud
|
||||
|
||||
## Purpose
|
||||
Announce messages out loud through the Mac mini’s 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)
|
||||
20
skills/say-out-loud/say_out_loud.sh
Executable file
20
skills/say-out-loud/say_out_loud.sh
Executable 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"
|
||||
Reference in New Issue
Block a user