LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-06-2013, 02:22 PM   #1
need2know
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
Find tone/frequency (dtmf etc) in soundfile using sox


Hi

I have this (hopefully) simple problem.
I have a bunch of soundfiles and i want to be able to find a specific tone/frequency in them, or rather check IF they exist.

To make a simple example DTMF tones are the simplest ones. How do i know if a soundfile contains the DTMF tone 1 for example. And just for the record this should not be limitied to DTMF tones, this is just to give an example.

I would like to check for a specific frequency and go through the file and if the dB is higher then normal for a specific span i would concider that a confirmation.

I would prefer to use sox but good alternatives are welcome, any perl-solutions would also be appreciated.
I have been sitting with this for several hours and just cant get it to work.

If i run spectrogram in sox i can clearly see the tone at a specific frequency at a higher dB then the rest frequencies, but how do i get this out in code.

Please help.

Thanks for your time!

/Daniel
 
Old 03-07-2013, 08:58 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
What you suggest is the Holy Grail in programming of music guys.
If you have dtmf tones, they can be easily interpreted. One at a time, that is. For sound, it's horribly complicated as even a quick look with gnuplot would show you. If you have gnuplot (or mathlab), try this line in it (or look at the attachment).
Quote:
plot [-4*pi : 4*pi] sin(x) +sin(1.5*x) +sin(2*x)
Now that's simple enough - a 3/2 and 2nd harmonic (2nd harmonic = one octave musically). Spectrum analysis is about your only way of debunking that stuff. Even then you're struggling.
Attached Thumbnails
Click image for larger version

Name:	harmonics.png
Views:	40
Size:	3.6 KB
ID:	12018  
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unix command to find processor frequency in solaris 10 pm25 Solaris / OpenSolaris 7 10-05-2011 03:51 PM
sox package, Slackware 13.1, fails on sox 1.wav -e stat burbabro Slackware 1 05-04-2011 02:26 AM
How to find and display RAM frequency and timings? fmyhr Linux - Software 6 10-15-2009 10:29 PM
DTMF detection jspenguin Programming 1 08-03-2005 04:59 PM
How do I find out and change monitor frequency? flamesrock Linux - Software 1 10-03-2004 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration