Skip to the content
2 layersAtmega32 dev board, the printed circuit board in 3D

Isolated-Word Speech Recognition on ATmega32A Using ADC-Based Audio Input

Copper layers
2
Thickness
1.6 mm
Parts
28
Nets
59
Pads
140
Tracks, vias
310, 14
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
19 Apr 2026
Updated
19 May 2026

Overview

Atmega32 dev board is an open-source printed circuit board by seifmaazouz, from the seifmaazouz/atmega32a-speech-recognition repository on GitHub. It is a 2-layer board with 28 parts on 59 nets, routed with 310 tracks and 14 vias.

It is built around the ATMEGA32A-PU and LM358. Its parts include 7 resistors, 7 connectors, 3 capacitors, 3 diodes and 2 ICs. It belongs with the microcontroller boards boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

Speech Recognition Final Project

This repository contains two parts:

  1. speech_training_pipeline/ — Python training and template generation
  2. SpeechRecognition.X/ — MPLAB X firmware project for the ATmega32A

How it Works

The system is split into two halves that work together using a "fingerprinting" approach:

1. Training (PC)

  • You record audio samples of different words.
  • The Python pipeline extracts a 45-number fingerprint for every recording.
  • These fingerprints are averaged into "ideal templates" for each word.
  • The templates are exported as C code (templates.c/.h).

2. Recognition (ATmega32A)

  • The microcontroller records your voice and extracts the exact same 45-number fingerprint.
  • It compares your live fingerprint against the stored templates.
  • The word with the mathematically closest template is displayed on the LCD.

The 45 Features

We don't compare raw audio files because they are too large and change too much based on how fast or loud you speak. Instead, we use 45 compressed features:

Voice Activity Detection (VAD)

First, the system automatically trims the silence from the beginning and end of the recording so it only analyzes the actual spoken word.

The 3-Segment Strategy

The spoken word is split into 3 equal parts: Beginning, Middle, and End. This allows the system to understand how a word changes over time (e.g., "OFF" starts with a vowel and ends with a "FF" sound).

15 Numbers per Segment

For each of the 3 segments, we calculate:

  • 1 Energy Value: How loud that part of the word is.
  • 1 Zero-Crossing Rate (ZCR): How "scratchy" or high-pitched that part is (useful for "S" or "F" sounds).
  • 13 MFCCs: A mathematical representation of the physical shape of your vocal tract while saying that part of the word.

Total: 3 segments × 15 numbers = 45 features per word.

Project names

  • Python training folder: speech_training_pipeline
  • MPLAB X project name: SpeechRecognition.X

Repository layout

text
Final Project/
├── README.md
├── speech_training_pipeline/
│   ├── config.py
│   ├── prepare_dataset.py
│   ├── record_samples.py
│   ├── extract_features.py
│   ├── test_classifier.py
│   ├── generate_templates.py
│   ├── run_pipeline.py
│   ├── raw_samples/
│   ├── samples/
│   └── extracted_features/
└── SpeechRecognition.X/
    ├── main.c
    ├── classifier.c/.h
    ├── features.c/.h
    ├── templates.c/.h
    ├── config.h
    ├── adc.c/.h
    ├── audio.c/.h
    ├── lcd.c/.h
    ├── timer.c/.h
    └── nbproject/

Workflow

  1. Collect or prepare audio samples in speech_training_pipeline/
  2. Run the desired pipeline commands (see "Usage Commands" below)
  3. Copy the generated templates.c and templates.h into SpeechRecognition.X/
  4. Build and flash the MPLAB X project

GitHub Actions Build

A GitHub Actions workflow is provided to automatically compile the firmware into a .hex file without needing MPLAB X installed locally.

To run the build:

  1. Go to the Actions tab in your GitHub repository.
  2. Select the Build Firmware workflow on the left.
  3. Click Run workflow.
  4. Once finished, you can download the atmega32-firmware-hex artifact from the run summary.

Usage Commands

Run these commands from the speech_training_pipeline/code/ directory.

1. Prepare Dataset

bash
python prepare_dataset.py --dataset dataset_3

When to use: Use this to convert raw 44.1kHz audio files in raw_samples/dataset_3 into the 8kHz mono format required by the MCU. It saves the processed files in samples/dataset_3.

2. Augment Dataset

bash
python augment_dataset.py --dataset dataset_3 --output dataset_3_aug --val-ratio 0.2

When to use: Use this to create an augmented version of your dataset (adding noise, pitch shifts, etc.). This makes your model much more robust to real-world background noise. It creates a train and val split.

3. Run Pipeline (Clean/Standard)

bash
python run_pipeline.py --dataset dataset_3

When to use: Use this for a standard run (feature extraction, testing, and template generation) using the clean/base dataset.

4. Run Pipeline (Augmented + Strict Validation)

bash
python run_pipeline.py --dataset dataset_3 --samples-subdir dataset_3_aug/train

When to use: Use this when you want to train on augmented data but automatically validate against a held-out "clean" validation set. This ensures your model generalizes well and isn't just memorizing noise.

Audio format

All training/testing audio must be 8000 Hz, mono, 8-bit PCM.

Python requirements

bash
pip install numpy scipy soundfile pyaudio

Parts

28
QtyValueFootprintReferences
4330 ohmResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2, R3, R4
210KohmPotentiometer_THT:Potentiometer_Alps_RK163_Single_HorizontalRV1, RV2
233PFCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC1, C2
2Red LEDLED_THT:LED_D5.0mmD2, D3
1100 nFCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC3
110K ohmResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6
111.0592MHzCrystal:Crystal_HC49-U_VerticalY1
11K ohmResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR7
15_to_3V3Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ3
18.4K ohmResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5
1ATmega32A-PPackage_DIP:DIP-40_W15.24mmU1
1AVR_ISP_6Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ7
1Green LEDLED_THT:LED_D5.0mmD1
1JumperConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ2
1LCD1602ADisplay:WC1602ADS1
1LM358Package_DIP:DIP-8_W7.62mmU2
1MAX9814_MicConnector_PinSocket_2.54mm:PinSocket_1x05_P2.54mm_VerticalJ4
1Push ButtonButton_Switch_THT:SW_PUSH_6mmSW3
1SRAM_LConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ5
1SRAM_RConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ6
1USB2TTLConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ1
1push buttonButton_Switch_THT:SW_PUSH_6mmSW2

Similar boards

  • 2 layers347.7 × 146.6 mmMysterium pcb, the printed circuit board in 3D

    Mysterium pcb

    coseyfannitutti/mysterium

    TKL keyboard that can be entirely assembled using only through hole components, including usb type-c

    227 parts541GPL-3.0
  • 2 layers344.4 × 130.8 mmSesame, the printed circuit board in 3D

    Sesame

    str-dst/sesame

    Alice type ergo keyboard using only THT parts

    168 parts331
  • 2 layers364.4 × 167.3 mmRedherring, the printed circuit board in 3D

    Redherring

    dcpedit/redherring

    Red Herring Keyboard PCB and case files

    226 parts253CC-BY-4.0
  • 2 layers228 × 114 mmPlanck thk, the printed circuit board in 3D

    Planck thk

    olkb/planck_thk

    Planck Through Hole Kit

    134 parts169GPL-3.0
  • 2 layers371.5 × 145.3 mmBasketweave, the printed circuit board in 3D

    Basketweave

    null-ll/basketweave

    Through-hole Alice-style keyboard with arrow keys and a rotary encoder

    177 parts129GPL-2.0
  • 2 layers439 × 141.6 mmAek2 usb, the printed circuit board in 3D

    Aek2 usb

    str-dst/aek2_usb

    drop-in replacement pcb for the AEK II

    241 parts55
  • 2 layers317.3 × 154.8 mmLCK75, the printed circuit board in 3D

    LCK75

    lyso1/LCK75

    a 75% through-hole keyboard designed by myself with inspiration from the CFTKB Discipline and Yiancar Gingham

    207 parts45
  • 2 layers285.8 × 124.6 mmPunk75, the printed circuit board in 3D

    Punk75

    dsanchezseco/punk75

    Ortholinear keyboard with 75 keys and all components through hole

    194 parts44GPL-3.0

Questions

What parts does the Atmega32 dev board use?

28 parts, built around the ATMEGA32A-PU and LM358. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Atmega32 dev board KiCad files?

From the seifmaazouz/atmega32a-speech-recognition repository on GitHub, at the commit this page was made from: the board is Speech_Rec_PCB/atmega32 dev board.kicad_pcb and its schematic Speech_Rec_PCB/atmega32 dev board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Atmega32 dev board design in my own project?

Its repository states no licence, so its author keeps all rights: ask seifmaazouz before reusing the design.