0
\$\begingroup\$

I am trying to stream sounds using a microphone and measure their frequencies I first thought I could use an Arduino but couldn't find a model suitable for this purpose. I then realized that I can use a Raspberry Pi instead but I still don't know exactly how I can do it. Any thoughts would be highly appreciated.

Added information from comments:

I'm actually new here and don't know much about the kind of details that I need to provide. But anyway thank you everyone for your interest. I am actually an electrical and electronic engineering student.

Yes I have heard of the Fourier transformation for sure.

I am a total beginner in practical applications, though.

What I am trying to do is stream human sounds and then measure their frequencies to then be able to send that data back to the Raspberry Pi and show those frequencies in the form of something. I have not yet decided on the latter step, I'm just trying to find the best way possible.

\$\endgroup\$
12
  • 1
    \$\begingroup\$ What do you need to do once you've found the frequency? Do you just want to look at it, or do you need to process it in some way? \$\endgroup\$
    – JRE
    Commented Aug 20, 2020 at 18:43
  • 1
    \$\begingroup\$ Have you heard of a fourier transform? \$\endgroup\$
    – DKNguyen
    Commented Aug 20, 2020 at 19:08
  • 1
    \$\begingroup\$ As with anything technical, you start with carefully writing down as many specifications as possible. For example, "using a microphone" doesn't really mean anything. You need to first understand, in detail, what "sounds" are the target of observation and what the meaning of a "sound" is and how to discriminate between them. You can then select a microphone that has the right specs for the job and also then work on the bandwidth of a pre-amplifier and amplifier system that will match up with an ADC. Then... well, you get the idea. One step at a time. Hand-waving just doesn't cut it. \$\endgroup\$
    – jonk
    Commented Aug 20, 2020 at 19:13
  • 2
    \$\begingroup\$ Before you buy anything, first come up with a software solution which works on your PC and verify that the result is satisfactory (this is going to be harder than you probably think it will be!). Only then should you go shopping for an embedded platform to try to move it to (in the case of the pi, most of the difference would be the effort to get a decent microphone connected, assuming you started with a Linux PC, and even if you started on Windows or a MAC the porting wouldn't be that big an effort - the analysis code is the same, it's the input code that would differ. \$\endgroup\$ Commented Aug 20, 2020 at 19:18
  • 1
    \$\begingroup\$ audacity Spectrum Analyzers for Windows is your best bet on saved recordings \$\endgroup\$
    – D.A.S.
    Commented Aug 20, 2020 at 21:44

1 Answer 1

2
\$\begingroup\$

Since you've provided a few more details, I'll tell you how to go about it.

  1. Install Raspbian (Debian Linux for the Raspberry Pi.)
  2. Find and purchase a USB sound card and a separate microphone, or an integrated "USB microphone." Plug it in and make sure your Pi recognizes it.
  3. Install GNU Radio on your Raspberry Pi. Here are instructions for installing GNU Radio on a Pi.
  4. Follow any of the widely available tutorials on using GNU Radio with a sound card. Most will show you how to use the sound card to capture audio, do a Fourier transformation, and then display the spectrum.

If you do all of that, then you will learn a fair bit about how software and hardware interact, and how the Fourier transformation is used.


GNU Radio allows you to write your own modules in Python.

With NumPy, SciPy, and GNU Radio, you can do just about everything it is possible to do with sounds.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks a lot , much appreciated. \$\endgroup\$
    – Betty93
    Commented Aug 29, 2020 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.