element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Monitor sound in real time using Python
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 664 subscribers
  • Views 1775 views
  • Users 0 members are here
  • wolfson
  • raspberry_pi
  • bat
  • raspberrypi
  • raspeberry_pi_accessories
Related

Monitor sound in real time using Python

hystrix
hystrix over 11 years ago

Using a Pi and Wolfson Audio card, I would like to monitor sound from the DMICs, and trigger an action (using Python) when sounds above a certain frequency are detected, say >30kHz (yes, a bat project image).

 

I would be grateful if someone could point me in the right direction.

 

Many thanks.

  • Sign in to reply
  • Cancel
  • s-light
    s-light over 11 years ago

    i think that will be difficult - normally sound cards are designed for the human frequency range - thats something from 20Hz up to 20kHz.

    i don't have looked in the datasheet - eventually you find some infos for the supported frequency.

     

    i think some time ago i saw an device with an special microphone that was designed for this high frequencys - combined with a circuit that transforms the high frequencys to the range that humans can here it -

    so with something like this you could just monitoring the input level and trigger your action if  it rises above a certain level...

     

    have fun :-)

     

    sunny greetings

    stefan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to s-light

    The data sheet can lead you to believe that the DMICs only support frequencies up to 10 kHz.

    But apparently they work well for recording bats.

    Raspberry Pi • View topic - Bat detector

    pywws - South Somerset Weather

     

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 11 years ago in reply to Former Member

    The WM7220 microphone may well be rather less than ideal for recording very high frequencies - the Wolfson data sheet shows the response starting to rise at 10kHz and it's normal for the sensitivity to plummet after a resonant peak. Since Wolfson don't say what happens next there is obviously no guarantee of the response at higher frequencies.

    I'm not really into bats but the obvious thing to do is to pest Wolfson to give some indication about the response of the microphone at higher frequencies.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to michaelkellett

    Beyond the microphone issue, how do you control

    the recording by the wolfson card using python?

    I'd like to set up a wildlife recording device that

    would activate recording according to a predefined time table

    (i.e. 5:00 to 5:25; 6:30 to 7:00 etc)

    I understand one issue would be starting up the RaspberryPy at 5:00

    (or rather at 4:55) (maybe just with an external switch timer), get the python script activated upon start-up and

    then let the script control recording periods.

     

    Thanks

     

    Agus

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 11 years ago in reply to Former Member

    Sorry I can't help you here Agustin, I know a bit about microphones and signal processing but nothing about RPi software - perhaps someone elese can help you out.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • hystrix
    hystrix over 11 years ago in reply to Former Member

    I have successfully recorded bats using the on-board DMICs - picking up Pipistrelles (peak frequency 46kHz).

     

    I also made an ultrasonic microphone using a Panasonic WM61A electret microphone plugged into the headphone socket on the Wolfson card, which also records ultrasound frequencies.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    SNARP is a sound-activated recorder written in Python. I'm not sure if you actually want to record, but at least it might serve as base.

    As it takes sound from standard input you could use sox to record from the sound card, use sox's "highpass" or "sinc" filters to strip out the lower frequencies and then pipe the result into SNARP.

     

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube