[RDD] Weather and Time Announcements

2020-12-24 Thread wa7skg
This station I am moving to Rivendell is currently running on a Windows 
system. They somehow download the local weather from a NOAA site and 
cull the local temperature from it. They have a Windows text-to-speech 
program that reads the .txt file with the temp and creates a short mp3 
file with the current temperature. They have a whole list of mp3 files 
covering temps from 0-115 degrees. They also have a bunch of time files 
with 0-12 hours, 0-59 minutes, and am/pm. I can't seem to find anything 
in the existing Windows computer that actually performs this function.


The previous engineer who set all this up basically evaporated leaving 
no documentation. The current staff knows it happens, but no idea how it 
works. I found the time and temp audio files and an exe text2speech app, 
but nothing else.



Is there anything in Rivendell or Linux I could use to provide this 
functionality?



--
73,
Michael WA7SKG

"Any day you do not learn one new thing is a wasted day."
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Weather and Time Announcements

2020-12-24 Thread Lorne Tyndale
Hi Michael,

For getting the Time part, one way that I looked at in the past (but
never implemented due to the work requried) is to record an audio cut
for each minute of the day.  To cut down on the amount of recording it
is possible to re-use the AM and PM recordings if you don't specify AM
or PM in the audio.  So for example, you could use the same audio for
saying "It's 12:42" for both 12:42 am and 12:42 pm, leaving it to the
listeners to figure out if it is AM or PM.

You'll want to make 2 carts, one for AM and one for PM, each with 720
cuts of audio representing each minute of that time block.  Daypart each
cut for the minute of time that it represents.

When you want the time of day to play on the air, just schedule the
appropriate cart (or both carts back to back).  It'll only play the cut
that is dayparted for that specific minute.

It takes a bunch of effort to get this type of thing set up, but once
set up it should just work.  Furthermore it is all internal to Rivendell
so if someone needs to figure it out in the future it should be fairly
straight forward to figure out.

Lorne Tyndale

> 
> This station I am moving to Rivendell is currently running on a Windows 
> system. They somehow download the local weather from a NOAA site and 
> cull the local temperature from it. They have a Windows text-to-speech 
> program that reads the .txt file with the temp and creates a short mp3 
> file with the current temperature. They have a whole list of mp3 files 
> covering temps from 0-115 degrees. They also have a bunch of time files 
> with 0-12 hours, 0-59 minutes, and am/pm. I can't seem to find anything 
> in the existing Windows computer that actually performs this function.
> 
> The previous engineer who set all this up basically evaporated leaving 
> no documentation. The current staff knows it happens, but no idea how it 
> works. I found the time and temp audio files and an exe text2speech app, 
> but nothing else.
> 
> 
> Is there anything in Rivendell or Linux I could use to provide this 
> functionality?
> 
> 
> -- 
> 73,
> Michael WA7SKG
> 
> "Any day you do not learn one new thing is a wasted day."
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Weather and Time Announcements

2020-12-24 Thread Lorne Tyndale
David,

> This is brilliant! It never even occurred to me to load all the time 
> cuts into a cart and then daypart each cut. Fabulous! Thanks for this!

Yup, the only reason I recommend doing 2 carts - one for AM and the
other for PM - is because there is a limit of 999 cuts per cart, so it
isn't possible to load the full 1440 cuts into a single cart.

Lorne Tyndale

___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Weather and Time Announcements

2020-12-24 Thread David Klann
Hi again Michael,

On 12/24/20 12:35 PM, you wrote about time & temp automation:
> 
> This station I am moving to Rivendell is currently running on a Windows
> system. They somehow download the local weather from a NOAA site and
> cull the local temperature from it. They have a Windows text-to-speech
> program that reads the .txt file with the temp and creates a short mp3
> file with the current temperature. They have a whole list of mp3 files
> covering temps from 0-115 degrees. They also have a bunch of time files
> with 0-12 hours, 0-59 minutes, and am/pm. I can't seem to find anything
> in the existing Windows computer that actually performs this function.
> 
> The previous engineer who set all this up basically evaporated leaving
> no documentation. The current staff knows it happens, but no idea how it
> works. I found the time and temp audio files and an exe text2speech app,
> but nothing else.
> 
> 
> Is there anything in Rivendell or Linux I could use to provide this
> functionality?
> 
> 

I recently wrote a ZSH shell script that might satisfy your desire to 
accomplish this. As you explain, this script requires all the "raw" 
audio files to previously exist (preferably in WAV format, but that's 
not a hard requirement).

My script is attached to this message, and is also available at 
https://github.com/opensourceradio/ram/blob/master/usr/local/bin/btd-time-temp

It uses a few ZSH-specific things, as well as ffmpeg(1) to concatenate 
multiple audio files together on the fly. And it uses xmlstarlet(1) to 
parse the output and extract the current temperature from the US 
National Weather Service current conditions XML feed. This command 
installs the basic requirements:

sudo yum install -y zsh ffmpeg xmlstarlet

Current(ish) FFMPEG packages are hosted at the Nux Dextop CentOS 
repository. More details at http://li.nux.ro/repos.html

Activate the script using your favorite timed job scheduler (e.g., cron, 
systemd, etc.). In order to be timely, I recommend running the script 
every minute, but you can adjust the frequency to match your scheduled 
"time and temp" Events in your logs. Since they are updated hourly, the 
script fetches the current conditions from the NWS only once per hour 
regardless of how often you run it.

Complete setup documentation is in the script comments. Usage 
documentation is available with "btd-time-temp --help".

Hope you find it useful!

   ~David Klann
broadcasttool.com
#!/bin/zsh
# shellcheck shell=bash disable=SC2016,SC2154,SC2162
# SC2016: The single quotes are inside a double-quoted string
# SC2154: I know about all the referenced but not assigned variables
# SC2162: I do not care about read and its backslashes

# This script complies with Semantic Versioning: http://semver.org/
vMajor=0
vMinor=2
vPatch=3
vHash='$Hash: 942035a$'

##
##
##
## rd-time-temp.sh
##
## Provide current time and temperature audio snippets to Rivendell.
##
## This script uses the current system time (please make sure the
## system time is synchronized to a working network time protocol
## (NTP) service) and the United States National Weather Service (NWS)
## (based on a pre-configured location) to import audio files into a
## specific audio Cart in the Rivendell Library.
##
## Audio files containing time readings can contain any meaningful
## sounds, and must be named using four digits like this: HHMM. You
## should at least provide audio files for every minute of every hour
## between midnight () and noon (1200). More "sophisiticated" time
## announcement files may include the "am" and "pm" suffixes (or
## simply "a" or "p") in order to differentiate the time of day.
##
## Similarly, audio files containing temperature readings are named
## for the numeric temperature. (There is no distinction between
## Farenheit and Celcius.) Temperature readings are retrieved using
## the NWS four character location codes (see
## https://w1.weather.gov/xml/current_obs/seek.php?Find=Find for the
## state-by-state lists of locations). This script uses the XML file,
## not the RSS file. The URL is formed using the four-character code
## inserted into this string (substituting for ""):
## https://w1.weather.gov/xml/current_obs/.xml
##
## Specify the NWS location code using the "-l" (or "--location")
## command line parameter. See usage() for more details.
##
##
##

##
##
##
## REQUIREMENTS
##
## Network: This script requires access to both the local LAN (for NTP
## synchronization), and the Internet (for current temperature
## retrieval).

Re: [RDD] Weather and Time Announcements

2020-12-24 Thread David Klann
Holy Cow Lorne!

On 12/24/20 3:13 PM, you wrote:
> 
> Hi Michael,
> 
> For getting the Time part, one way that I looked at in the past (but
> never implemented due to the work requried) is to record an audio cut
> for each minute of the day.  To cut down on the amount of recording it
> is possible to re-use the AM and PM recordings if you don't specify AM
> or PM in the audio.  So for example, you could use the same audio for
> saying "It's 12:42" for both 12:42 am and 12:42 pm, leaving it to the
> listeners to figure out if it is AM or PM.
> 
> You'll want to make 2 carts, one for AM and one for PM, each with 720
> cuts of audio representing each minute of that time block.  Daypart each
> cut for the minute of time that it represents.
> 
> When you want the time of day to play on the air, just schedule the
> appropriate cart (or both carts back to back).  It'll only play the cut
> that is dayparted for that specific minute.
> 
> It takes a bunch of effort to get this type of thing set up, but once
> set up it should just work.  Furthermore it is all internal to Rivendell
> so if someone needs to figure it out in the future it should be fairly
> straight forward to figure out.
> 
> Lorne Tyndale
> 

This is brilliant! It never even occurred to me to load all the time 
cuts into a cart and then daypart each cut. Fabulous! Thanks for this!

I'm also playing with festival(1) and flight(1) to get the times and 
temperatures pre-recorded with voices sounding as human as possible with 
a synthesizer. Of course, nothing beats real, actual human voice 
recordings, but there are some pretty nice sounding "fake" voices 
available these days...

   ~David Klann
broadcasttool.com

>>
>> This station I am moving to Rivendell is currently running on a Windows
>> system. They somehow download the local weather from a NOAA site and
>> cull the local temperature from it. They have a Windows text-to-speech
>> program that reads the .txt file with the temp and creates a short mp3
>> file with the current temperature. They have a whole list of mp3 files
>> covering temps from 0-115 degrees. They also have a bunch of time files
>> with 0-12 hours, 0-59 minutes, and am/pm. I can't seem to find anything
>> in the existing Windows computer that actually performs this function.
>>
>> The previous engineer who set all this up basically evaporated leaving
>> no documentation. The current staff knows it happens, but no idea how it
>> works. I found the time and temp audio files and an exe text2speech app,
>> but nothing else.
>>
>>
>> Is there anything in Rivendell or Linux I could use to provide this
>> functionality?
>>
>>
>> --
>> 73,
>> Michael WA7SKG
>>
>> "Any day you do not learn one new thing is a wasted day."
>> ___
>> Rivendell-dev mailing list
>> Rivendell-dev@lists.rivendellaudio.org
>> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
> 

___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Weather and Time Announcements

2020-12-24 Thread David Klann
Lorne,

> David,
> 
>> This is brilliant! It never even occurred to me to load all the time
>> cuts into a cart and then daypart each cut. Fabulous! Thanks for this!
> 
> Yup, the only reason I recommend doing 2 carts - one for AM and the
> other for PM - is because there is a limit of 999 cuts per cart, so it
> isn't possible to load the full 1440 cuts into a single cart.
> 
> Lorne Tyndale
> 

Ah. Good point, Lorne!

Thanks for that additional detail!

   ~David Klann

___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Weather and Time Announcements

2020-12-25 Thread radio
I send a link with a guide (in Spanish) with a way to schedule the broadcast of the time.https://radioslibres.net/wp-content/uploads/media/uploads/documentos/como_activar_la_hora_en_rivenell_usando_shell_y_sox.pdfOctavioEl 24 dic. 2020 6:13 p.m., Lorne Tyndale  escribió:Hi Michael,

For getting the Time part, one way that I looked at in the past (but
never implemented due to the work requried) is to record an audio cut
for each minute of the day.  To cut down on the amount of recording it
is possible to re-use the AM and PM recordings if you don't specify AM
or PM in the audio.  So for example, you could use the same audio for
saying "It's 12:42" for both 12:42 am and 12:42 pm, leaving it to the
listeners to figure out if it is AM or PM.

You'll want to make 2 carts, one for AM and one for PM, each with 720
cuts of audio representing each minute of that time block.  Daypart each
cut for the minute of time that it represents.

When you want the time of day to play on the air, just schedule the
appropriate cart (or both carts back to back).  It'll only play the cut
that is dayparted for that specific minute.

It takes a bunch of effort to get this type of thing set up, but once
set up it should just work.  Furthermore it is all internal to Rivendell
so if someone needs to figure it out in the future it should be fairly
straight forward to figure out.

Lorne Tyndale

> 
> This station I am moving to Rivendell is currently running on a Windows 
> system. They somehow download the local weather from a NOAA site and 
> cull the local temperature from it. They have a Windows text-to-speech 
> program that reads the .txt file with the temp and creates a short mp3 
> file with the current temperature. They have a whole list of mp3 files 
> covering temps from 0-115 degrees. They also have a bunch of time files 
> with 0-12 hours, 0-59 minutes, and am/pm. I can't seem to find anything 
> in the existing Windows computer that actually performs this function.
> 
> The previous engineer who set all this up basically evaporated leaving 
> no documentation. The current staff knows it happens, but no idea how it 
> works. I found the time and temp audio files and an exe text2speech app, 
> but nothing else.
> 
> 
> Is there anything in Rivendell or Linux I could use to provide this 
> functionality?
> 
> 
> -- 
> 73,
> Michael WA7SKG
> 
> "Any day you do not learn one new thing is a wasted day."
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Weather and Time Announcements

2020-12-26 Thread Robert Jeffares

FWIW

On 25/12/20 10:13 am, Lorne Tyndale wrote:

For getting the Time part, one way that I looked at in the past (but
never implemented due to the work requried) is to record an audio cut
for each minute of the day.  To cut down on the amount of recording it
is possible to re-use the AM and PM recordings if you don't specify AM
or PM in the audio.  So for example, you could use the same audio for
saying "It's 12:42" for both 12:42 am and 12:42 pm, leaving it to the
listeners to figure out if it is AM or PM.


I have a set of such times which were easy to ingest once recorded, because we 
labelled them 0601.wav 0602.wav etc.using rdimport we set the start time and 
end time from the filename.
In fact the times were set 30 sec before and 30 sec after.

The voice used was the 'host' of that segment.

Bit of work to record and label, but once done they last forever.

To avoid repetition we made some variants on the ones that seemed to be played 
more often.
If the cart is in the VTRAX group they can be laid over song intros.

Bit of work but it's worth it.
R




-- Communication Consultants 2020 Limited 64 Warner Park Avenue 
Laingholm Auckland 0604 New Zealand

___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev