# Announcements on Node

**URL:** <https://community.allstarlink.org/t/announcements-on-node/21619>\
**Category:** Archive\
**Created:** [August 10, 2024, 4:24pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619 "2024-08-10T16:24:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![k5gud](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/97f17d/32.png) [@k5gud](https://community.allstarlink.org/u/k5gud)\
**Post date:** [August 10, 2024, 4:24pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/1 "2024-08-10T16:24:28Z")

</div>

Is it possible to play a scheduled announcement on our local node, like meeting reminders, etc at a certain time of day or hour? If so how would one go about doing it? I’m very new to AllStar and am using HamVoip.  
Thanks

---

<div class="post-metadata">

**Author:** ![Alex\_Dominguez](https://community.allstarlink.org/user_avatar/community.allstarlink.org/alex_dominguez/32/2575_2.png) [@Alex\_Dominguez](https://community.allstarlink.org/u/Alex_Dominguez)\
**Post date:** [August 10, 2024, 8:32pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/2 "2024-08-10T20:32:20Z")

</div>

Yes, it is possible.  
I rather use a cron job than put them on the RPT schedule. Have had plenty of times when the RPT schedule would not work but the cron will always work.  
Probably I am talking Chinese to you by mentioning cron jobs as you said you were new to Allstar.

---

<div class="post-metadata">

**Author:** ![N0NB](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n0nb/32/1347_2.png) [@N0NB](https://community.allstarlink.org/u/N0NB)\
**Post date:** [August 11, 2024, 8:20pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/3 "2024-08-11T20:20:03Z")

</div>

Unless you have voice announcements already in the required format, you’ll want to follow the HamVOIP Text To Speech (TTS) guide:

> **[tts-how-to.pdf](https://www.hamvoip.org/howto/tts-how-to.pdf)**
>
> 101.30 KB

Then it is a matter of getting the `cron` daemon setup to run your announcement. To do so, select option 9 from the Admin menu to start a Bash shell. You should get a shell prompt with a `#` which tell you that you are logged in as “root” or the administrator account.

Type `crontab -l` and you’ll see several “jobs” already written in the file that have been printed to your screen. One of the jobs will probably look like this:

```auto
00 * * * * (source /usr/local/etc/allstar.env ; /usr/bin/nice -19 /usr/bin/perl /usr/local/sbin/saytime.pl $NODE1 > /dev/null)

```

That looks rather cryptic. The first thing to examine are the ‘00’ and four asterisks (you can see a reference manual (man page) of the _crontab_ syntax by typing `man 5 crontab`).

In the `cron` syntax the first field is the _minutes_ field. In this case the command should be run only with the minute of the system time is zero, i.e. the top of the hour. Sometimes you might see a \* in that field and that means ‘run this job every minute’, or _00-59_.

The second field is the _hours_. In this case the command will be run each hour, or _00-23_.

The third field is the _day of the month_. In this case the command will be run every day, or _1-31_ (odd syntax here as not every month has 31 days).

The fourth field is the _month_. In this case the command will be run every month, or _1-12_.

The fifth field is the _day of week_. In this case the command will be run every day of the week or _0-7_.

**Note:** The man page notes that names may be used for _month_ and _day of the week_.

The sixth field is the _command_ to be run.

Putting all of this together shows that this command will be run at the top of every hour of every day of every month regardless of the day of the week.

I wanted to have a TTS announcement run each Sunday from 8:30 AM to 8:30 PM. Once I had the audio file available I copied it to a directory I created for this purpose, `/etc/asterisk/local/announcements`. Then I used the `crontab -e` command which will open the `crontab` file in the default system editor for editing (when the file is saved and editor is closed, the `crontab` command will do some syntax checking and do what is needed so the `cron` daemon will have the new job(s) in its queue). I added this line:

```auto
30 08-20 * * 0 /usr/bin/asterisk -rx "rpt localplay 519320 /etc/asterisk/local/announcements/announcement_ares"

```

This job will be run at the 30th minute of the hours of 08 to 20 on Sundays during every month regardless of the calendar day.

I also wanted to run a club meeting announcement but only if the day was the third Thursday of the month. `cron` lets us choose a _day of the week_ but that will run on all Thursdays, for example. A bit of searching and I found a syntax that restricts the _day of the week_ field to just the third Thursday:

```auto
30 08-18 15-21 * * ["$(date '+\%a')" = "Thu"] && /usr/bin/asterisk -rx "rpt localplay 519320 /etc/asterisk/local/announcements/announcement_mcarc

```

Here the command will be run on the 30th minute during the hours of 08 to 18 when the calendar day is the 15 through the 21st AND the day of the week is a Thursday. However, the _day of the week_ field is not used! The command will actually be run during those hours on those calendar days, but the _test_ (the command and comparison in square brackets) and the shell AND comparision operator `&&` limits the actual calling of the `/usr/bin/asterisk` to only if `date` returns that this is a Thursday. This is one way that shell command syntax may be used to get around a limitation in the `crontab` syntax.

This can be modified for another Thursday by adjusting the _day of month_ field. For example, this field value would be changed to `22-28` for the fourth Thursday. Other days of the week can be tested this way.

I’ll admit, this is a rather advanced topic and I tried to distill it to the minimum you need while providing an explanation.

A further note, the example lines I added will work on HamVOIP and ASL2. ASL3 requires the asterisk command line to be changed from `localplay` to `playback`.

---

<div class="post-metadata">

**Author:** ![N8EI](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n8ei/32/4254_2.png) [@N8EI](https://community.allstarlink.org/u/N8EI)\
**Post date:** [August 12, 2024, 11:44am UTC](https://community.allstarlink.org/t/announcements-on-node/21619/4 "2024-08-12T11:44:08Z")

</div>

The directions provided above that relate to the HamVOIP client are not relevant to ASL3.

There are three choices right now:

1. If it’s something supported by `asl-say` then use that with a systemd timer or a cron entry.

2. Create a `.ul` sound file and call it directly with an `asterisk -x 'rpt playback NODE FILE` out of cron.

3. Use the [GitHub - AllStarLink/asl3-tts: AllStarLink text to speech system](https://github.com/AllStarLink/asl3-tts) to “speak” the message you want. This tool is new and may contain bugs.

---

<div class="post-metadata">

**Author:** ![N0NB](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n0nb/32/1347_2.png) [@N0NB](https://community.allstarlink.org/u/N0NB)\
**Post date:** [August 14, 2024, 1:16pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/5 "2024-08-14T13:16:41Z")

</div>

Thanks for information on those options, Jason.

The OP is using HamVOIP, so I hope he has found my post helpful.

---

<div class="post-metadata">

**Author:** ![N0NB](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n0nb/32/1347_2.png) [@N0NB](https://community.allstarlink.org/u/N0NB)\
**Post date:** [September 8, 2024, 5:13pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/6 "2024-09-08T17:13:29Z")

</div>

I found that when using asl3-tts that to speak a letter group like ARES that adding a hyphen between each letter, i.e., A-R-E-S, speaks each letter individually. I had tried commas but the pause was just too long.

I am creating the speech file(s) and saving them for use on multiple repeaters. Thanks!

---

<div class="post-metadata">

**Author:** ![N2DYI](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n2dyi/32/1712_2.png) [@N2DYI](https://community.allstarlink.org/u/N2DYI)\
**Post date:** [September 8, 2024, 6:27pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/7 "2024-09-08T18:27:08Z")

</div>

Coming from someone who uses speech/TTS/screen readers every day, I will also say that you’ll usually get best results when letters are upper case and separated like that, but this depends on the voice and/or the engine used. The letter a, for example, often gets pronounced as “uh” in lower case. Some combinations still kind of run together, depending on the engine.  
On my ASL nodes, I also have DECtalk installed, and I wrote a script that kind of works the same way asl-tts does, where it directly feeds the node with whatever you type to it. This is not a natural sounding voice, per se, but I can directly enter phonemes to get pronunciation and inflection exactly the way I want it. I’m very picky.

---

<div class="post-metadata">

**Author:** ![N0NB](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n0nb/32/1347_2.png) [@N0NB](https://community.allstarlink.org/u/N0NB)\
**Post date:** [September 8, 2024, 11:17pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/8 "2024-09-08T23:17:52Z")

</div>

Good tips.

I do have A-R-E-S in caps and have three additional voices installed, all en\_US, they are hfc-female, kathleen, kristin, and the default amy. Of the four amy seems to slur its way through A-R-E-S the worst but it still understandable to me what is meant. It’s no worse than rock singers!

The voices sound much more natural than another TTS I used. Thanks to Jason for putting this together for ASL3.

---

<div class="post-metadata">

**Author:** ![N2DYI](https://community.allstarlink.org/user_avatar/community.allstarlink.org/n2dyi/32/1712_2.png) [@N2DYI](https://community.allstarlink.org/u/N2DYI)\
**Post date:** [September 9, 2024, 8:56pm UTC](https://community.allstarlink.org/t/announcements-on-node/21619/9 "2024-09-09T20:56:59Z")

</div>

I just wanted to make folks aware of this project in development, which is slimmer than Piper, and more responsive on slower systems, like Raspberry Pi. May be worth looking into as a substitute for it’s small footprint for future versions of asl3-tts. New models are being trained for it. These models are 24 kHz sampling rate.

> **[ospeech](https://pypi.org/project/ospeech/)**
>
> Minimum dependency inference library for OptiSpeech TTS models
