TwoToneDetect Beta

Status
Not open for further replies.

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,323
Reaction score
116
I've put together a program for detecting two tone pages and upon detection, recording 30 seconds of audio and sending it to a specified email address as a .WAV file. I wrote this for my own use, but am making it available for others who might find it helpful. It's not very polished at this point, but it does what I need it to do. Requests for new features may or may not be acted on, depending on complexity and the time I have available.
TwoToneDetect-full;init:.jpg

Features include:
  • Audio frequency counter for finding tone frequencies with PC sound card
  • Decodes up to 5 two-tone pairs and 3 long tones
  • Upon detecting a valid tone set, records 30 seconds of audio and emails it to a specified address as a .wav file attachment
  • Provides limited serial port control of BCD396T and similar scanners to provide fire tone out functionality on multiple frequencies at the same time by skipping transmissions that are not valid tones

Installation is somewhat of a pain in the neck because of the large runtime engines that have to be downloaded in order to make the program run. I wrote it in LabView because that made it easy. I'm starting to play around with C# programming, and if I figure that out, I may make a version in that language that should be much easier to install.

Install instructions, basic instructions, and a rudimentary download are at http://radioetcetera.googlepages.com/twotoneprogram

Feedback through this thread is welcome.

Regards,

Andy
 
Last edited:

Kirk

DB Admin
Database Admin
Joined
Dec 19, 2002
Messages
785
Reaction score
5
Just a tip... Most of you have probably figured this out, but the easy way to do tests to get the email working is to use a program like Audacity to generate an MP3 of a single tone, and sync that to an MP3 player. Plug in the MP3 player instead of the scanner, and you can keep toning until you get the settings just right.

I've been running this software for several weeks now, and have found that the app sometimes stops responding after a week or so. Not sure if the lab software has a memory leak, or if it's just typical Windows crappiness requiring a reboot every now and again to keep things sane.

I've got a couple of cheap USB sound cards on order so I can monitor a few more agencies. I prefer to have a scanner sitting on a channel rather than scanning and risking missing something. I've found this is a great use for older scanners that were otherwise mostly unused.

I could go either way with a txt or configuring the way it's done now. My local fire department only has about five sets of tones, but when I go with a second sound card, the agency I'll be monitoring there has a lot more. Unfortunately, many are DTMF only, not two-tone.

Anyway, hats off for a great app! Thanks again.
 

motomeso

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
952
Reaction score
28
Location
Ontario
You could always just change your record properties to Wave instead of Line or Mic in and just generate the tone right from Audacity too.

Just a tip... Most of you have probably figured this out, but the easy way to do tests to get the email working is to use a program like Audacity to generate an MP3 of a single tone, and sync that to an MP3 player. Plug in the MP3 player instead of the scanner, and you can keep toning until you get the settings just right.
 

Kirk

DB Admin
Database Admin
Joined
Dec 19, 2002
Messages
785
Reaction score
5
You could always just change your record properties to Wave instead of Line or Mic in and just generate the tone right from Audacity too.

LOL, if your audio settings were as wonky as mine, selecting the right input is 3/4 of the battle. (Windows Media Center edition with RealTek audio...half the inputs are controlled by Windows, the other half by a RealTek app...it's horrible).
 

38ffems

Member
Joined
Jun 1, 2006
Messages
0
Reaction score
0
Location
Clinton County, NY
Really cool idea, I tried something similar in Visual basic and Java but I changed my major from computer science to Geography and gave up on the program early, I still have programming skills but this is great and I can really appreciate how quickly you program based on suggestions, an amazing skill. You could easily set up some sort of micro controller, maybe a Arduino board to activate relays to turn on lights or whatever. I would realllllly like to see the program have an output sound when activated, that would be awesome, different sound for each set of tones would be great and could definately make this program incredibly desirable. Could you maybe set up so that you email a cell phone (most carriers give you a email that goes to your text messages) so that if there is an activation it just send a text saying you have a call.
 

motomeso

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
952
Reaction score
28
Location
Ontario
I am running 4 instances of the program and haven't been able to get more then a day before the programs crash.

Let me know if you need any info to help trouble shoot the crashes.
 

jpryor

Member
Joined
Aug 22, 2001
Messages
633
Reaction score
50
Location
Nashville / Green Hill TN
I'm not sure if this is from TwoToneDetect or from the Lame.exe converter, but something within these programs is not closing or letting go of the mp3 files in the data directory until I completely close out of TwoToneDetect. I setup a batch program to sweep the mp3s into an archive folder on a nightly basis, but it is unable to move the files since something still has a lock on them. If I close TwoToneDetect, only then can I move the files. So if there is something else that needs to happen so the program can drop the file after it is written, that would be great.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,323
Reaction score
116
I'm not sure if this is from TwoToneDetect or from the Lame.exe converter, but something within these programs is not closing or letting go of the mp3 files in the data directory until I completely close out of TwoToneDetect. I setup a batch program to sweep the mp3s into an archive folder on a nightly basis, but it is unable to move the files since something still has a lock on them. If I close TwoToneDetect, only then can I move the files. So if there is something else that needs to happen so the program can drop the file after it is written, that would be great.

Yeah, this is a known bug. The issue is in the email code...after attaching the file the reference is not closed properly by the code. This could also be causing memory leaks that cause the program to freeze after it's been running for awhile. It's on the list of things to try to fix.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,323
Reaction score
116
New Version Available

I just uploaded a new version that has two minor improvements:

1) Allows multiple "To" email addresses for each tone set. Simply separate the addresses with a comma (no spaces)
2) Audio files are now stored in a "\data\Audio" directory instead of "\data". Note that lame.exe still needs to reside in "\data". The new Audio directory should be automatically created by the installer.

I still haven't fixed the bug that holds the audio files open...still trying to figure it out.

Also, just as a general FYI, I eventually plan on migrating to a text file (tab delimited) for tone setup in place of the input boxes, although the main screen will show what has been read in from the text file.

Andy
 

blaster668

Member
Joined
Dec 7, 2008
Messages
8
Reaction score
3
I just installed the latest version and love the software! However, when I installed it, it did not create the data\audio folder. The emails would send with just the text description. I simply created the folder and everything worked. I would actually like to have a way to send only the text info from the software for people who pay for phone downloads. If this option could be selected for individual email addresses, it would be even better!
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,323
Reaction score
116
New Version Available

I just installed the latest version and love the software! However, when I installed it, it did not create the data\audio folder. The emails would send with just the text description. I simply created the folder and everything worked. I would actually like to have a way to send only the text info from the software for people who pay for phone downloads. If this option could be selected for individual email addresses, it would be even better!

I just uploaded a new version that creates the Audio directory the first time the program is run rather than through the installer, which I was also having some problems with.

The new version also releases the attachment file immediately after sending the email, which should allow people to move or delete the audio files while the program is still running.

I'm not sure if the memory leaks are fixed or not...if the program still crashes after a few days of running let me know, as I haven't had this problem on my system.

Thanks,

Andy
 

jpryor

Member
Joined
Aug 22, 2001
Messages
633
Reaction score
50
Location
Nashville / Green Hill TN
Installed the latest version and it is working good on my end. It is definitely good to have the Audio separated from the other files. My nightly archive process should work well now also. I'll advise if I see any program crashes on my end.

I have the alert audio shared on my website for those who are curious:

http://nwohio-liveservices.dyndns.org/audioalerts.html

Open beta testing access for Radio Reference users:

Username: AudioAlerts
Password: password

Let me know if you can not get in, I just changed the ports and pathing around for the audio alerts share.

Thanks,
Jeff
 

Saint

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
5,085
Reaction score
1,275
Location
Fort Erie Ontario Canada
Alert Audio

Installed the latest version and it is working good on my end. It is definitely good to have the Audio separated from the other files. My nightly archive process should work well now also. I'll advise if I see any program crashes on my end.

I have the alert audio shared on my website for those who are curious:

http://nwohio-liveservices.dyndns.org/audioalerts.html

Open beta testing access for Radio Reference users:

Username: AudioAlerts
Password: password

Let me know if you can not get in, I just changed the ports and pathing around for the audio alerts share.

Thanks,
Jeff

Hi Jeff I used the username and password you provided and it works OK I got access and downloaded several audio files and they are OK too.
Steve
 

JasonL

Member
Joined
Sep 6, 2008
Messages
0
Reaction score
0
Mms

The problem I am having is that when the program emails the mp3 to a cell phone via the mms address (**********@mms.att.net) I get an error on the phone at says " the file was removed from the message as not supported". This only happens when an mms is sent from the program. When I send an email from my gmail account with an mp3 attached to the mms address it comes accross just fine. It seems that the problem must be in the way the program attaches the file to the email. Anyone have a fix or suggestions to fix this? Thanks
 

Kirk

DB Admin
Database Admin
Joined
Dec 19, 2002
Messages
785
Reaction score
5
The problem I am having is that when the program emails the mp3 to a cell phone via the mms address (**********@mms.att.net) I get an error on the phone at says " the file was removed from the message as not supported". This only happens when an mms is sent from the program. When I send an email from my gmail account with an mp3 attached to the mms address it comes accross just fine. It seems that the problem must be in the way the program attaches the file to the email. Anyone have a fix or suggestions to fix this? Thanks

I don't think all phones and carriers are on the same page as to what constitutes an MMS message. Perhaps your phone (or AT&T) doesn't support mp3 MMS messages?

I'm using an iPhone (AT&T), and I just push the messages as an email. No iPhone app for MMS exists (for non-jailbroken phones).
 

JasonL

Member
Joined
Sep 6, 2008
Messages
0
Reaction score
0
mms

This only happens when an mms is sent from the program. When I send an email from my gmail account with an mp3 attached to the mms address it comes accross just fine. It seems that the problem must be in the way the program attaches the file to the email.

My phone does support mp3 mms as I stated in my original post. I actually have the Blackberry Bold so I can just have them send to my email and it works just fine. But if I recieve the message as an mms instead of an email it is much easier because I dont have to download and save the file on my phone to play it. Since I am trying to get this to work for a group I have tried it with other peoples phones (not blackberry) also and they get the same error message "the file was removed from the message as not supported". But it works with all of them if I send a message from my gmail account with an mp3 attached. So I think the problem must be in the way the program attaches the mp3 to the message.
 
Last edited:

mst207

Member
Joined
Dec 21, 2008
Messages
7
Reaction score
0
E-mail is sent, but wav attachment is not

Hi there,

First of all, great software! Thank you for creating it!

I have installed the software and am using gmail as my smtp. When I generate the appropriate tones, I get an e-mail but no wav attachment. When I put lame.exe in the data directory, however, I get an mp3 attachment. Unfortunately, I need the wav because my blackberry won't accept mp3's (long story -- see many frustrated blackberry threads online).

Just to double check, I checked my GMail sent items and the blank e-mails with just the appropriate subject lines are all that appears to be sent. Can anyone think of why it's not sending off the wav's (which I can see have been created in the /data/audio directory) but will send mp3's if lame is installed?

Thank you!!
 
Status
Not open for further replies.
Top