Middle School Project

Welcome to the “Future Innovators: Cool STEM Projects to Change the World” series! In this project, you’ll learn how to create a Biometric Authentication App that uses simple voice recognition to authenticate users. This project will show you how to build a basic login system where users can use their voice to unlock a virtual system, similar to how smartphones use fingerprints or face recognition for security.

By the end of this project, you’ll have built an interactive app where users say a password, and the system will recognize their voice and give them access. This is a fun and easy way to learn about biometrics, which is how devices use parts of our bodies (like our voice or fingerprint) to identify us.


What You Will Learn

  • How voice recognition works and how computers can listen to and understand sounds.
  • How to build a basic authentication app that listens for a specific phrase and grants access when recognized.
  • How to use CoSpaces or Scratch to create a simple app that combines biometrics and interactivity.

STEM Learning Process

1. Science: Learn how unique voice patterns can be used to identify individuals.
2. Technology: Use coding tools like CoSpaces or Scratch to simulate biometric authentication systems.
3. Engineering: Design a simple login system that uses a person’s voice to verify their identity.
4. Math: Use logic to compare sound patterns and make decisions based on matching results.


What You Need

  • A computer or tablet with internet access and a microphone.
  • Scratch or CoSpaces (you can choose whichever tool you are more comfortable with):
  • Sign up for a free Scratch account: Scratch
  • Sign up for CoSpaces: CoSpaces.io

What is Biometric Authentication?

Biometric authentication is when a computer or device uses parts of our body—like our voice, face, or fingerprints—to recognize who we are. It’s a safer way of logging in because it’s harder to copy someone’s voice or fingerprint. In this project, you will learn how to build a simple version of this using voice recognition, where the app listens to your voice and recognizes if it’s you!


Step-by-Step Guide to Building a Biometric Authentication App Using Scratch

We’ll start by creating a basic voice-based login system using Scratch. The app will listen for a special passphrase, and if it matches the correct voice, it will let the user log in.

Step 1: Sign Up for Scratch

If you don’t have a Scratch account yet, go to scratch.mit.edu and sign up for free. This will allow you to save your project.

Step 2: Create a New Project

Once you’re logged in, click Create to start a new project. This is where you’ll build your biometric app!


Step 3: Building the App in Scratch

Step 3.1: Create the User Interface

  1. Add Sprites:
  • Choose a sprite to act as the login screen (you can use a computer or door sprite to represent the system being unlocked).
  • Name this sprite LoginScreen.
  1. Add a Text Box:
  • Go to the Looks section and use the “Say [ ] for 2 seconds” block to display a message like “Please say your passphrase”.

Step 3.2: Capturing the User’s Voice in Scratch

Since Scratch doesn’t natively support voice recognition, we’ll simulate the process. The user will say a passphrase aloud, and the system will pretend to listen before granting access.

  1. Add a Sound Block:
  • In Scratch, go to the Sound section and add a block like “play sound until done”. This represents the system “listening” to the user’s voice.
  1. Simulate Voice Matching:
  • Use an “If [key pressed]” block to simulate the voice being “correct.” For example, if the spacebar is pressed, it means the correct passphrase was spoken (this simplifies real voice recognition for middle school).

Here’s an example of what the code might look like:

Plaintext
When [green flag] clicked
    say "Please say your passphrase" for 2 seconds
    play sound [recorded_voice] until done
    if [space key pressed] then
        say "Access Granted" for 2 seconds
    else
        say "Access Denied" for 2 seconds

This code listens for the space key, which acts as the correct passphrase, and either grants or denies access.


Step 3.3: Adding a “Voice” Check

Since Scratch doesn’t directly recognize voices, we will let the player press a key (like spacebar) to simulate the right voice being detected.

  1. Add a “key pressed” block to simulate recognizing the correct passphrase.
  2. If the user presses the space key, the system will say “Access Granted.” If not, it will say “Access Denied.”

Step 4: Testing Your Biometric App

Now that your app is built, it’s time to test it!

  1. Run the app by clicking the green flag.
  2. Say your passphrase aloud (or simulate it by pressing the space key).
  3. Check if the app correctly grants or denies access based on your input.

Step 5: Expanding the Project with More Features

Here are some ways to make your Biometric Authentication App even more exciting:

1. Add Different Voices

  • You can add a few different key presses (like different letters) to simulate different users trying to log in with different voices.

2. Create a Multi-Level Login

  • You can require users to go through multiple steps, such as voice and a password, to simulate multi-factor authentication.

3. Use CoSpaces for a 3D Experience

  • If you prefer to build your app in CoSpaces, you can create a virtual environment (like a bank vault or a futuristic lab) where users have to say their passphrase to unlock the doors. You can use CoBlocks to make objects react when the correct passphrase is “recognized.”

What’s Next?

Congratulations! You’ve built a Biometric Authentication App using Scratch or CoSpaces that simulates a simple voice recognition login system. This is a fun way to learn how biometric technology works and how it’s used to secure devices and systems. Keep experimenting and adding more features to make your app even more secure and interactive!

In the next project, we’ll build a Virtual Reality Exploration Game where players can explore different environments and interact with objects. Stay tuned for more cool and fun STEM projects, released every week!


Resources and Additional Help

  • Scratch Official Website: Scratch
  • CoSpaces Official Website: CoSpaces
  • Biometrics for Kids (Learn how biometrics works in simple terms): Biometrics 101

That’s your middle school Biometric Authentication App project—have fun building, experimenting, and securing your app with cool technology!

Categorized in: