1. Are you ready for the Galaxy S20? Here is everything we know so far!

Sound detector - possible approsches?

Discussion in 'Android Development' started by Dyslexicbloke, May 12, 2017.

  1. Dyslexicbloke

    Dyslexicbloke Lurker
    Thread Starter

    Firstly I am new to this, so new that I havent started yet.

    I worked for years running an IT department and as a DBA.
    Although I have no experiance of Java I do understand OO concepts and expect to have to put some time into learning the IDE/language constructs... much reasding and playing to do.

    That said I still have some very specific questions...
    I know it is possible to measure freequency spectrum, because there apps that do it, how?
    As in where should I start searching/reading

    I want to go a couple of steps further... Categorise sounds by mapping, in small slices, both the spectral fingerprint and the envelope shape relative to time.

    IE Beep Beep Beep would be a pulse of one or more frequencies with a period and duty cycle.
    The amplitude is not imporrtent provided the peeks are detectable over the background.

    Monitor/ process sound in the background & flip the app into focus when a pattern is recognised, preferably whilst playing a sound and pausing any multi media output.

    uses are many and varied so the app will need to be able to be trained, exposed to a sound and given an action to perform.
    Think barking dog, crying child, car horn, knock at door, microwave done.... all able to pause multimedia playback and tell the user why. (I am assuming toast or simmilar)

    I realise that this is not an easy project but it is an interesting one and I cant find anything that does this now.

    I am not asking anyone to tell me how to categorise the sound, although I would be interested in any conbsiddered opinion.
    What I do need is some advice on what is/may be possible and what, if any, services/met/hods/API's/interupts.. , I should be looking at.

    What I dont want to do is get blinkered by my initial findings and then spend time falling into a load of predictable holes that I failed to predict as a result of my complete ignorance.

    Is the general plan plausible?
    Where can I look for options/details?

    Thanks
    Al
     


    cortega619 likes this.

    1. Download the Forums for Android™ app!


      Download

       
  2. Deleted User

    Deleted User Guest

    Hi Al, welcome to Android Forums. That sounds like a very interesting project, and a realistic one. I know audio analysis is possible because there are apps like tuners, which can obviously detect frequencies.
    To give you a good start in this, it might be an idea to obtain code for an existing app or library which does a similar thing. A quick web search reveals some links

    http://stackoverflow.com/questions/18293953/how-to-develop-a-spectrum-analyser-from-a-realtime-audio

    The above question contains some answers with links to open source spectrum analyzers. By looking into the code, you can see the techniques used to do the sound analysis.
     
    Daniel Fernandes likes this.
  3. bayk

    bayk Member

    I would recommend you to find third party library that does sound processing for you. It is complicated area and doesn't make sense for you to implement it.
    Also it is big difference between regular signals like beep, car horn, or music note and barking dog, crying child.
    [​IMG]
     
  4. Dyslexicbloke

    Dyslexicbloke Lurker
    Thread Starter

    Yes I appreciate that distinct frequencies are not the same as complex sounds and I also know that waveform shape is important.

    My hope was to essentally create a set of notch filters that looked for a small band of frequencies at some percentage above the background and then use those to get a digital signature...

    I may be way off base but I suspect that using a simplified approach, perhaps 32 or 64 bands with peak detection, will still provide suficiant discrimination between sound types and will also provide a simple way to map them. Once I have a signature it should be relatively easy to use logical AND to identify possible matches and then check the period and duty cycle of the signal.

    I am not under any illusions here, I realise I may be over symplifying to the point where the code simply will not be of any use but I thought it was worth a punt...

    I suspect it is one of those projects that will be hard to define until some of the basic assumptions have actually been proven, or dys-proven for that matter.

    Right now it is a complex enough task to make me think hard about the platform and I suspect a good learning tool. weather it is actually a realistic aproach is an entirly different matter but I suspect it will be fun finding out.

    Thanks,
    Al
     
    sweetndreemy73 likes this.
Loading...
Similar Threads - Sound detector possible
  1. Olda
    Replies:
    2
    Views:
    202
  2. Smailliw
    Replies:
    2
    Views:
    224
  3. goemonburo
    Replies:
    3
    Views:
    277
  4. MikeHunt555
    Replies:
    5
    Views:
    323
  5. Dudemeister333
    Replies:
    4
    Views:
    361
  6. Milo Williamson
    Replies:
    5
    Views:
    279
  7. Rgarner
    Replies:
    2
    Views:
    283
  8. Jorgon
    Replies:
    2
    Views:
    346
  9. freightguy70
    Replies:
    12
    Views:
    695
  10. TheSugarBuzz
    Replies:
    3
    Views:
    543

Share This Page

Loading...