#!/usr/bin/env bash

## Author: MeaTLoTioN
##   Date: 2022-08-21
##
## Pre-requisites;
## apt install mpg321
## apt install python3-pip
## apt install alsa-oss
## pip install gTTS
## copy modem1.mp3 along with announce4.sh into your mystic directory
##
## requires 1 argument, the username/handle
## optional 2nd argument -m to play a modem sound prior to caller info
##
## Suggested use:
##
## ╔════════════════════ Command Options ════════════════════╗
## ║                                                         ║
## ║ Command    │ (DD) Exec external program                 ║
## ║ Data       │ /path/to/announce4.sh %U                   ║
## ║ Access     │ !OI                                        ║
## ║ Grid Event │ Selected                                   ║
## ║                                                         ║
## ╚═════════════════════════════════════════════════════════╝

GTTS=`which gtts-cli`
mpg321 -o alsa -q /mystic/modem1.mp3 && $GTTS "New call from $1 on $(date)"|mpg321 -o alsa -q - && 2>/dev/null &
