Go Down

Topic: Arduino ESP8266 Speaking Clock (Read 808 times) previous topic - next topic

6v6gt

Jul 23, 2018, 08:01 pm Last Edit: Jul 23, 2018, 08:55 pm by 6v6gt
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.



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)

odometer

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

Go Up