AI on the Edge LESSON 8: Text to Speech (TTS) on the Raspberry Pi

In this video lesson I will show you how to get the Raspberry Pi to speak to you in plain English. This is our first dabbling with AI. In earlier lessons we have discussed that one of our first objectives will be to begin to audibly interact with our project through speech. The first step will be to get the Pi to talk to us. Then in future lessons we will show how to get the Pi to listen to us.

In this lesson we demonstrated simple Text to Speech (TTS) with this code.

Remember this program requires use of the AI Educational OS we flashed in LESSON #2.

As we say in the video, the first time you run the program you will get a permission error. This is because the model folders are inside a system folder and must be created as a ‘superuser’ using ‘sudo’. As shown in the video, you need to open a terminal window, and type in these commands at the command prompt (Put them in one at a time):

You only need to do that one time. Next time you run the program, all will work properly.

Then, in order to hear all the different voice models Piper offers, you can run this program, and each voice will introduce itself to you.

 

Remember in these early lessons we are using this circuit to demo our programs. Please leave this circuit put together.

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

AI on the Edge LESSON 7: Homework Solution for Dimmable LED

In this video lesson we present the solution to the homework assignment given in LESSON #6.  Your assignment was to create a dimmable LED where the brightness of the RGB LED is controlled by the potentiometer. We are still using the schematic from our earlier project.

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

In this lesson, this is the code which we came up with:

 

AI on the Edge LESSON 6: Digitial Out, Servos, Analog In and PWM on the Fusion HAT+

In this video lesson we will become familiar with the FUSION AI HAT+, and we will learn how to do digital inputs and outputs, analog in readings, analog outputs, PWM and how to control servos. By the end of the lesson you should have the essentials you need to work with the Fusion HAT+.  The schematic for the circuit we will be using in today’s lesson if below. We describe it in more detail in the video. The schematic is:

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

In the video lesson we demonstrated the following programs:

Digital output to blink an LED:

PWM Example to Control RGB LED Color and Brightness.

Reading Analog Voltages on the Pi 5 Using the Fusion HAT+

Controlling Servos With the Fusion AI HAT+

 

AI on the Edge LESSON 5: Understanding Fusion AI Hat+ For Raspberry Pi

In today’s lesson we will become familiar with the capabilities of the Fusion AI Hat+ for the Raspberry Pi. This hat will be a core part of our class moving forward. The hat makes it easy to get data from the outside world, and to control things in the outside would. We will get an understanding of the core capabilities of the board, and your homework will be to build the first circuit with the board.  This schematic shows the various parts of the board:

Fusion AI Hat for Raspberry Pi Schematic

Then for the homework, we need you to go ahead and build this circuit. This circuit will allow us to learn how to make Digital Output commands, PWM commands, and how to read analog inputs.

Fusion Hat Circuit Diagram
This is the circuit we will use moving forward in the class

AI on the Edge LESSON 4: Python Averaging Grades Homework Solution

In this video lesson, I show you my solution to the Homework Assignment in LESSON #3. If you were not able to do the homework yourself, you can follow along in the video. Make sure you can do it on your own, without checking back to my solution. You need to understand these basics before moving on the class.

This is my homework solution.

 

Making The World a Better Place One High Tech Project at a Time. Enjoy!