Arduino ESP8266 Speaking Clock

This is an Arduino audio project designed to replicate the functionality of telephone network speaking clock services and includes some historical English and German language voices that were in operation for telephone subscribers in the past. For example, that of Pat Simmons from England active (1963 - 1985) and Renate Fuczik from Austria active (1984 - 2009). The user can create further files as required.

SpeakingClock.jpg

The basic hardware design is quite simple. The main components are an ESP8266 with the flash memory holding a pair of voice and index files and the logic for building up the spoken text and an I2S DAC for producing the audio output. I've added an amplifier and loud speaker and a connection for a standalone telephone, but these are optional. This device can NOT be connected to a telephone network and, apart from the regulatory considerations, will not tolerate the around 90 volt AC ring voltage on such networks.

The device is configured via a web browser by joining it to an existing wlan or it can create its own wlan if required (AP Mode). The main time source is NTP (network time protocol) and you can add an optional real time clock which actually is recommended for a quicker startup or if there is no internet connected wlan available. Of course, you can integrate other time sources if you wish such as a DCF77 radio time module or a GPS module but then you'll have to modify the software yourself.

The player is a software component which uses a voice file (actually a .wav file) containing all the phrases and numbers concatenated together and with an index file. There is a "speech engine" which uses a workflow to drive the player, instructing it which phrase or number it should play at what time in the cycle. New voice / index file pairs can be loaded into the ESP8266 flash memory using a built-in utility.

The project has some interesting design features which could be useful for other applications, for example the NTP clock part is non-blocking (unlike most designs which issue an NTP request and block while waiting for the response) and it handles fractions of a second, scheduling a system time update for the next full second to maintain a sub second degree of accuracy. Also, the browser interface has the feature that it appears as multiple pages, but is in fact a single HTML page where all but the current logical page are hidden. This allows the user to navigate between pages without causing intervening returns to the server.

The project could be extended or adapted for other "announcement like" purposes where audio phrases are built up out of separate words depending on some criteria e.g. time, measurements from an instrument, say temperature or other such like weather information, etc. etc. and may be useful for people with impaired vision.

There is at least one other similar project in existence. The Telecommunications Heritage Group have a design [Ref:4] (PIC assembler based) which appears very professional and full featured and can even (subject to regulatory approval) be connected to a telephone network to provide a speaking clock service. However, it uses an SD card player with pre-built phrases as opposed to the alternative used in the design presented here of complete dynamic assembling of the announcement text. Further, the system design is closed in that the software source code is not published. To support their device, they have collected a number of historical voice files from various sources.

The copyright situation regarding the voice files extracted from the various commercial devices may not in all cases permit unrestricted commercial usage so you are advised to check this for yourself in the case that you intend to use any of such files for some commercial purpose.
This is not an ideal project for an absolute beginner and a basic familiarity with the Arduino development environment for the ESP8266 is a prerequisite as is the ability to build hardware from a schematic design and manufacturer data sheets.

The software is in the file spck_v1.00p.zip attached.
The documentation including schematic is Arduino-ESP8266-SpeakingClock-v1.00.pdf attached
An audio sample is also attached (Pat Simmons).
The audio files are too big to publish on this site and can be found here: link (subject to change)

Edit 21-02-2021
The player code Player.cpp in the software package is not compatible with some later releases of the ESP8266 Arduino core software, resulting in crashes. It was originally built and tested together with version 2.4.0. I have now attached a replacement for this part which has been tested with Esp8266 Arduino core 2.7.4
This update, incidentally, improves the audio quality slightly by reducing some jitter which was detectable in the 'silent' periods.

spck_v1.00p.zip (37.4 KB)

Arduino-ESP8266-SpeakingClock-v1.00.pdf (1.2 MB)

pat_simmons.audio sample.zip (254 KB)

Player.cpp (8.74 KB)

1 Like

In the U.S., at least, you can still call 1-202-762-1401 for the time.

Compatibility issue with release 2.7.4 of the ESP8266 Arduino core now resolved. See original post for a patch.

Why not put the project on github where everything could be all together, tracked, and users could report issues or offer updates through pull requests and the wiki could be used for further information.

Also, if it were on github and the appropriate files created and directory structure used, you could ask for it be added as a "library" and users could install it directly through the IDE.

--- bill

bperrybap:
Why not put the project on github where everything could be all together, tracked, and users could report issues or offer updates through pull requests and the wiki could be used for further information.

Also, if it were on github and the appropriate files created and directory structure used, you could ask for it be added as a "library" and users could install it directly through the IDE.

--- bill

I'm also slowly coming to this conclusion that the exhibition gallery may not be the best repository for such things. But also, apart from what you said, for the reason that such projects have a long lifetime and the rapid automatic closing of threads (anti-spam measure) makes the exhibition gallery an even less suitable home. I'll look more seriously at Github (or similar) for my next project publication.

Forum is good for new presentation, then github it's better for manteinance and long term developing upon Microsoft or github decide to close the service as Google did with google Code.

I would use the forum to post information about the project then as zoomx mentioned use a cloud based git repository for the actual code.

Why wait? This project and the one you have for a hd4480 snooper would be good projects to get into a git repository.

I can't imagine doing any project without source control.
Without source control tools, it is next to impossible to track changes.
But then I've been rigorously using source control for all my business and person projects for the past 38 years.

git is by far the best source control tool set I've used (I've heavily used close to a dozen over the years ) given its branching and distributed capabilities that also allows local & remote repositories with remote syncing.
Nothing else comes close.

It only takes a few minutes to set it up and with new cloud based services for repositories like github, gitlab, bitbucket, sourceforce etc... it makes things really easy.

When using free git repository accounts, my preference is github for projects that are shared, and bitbucket for projects that are not shared.

There are amazing easy to use GUI tools these days that fully integrate into the OS file managers.
RabbitVCS for linux, and tortoisegit for Windows.
While these can only do the basics of what git can do, it covers what most users tend to need.

--- bill

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.