Git Product home page Git Product logo

pcmlabeler's Introduction

Introduction

I created a tool to measure and label audio PCM data for signal processing (Fourier transform etc.) & machine learning.
I started with Arduino AVR devices but realized their limitations of computing power and frequency.
Human audible frequency is considered to be around 20 Hz to 20 kHz, and initial method with an arduino I could only achieve 300 Hz. This was greatly improved after several experiments.

Experiments

Wiring Setup

AVR Connection STM32 Connection

Read One, Send Each Time

(Without any floating point calculation, Arduino's 2-byte integer arithmetic is very powerful. With a single floating point variable per loop, 11.18 kHz goes down to 1 kHz.)

BaudRate Arduino STM32
9600 321.79 Hz 319.90 Hz
115200 3.92 kHz 3.84 kHz
230400 11.18 kHz 7.69 kHz

Read All, Send Once (Baudrate 230400)

DataPoints (AVR) Samp.Rate (AVR) DataPoints (STM32) Samp.Rate (STM32)
900 7.5 ~ 7.91 kHz 8750 45 ~ 46.8 kHz

These results are not accurate but an approximation. The results were consistant during the experiment, but it may vary on devices, and small change in code may alter the result dramatically.


Data

The data is labeled as

  • t : tap on mic
  • c : clap
  • w : whistle
  • s : snap

Fourier Analysis

  • Examples
    Fourier TransformFourier Transform2

In this project, I learned

  • how to use an Arduino as an USB-SerialTTL converter and how MCU programming works.
  • how sampling rates work and how to measure it in MCU.
  • comparing the cost-benefit of using MCU's memory or communication capability. The two different methods of record the audio PCM has their pros and cons.
  • utilizing MCU's memory capacity to its max to increase sampling rate.
  • performing orthodox(not FFT algorithm) Fourier transform on PCM data.

pcmlabeler's People

Contributors

kant avatar mins0o avatar

Watchers

 avatar  avatar

Forkers

kant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.