Talking Clock Using ESP32

Talking Clock Using ESP32 

In this article, we would be constructing a talking clock that will alert him at a different time of day in different languages.

MP3 shield

Construction hurdle

Since the entire MP3 functionality is inbuilt into the guard, Now not an awful lot of computing electricity is required to run and manipulate the song sequences even as in use. Therefore, an Arduino UNO is enough for it. However the trouble comes after I tried to connect a TFT show ( ILI9163 128*128 ) with the UNO, the UNO could not run it. Therefore, I preferred my preferred MCU – ESP32 which has more muscle strength, low power intake, and extra GPIOs to tinker with.

Sound files preparation for  this Talking Clock

For the instruction of the sound report, you’ll be able to use his personal voice, microphone, and recording system. Audacity is an exceptional sound software for developing mp3 documents from microphone sound. However, my choice is Python with a textual content-to-speech facility. First I set up python and then I installation python-text-to-speech (pyttsx / gTTS) and then create my mp3 documents from simple sentences. There are approximately 52 languages wherein you may create your personal mp3 files.

sudo apt-get install python
sudo pip install pyttsx
sudo pip install gTTS

After putting in this software you could without delay create your mp3 documents from the command line itself. “1” -l en -o /home/mp3/0001.mp3 “2” -l en -o /home/mp3/0001-speak-two.mp3 “The time is now” -l en -o /home/mp3/0101-speak-time-now.mp3

But, I’ve included a textual content-to-speech.Py report to create your mp3 files at loosening up. Consequently, the first big process for the mission is to create the mp3 files and then shop them within the format like 0001.Mp3, 0002.Mp3, etc. A few discretions can be brought like


But, the MP3 protect will select up the 0001-communicate-one.Mp3 because of the first report and 0002.Mp3 because of the 2nd document and many others.

Type of MP3 files

The MP3 protection has an SD card on its return. Within the root listing of it, create a folder called ‘mp3’ and then unload all the mp3 files in it. For clock sound, you may require all of the sounds from zero to 59. To begin the conversation you can want to have an mp3 record like – “The time is now”. You furthermore may also like to have a track at the start of the speech. Unload a majority of these forms of files within the mp3 directory of the sd card and you are finished with the mp3 document creations.

Unique word: in case you discover there is sputtering noise from the speaker then placed a 1K resistor between ESP32 Tx and MP3 Rx pin.


RTC module DS3231 which comes for approximately $1.5 a-piece from aliexpress.Com is way greater advanced than the alternative RTC module because it has built-in quartz that is once more corrected through an in-built temperature sensor. It’s very particular, runs on 3.Three volts, and maintains precision over a very long period of time.

RTC DS3231

RTC DS3231


It evolved on Arduino IDE the usage of ESP32 dev. Board. Besides speaking about preliminary track, day, date, time, AM, or PM the clock also speaks the temperature from the RTC inbuilt temperature sensor. First, we ought to set the RTC clock for which I’ve put the codes within the setup segment to set the time. Whenever at the same time as flushing the ESP32 with the cartoon the time gets set. However, you want to care about the time of the laptop. I’ve also added a separate caricature for putting in & displaying the time.

It calls for only 6 wires to run the MP3 module – Tx, Rx, Vcc, Gnd, Spk1, Spk2. The RTC runs on the I2C bus and the TFT runs on the SPI bus. The whole schematic is shown in the image. On ESP32 the Tx1 and Rx1, I could not run so I select Tx2 and Rx2 and it really works. The maximum extent degree of the MP3 defend is 30. Past 30 it will be restricted to 30 simplest.

Clock with NTP time server

In the absence of RTC3231, you’ll run the clock the use of time from the NTP server. For that, I’ve also added the cartoon wherein one has to go into the wifi identification and password.

Power supply for Talking Clock

Any 5-volt phone charger is sufficient to run the clock. But, it can additionally be run from a Li-Ion three.7-volt cellular with the aid of giving the deliver at the 3.3-volt line and the floor line.

Schematic of Talking Clock Using ESP32

ESP32 talking clock schem


This cheaper talking device may be used for greater realistic functions like an audio alarm for gasoline leakage with leakage degree and wind path. It’s the instant when human beings neither can see nor can understand. They simplest want the route to follow

….. Gasoline leakage at post-A, Run towards B gate. The system will degree leakage degree, discover wind route, and then issue training. All can be accomplished immediately.

Other than this can also be used all through disaster conditions like – hearth alarm while humans may be directed to use staircases in a smoke-filled ecosystem while none can open their eyes nor they could see however pay attention. So it is able to be used at some point of stampede situations whilst crowd will be directed vide voice instructions – how and where to move or just to remain standstill… and so forth.


ESP32 $7.5
TFT 1.44” $3.5
RTC DS3231 $1.2
8 Ohm speaker (0.3 watts), Micro SD Card, wires, board, power supply, etc extra.


ESP32 Talking Clock Prototype


Related Posts