Audio & Voice Announcements

The objective of this project is to investigate the use of audio announcements as part of our Home Control System (HCS), the goal being to provide the best user experience and efficiently convey useful information. These announcements can be in the form of audio tones, pre-recorded speech, pre-recorded text-to-speech (TTS) and dynamically generated text-to-speech. We are experimenting to find out what type of audio works best and to determine where audio and voice announcements are appropriate. We also want to understand what hardware and software is required to best generate them and where is the hardware best located in our home.

Design Issues & Options

Audio Tones

We have collected a range of audio tones and are currently testing them to see which work and under what situations. The main problem with tones is that you typically have to be familiar with them, to understand what they mean. There are some obvious exceptions to this though, such as a siren sound.

Text-To-Speech

The advantage of TTS is that you can use it to provide a consistent set of audio voice announcements in terms of volume, speaker and quality. There are some very good (and also free) services to generate the required announcements. These are a few web-based services we have like:

The disadvantage with web-based services is that you need a PC to generate them and another to record them. Ideally, both should be laptops, to avoid any mains hum on the recordings. None of the above services generate an audio file directly.

For most of our voice announcements we have used an iPhone app to generate the text-to-speech for us as we found one that had a range of good quality voices. The app is called Speak It!. We are using the 'Lucy, British Female Voice'. This app exports voice files as .aiff format file and we then use Audacity to convert and edit the files and export as .wav files.

Recording & Editing Audio Files

To do the audio recordings and editing we are using Audacity software which is open-source. It allows you to tweak the levels and avoid clipping of the audio. It also allows you to crop the audio files and save them in a wide range of formats.

Java Audio Playback

Rather than write a load of code to play audio files in our existing Java code, we did a quick search and found this example, which explains how to simply achieve our initial objectives. It took less than five minutes to get this integrated and working.

We have subsequently updated our code and written two Java classes for to enable this capability:

The first is a static 'AudioQueue' class which maintains a queue of audio files to be played out (and where) and supports concatenation of audio files. The other fairly major thing the queue does is make sure that any announcements run in sequence. When you give lots of elements in your smart home a voice, they will inevitable start to talk over each other at some point. This queuing mechanism keeps them all polite ;-)

The second 'Audio' class runs as a separate thread and plays out files as they appear in the queue. This is especially useful when when the front door is opened after a long period of time and you want to play out a series of announcements.

The add an element of future-proofing, this wrapper class also has a parameter for the zone(s) in which the audio is to be played out, so we can have zone specific announcements when the hardware supports it. For now, this zone parameter is 'Global'. This is to handle things like playing announcements when someone returns home and walks through the front door.

Presence

Our smart home has presence and we can use this to decide if we should be playing audio announcements. The current model being used assumes that we only play audio when there is someone in the house to hear it!

We don't have the ability to play audio out on a per room/zone basis at the moment but, this is something we are planning. We are currently updating our presence project to track occupancy down to room/zone level and this could be used to determine where announcements are played out.

Timing

We quickly realised that we needed to set some time boundaries on when certain announcements are made. A good example is when the alarm is turned on or off. We don't want the alarm announcing that it has been turned on (and then shortly after armed) late at night or turned off early in the morning. We now don't make these announcements after 10pm and before 9am.

Audio Hardware

Our Home Control System (HCS) is based around a Mini-ITX PC which has stereo, line-level audio output. As part of this project we have installed a 12Vdc powered power amplifier in our 19" rack, to drive all of the speakers.

The ultimate goal is to have numerous audio channels, each mapping to a zone.

Speakers

Amina in-wall speakers
We have installed some ceiling or in-wall speakers near the front door and back door, to see how well this works and to test out possible hardware solutions. We've never been particularly impressed by ceiling mounted speakers and they don't look very good. They do have the advantage of being relatively cheap though.

Ideally, we would like to install some hidden 'in-wall' speakers like these ones Amina Technologies but they are quite expensive. They are certainly something we will investigate for our next home.

Monitor Audio SoundFrame wall speakers
The other option is something like these Monitor Audio SoundFrame speakers which are not invisible but, are decorative and mounted into the wall, rather than within it.

Experiments & Examples

Mains Power

An obvious application for voice announcements that we use is to convey when the mains power has failed and when it had been restored again. Whilst this is quite obvious during the evening or night time, it is not during the day. It was very simple to add this as an initial test case.

Example .WAV files:

House Alarm

Our house currently announces when the house alarm is enabled, disabled and armed. It also plays out a reminder when the front door is opened and the alarm is enabled, reminding the person entering that they have a limited time to deactivate it before the external sounder is activated.

Example .WAV files:

Internet Failure

A voice announcement is played out when the Internet connectivty into our home fails and again when it is restored.

Post Delivered

We are currently testing out an audio announcement for when post is delivered. As part of our smart front door project, we have a wireless (Z-Wave) sensor connected to the letter box that informs our Home Control System (HCS) when the letterbox has been opened.

This is a good example of why audio announcements should be a core/common capability of any smart home control system, giving a voice to any sensor in a smart home.

Scenes

We have also tried announcing when scenes have been run but this didn't add any real value. The result of running a scene is clearly visible in most cases. Some scenes also result in audio announcements indirectly, e.g. the 'Good Night' scene will turn on the alarm, which is then announced.

Someone At Front Door

A related announcement we are also testing is when someone is at the front door. This is detected up by a PIR sensor and will occur before anyone might ring the front door bell.

Smoke Alarms

When a smoke detector is triggered, a voice announcement is played out identifying which room/zone was triggered.

Example .WAV files:

Temperature Alarms

Temperature sensors each have individual lower and upper alarm points and generate voice announcements when these are crossed.

Example .WAV files:

Twilight

A usage that was ruled out was the announcement of dusk or dawn being detected. We quickly realised that we didn't want to be woken up at around 4:30am during the summer months though! Dusk is also signaled in our house by various lights coming on automatically but, this only happens in a few rooms.

Voice Messages

We have another project under way to capture PSTN voice messages, so that we can announce them when we return home.

Welcome Home

This is a good test case for when you should and should not use voice announcements. If your home made this announcement every time you opened the front door, it would very rapidly become annoying. In our home this is driven by presence and only played out if the front door opens and we have been away from home for more than six hours. This means that the first person home form work/school gets to hear it on arrival home.

This is also another good example that uses the voice announcement queue. The 'welcome home' announcement would be queued up, quickly followed by another, e.g. voice messages have been left.

It is also a good example of a voice announcement that needs to be presented in one location only, i.e. in our Entrance Hall.

Example .WAV files:

3rd Party Examples

Nest Protect

The Nest Protect was launched in October 2013 and features voice announcements. It can warn you of possible fires before it does a full alert and can also describe the rooms in which these events happened.

Conclusions

Our current thinking is that audio and voice announcements have real value in the smart home and we are still trying things out to see how and where they are best used. We have already added extensive audio and voice announcement capability and it has been installed such that is can be heard in most rooms in our home. The speakers have been installed in optimal locations and are not linked to specific sensors or hardware. The volume of each speaker has also be optimised for each specific location and its surrounding environment.

Our smart home uses a common language and consistent speaker for all announcements and we have chosen one that we liked. The use of a common and recognisable voice means that the voice is clearly identifiable as our home. This is preferable to many 'smart' devices using their own voice announcements and speaker. We have used a female UK English speaker as this has a more pleasant sound (a personal preference).

In our view, voice announcements should be a common/shared smart home capability that can be used and triggered by any sensor in the home.

If you want to consider audio announcements part of any home safety system, then it is essential that the capability will still work when mains power and networking is removed.

A Better Way?

This project is a great example of how you learn from building, installing and trying things out in your smart home. We are really pleased with the approach taken and the way it works so well.

The main thing we would change though relates to the hardware approach used. Rather than have a centralised amplifier, with long runs of wire to the speakers, we would like to use a system of IP-connected audio amplifiers installed at the right points in our home. These would be powered using Power Over Ethernet (POE) and simply be sent audio to play out over the network. This will be the focus of a future project.

The second thing we would change relates to the software approach used. We have a used a generic smart home model that could be applied to any home, which uses XML configuration to define our current home. Whilst we are experiementing and testing, much of what we have done is 'hard coded' into this model. Next year we will be doing the work to abstract it out into this model and add XML configuration support.

Share ...
We are on ...
Facebook Twitter
YouTube Flickr Follow us on Pinterest