TwoToneDetect New TwoToneDetect in the works - Python based

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,358
Location
Massachusetts
John makes a good point. Always restart the program after making any changes. Even if you are making changes to the tone sets or emails in the tones file, need to restart.



I reset the input and output devices to zero, restarted the program and changed the sound cards in the program. Discovered that I had to exit and re-start for it to take effect. .
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
153
Location
Westminster, Ma
I have been experimenting with the new version 48. Not sure what is happening, as I have not been in front of the monitor when the tones go off. But, it indicates that a recording has been made and an email has been sent. There are no recordings and no email. I am wondering if these are false alerts. I have attached the log file, it does not look the same as the older version when a tone is received.
 

Attachments

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,239
I have been experimenting with the new version 48. Not sure what is happening, as I have not been in front of the monitor when the tones go off. But, it indicates that a recording has been made and an email has been sent. There are no recordings and no email. I am wondering if these are false alerts. I have attached the log file, it does not look the same as the older version when a tone is received.
John,

With v48, the "emails" parameter in the configuration file has been changed to mp3_Emails or amr_Emails, depending on whether you want to get files with mp3 or AMR format attachments. I suspect that your config file might still be using "emails". If that's the case, change it to "mp3_Emails" and it should work for you.

Based on the log file, it's recording audio, but it's not converting it, which is a symptom of not having the configuration file correct.

Andy
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
153
Location
Westminster, Ma
John,

With v48, the "emails" parameter in the configuration file has been changed to mp3_Emails or amr_Emails, depending on whether you want to get files with mp3 or AMR format attachments. I suspect that your config file might still be using "emails". If that's the case, change it to "mp3_Emails" and it should work for you.

Andy
I'm all set now, corrected the programming in the tones.cfg file to mp3_emails and the program is now working fine. I have noticed that the Weather Program I also run on the same computer is now crashing all the time. Not sure if it is related to this new version or not. Will shut it down for awhile and see what happens. Hopefully it is not the Two Tone software.
 

Theroofable

Member
Premium Subscriber
Joined
Apr 14, 2010
Messages
39
Whenever I try and edit the .cfg file to add what I need, it wont open. Is there a program I need to have to get that to work? I am interested in getting the python version up and running. I did download the lame.exe. Thanks for the help!
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
153
Location
Westminster, Ma
You should be able to open the .cfg file in Notepad. When you save it make sure you use the "save" tab and not the "save as" tab. If you do end up using the "save as" tab make sure you add the .cfg at the end or it will save it as a .txt file and not a .cfg file.
 
Last edited:

Theroofable

Member
Premium Subscriber
Joined
Apr 14, 2010
Messages
39
Thanks alot for that! Are you supposed to erase the ";" that separate the command from the instructions it gives? I got it to start now, but now it gives me a few lines and then crashes. I got a screen shot of what it was.
Line 98 in <module>
File "File location", line 76, in b64decode
Type error: incorrect padding.
Im thinking it has something to do with the ";"s
Thanks for the help!
 

Manichee

Member
Joined
Apr 16, 2007
Messages
30
Location
Currituck, NC
You really shouldn't edit the config.cfg file, you can change those values from within the program itself, the only file you should edit would be the tones.cfg. I would re-download and start from a fresh config.cfg and start the program by running the exe.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,239
Thanks alot for that! Are you supposed to erase the ";" that separate the command from the instructions it gives? I got it to start now, but now it gives me a few lines and then crashes. I got a screen shot of what it was.
Line 98 in <module>
File "File location", line 76, in b64decode
Type error: incorrect padding.
Im thinking it has something to do with the ";"s
Thanks for the help!
The error you're getting is because the password is supposed stored in the config file in a non-readable (base64) form. Follow Manichee's advice and you should be able to get it working. Instead of manually editing the config file, start the program and then click on the menu item to edit the config info.

Andy
 

Theroofable

Member
Premium Subscriber
Joined
Apr 14, 2010
Messages
39
I will try this when I get home. However i do not remember seeing a menu. Do I have to start at the v30 or can i just dowload the latest version, I didnt see the config in the latest download. I hope i can get it working tonight when i have time. Thanks for the help!
 

Theroofable

Member
Premium Subscriber
Joined
Apr 14, 2010
Messages
39
Ok, I got it working, ran a few test pages and it works great, good sound clarity when sent as an mp3 through email, but it removes the attachment when it is sent to my phone(verizon). Not sure if there is a fix for it, or it is on the list for the future. Ill see how long it will stay running.
Thanks!
 

bendsley

Member
Feed Provider
Joined
Dec 22, 2006
Messages
6
Location
Coshocton, OH
Error

I would first like to thank Andy for all of his hard work. I have been using the Labview version and I am now trying to switch to the Python version. I am getting the following error on the Python version. Anyone have any advice? Thanks in advance!

A Tone Found!
Checking for B Tone
Checking for Long Tone
TwoToneDetect46.py:311: RuntimeWarning: invalid value encountered in log10
barvar.set(int(np.log10(max(abs(audio_data)))/np.log10(32768)*100))
Exception in Tkinter callback
Traceback (most recent call last):
File "E:\Python\build\pyi.win32\TwoToneDetect46\outPYZ1.pyz/Tkinter", line 141
0, in __call__
File "E:\Python\build\pyi.win32\TwoToneDetect46\outPYZ1.pyz/Tkinter", line 495
, in callit
File "<string>", line 515, in start
File "<string>", line 311, in Atone1
ValueError: cannot convert float NaN to integer
 

Theroofable

Member
Premium Subscriber
Joined
Apr 14, 2010
Messages
39
Put only the components you need into a folder, the program, lame.exe, and the config files, and make no adjustments until the menu pops up. This should get it to work properly, also make sure its the latest version of it. I have been running the program for a few days now, and its been working great. However, I still havent figured out how to keep it from removing the mp3 attachment to my verizon phone. Does anyone have any idea how to fix this?
 

Manichee

Member
Joined
Apr 16, 2007
Messages
30
Location
Currituck, NC
...However, I still havent figured out how to keep it from removing the mp3 attachment to my verizon phone. Does anyone have any idea how to fix this?
That is something on Verizons end. Make sure you are using phonenumber@vzwpix.com. Verizon used to strip any sound files from messages cause they of course wanted you to pay for it. I don't know if they still do that.
 

Theroofable

Member
Premium Subscriber
Joined
Apr 14, 2010
Messages
39
Tried that, now it comes in with the attachment, but it says unknown and wont open. I will have to test it again and see if anything changes. Thanks for the reply!
 

oab2

Member
Feed Provider
Joined
Oct 13, 2010
Messages
16
What is the easiest way to find out what my tones are? Also when I start the exe it gives me a "Windows - No Disk" error, where I can cancel, try again or continue. Choosing continue twice takes me into the gui. Any idea why I am getting this?
 

oab2

Member
Feed Provider
Joined
Oct 13, 2010
Messages
16
What is the easiest way to find out what my tones are?
I was able to find the pdf on using audacity to find the tones. However I can't find the link for where the frequencies can be compared to the known two tone paging frequencies.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,239
v49 Released

I just uploaded version 49.


Version 49 Release Notes:
  • Adds a feature that allows you to exclude emails from being sent during a certain time of day. This is designed to eliminate emails from nightly test pages. This is configured independently for each tone set in the tones.cfg file. See the sample tones.cfg file for details. Times must be in 24 format (i.e. 13:35 is 1:35 p.m.). The three new parameters are exclude_from, exclude_to, and exclude_emails
  • MAJOR CHANGE in the way mp3 and AMR files are created. Rather than using the LAME.exe and Nokia Multimedia Converter, the program now uses ffmpeg.exe. This program handles both mp3 and AMR files, and can be downloaded here:
    Zeranoe FFmpeg - Builds
    You want the latest Windows 32 bit static build.
    Or more specifically here:
    http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-git-a254452-win32-static.7z

Also, another developer has started working on this project. I'll let him identify himself here if he so chooses, but he's actually a "real programmer" and has completely redone the code to make it much cleaner and more functional, and has added a number of new features. These changes will be rolled out in a future release, as we're still working on coordinating our coding efforts.

Andy
 

oab2

Member
Feed Provider
Joined
Oct 13, 2010
Messages
16
I have downloaded it and am giving it a try. I still get the "Windows - No Disk" error. Any idea what that is from? Also, does python usually take a fair amount of CPU resources to run?
 
Top