#!/bin/bash source pa-lib while [[ true ]]; do # waiting for the PSA text stream to start read pa-preheat pa-announcement pa-say "$REPLY" while read -t 4; do pa-say "$REPLY" done # no more text, terminate the PSA pa-announcement-quick pa-shutdown done