TwoToneDetect New TwoToneDetect in the works - Python based

asmith136

Member
Joined
Aug 22, 2006
Messages
19
I have tried both v41 and v42 and keep getting this error.

TwoToneDetect41.py:247: RuntimeWarning: divide by zero encountered in log10
Traceback (most recent call last):
File "<string>", line 476, in <module>
File "<string>", line 432, in start
File "<string>", line 247, in Atone1
OverflowError: cannot convert float infinity to integer

C:\TwoTone41>
 

asmith136

Member
Joined
Aug 22, 2006
Messages
19
i've tried both v41 and v42 a keep getting the following error

TwoToneDetect41.py:247: RuntimeWarning: divide by zero encountered in log10
Traceback (most recent call last):
File "<string>", line 476, in <module>
File "<string>", line 432, in start
File "<string>", line 247, in Atone1
OverflowError: cannot convert float infinity to integer

C:\TwoTone41>
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
i've tried both v41 and v42 a keep getting the following error

TwoToneDetect41.py:247: RuntimeWarning: divide by zero encountered in log10
Traceback (most recent call last):
File "<string>", line 476, in <module>
File "<string>", line 432, in start
File "<string>", line 247, in Atone1
OverflowError: cannot convert float infinity to integer

C:\TwoTone41>

Yep, that's the bug that I think I tried to quickly fix in v42. Even if v42 there's still a chance of still getting that error, but I'll fully address the problem in v43. It's an issue that will happen more on some sound cards than others.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
v43 Released

I just posted v43

Version 43 Release Notes:
- Math bug fix (infinity issue)
- Added GUI for config file editing

Let me know if this fixes the bug with v41 and v42.

Thanks,

Andy
 

onoff

Newbie
Joined
Aug 2, 2011
Messages
1
No Email

In version 43 I don't seem to get any email. I worked great with version 40 but with version 43 I don't get any emails. I have checked and rechecked my user name and password.
 

asmith136

Member
Joined
Aug 22, 2006
Messages
19
I've setup V43 and did some testing with my department tones and found that the tone detect is very wide. My first tone of 1450.0Hz gets detected from 1422.0Hz to 1477.0Hz. I setup the tone tolerance to 0% and still have the same problem.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
I've setup V43 and did some testing with my department tones and found that the tone detect is very wide. My first tone of 1450.0Hz gets detected from 1422.0Hz to 1477.0Hz. I setup the tone tolerance to 0% and still have the same problem.

You found a bug in the code that saves that parameter in the config file. I'll get it fixed in the next release. Until then, you can manually edit the config file to adjust the tolerance down.


Andy
 

asmith136

Member
Joined
Aug 22, 2006
Messages
19
I think I found another bug. I am using the same setting as v40 that worked fine in v43 I get this error
A Tone Found!
Checking for B Tone
Checking for B Tone
Tone Set Found!
Fire Department 1
????????????@vzwpix.com
delay timer
waiting for audio
recording audio
done writing WAV
LAME 3.98.4 32bits (www)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 5379 Hz - 5513 Hz
Encoding ./audio/Fire_Department_1_2011-08-0311_58_18_796000.wav
to ./audio/Fire_Department_1_2011-08-0311_58_18_796000.mp3
Encoding as 11.025 kHz single-ch MPEG-2.5 Layer III (11x) 16 kbps qval=3
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
180/180 (100%)| 0:00/ 0:00| 0:00/ 0:00| 204.44x| 0:00
-------------------------------------------------------------------------------
kbps mono % long switch short %
16.0 100.0 96.7 2.2 1.1
ReplayGain: -6.8dB
done converting to MP3
Unhandled exception in thread started by <function alert at 0x014EE7F0>
Traceback (most recent call last):
File "<string>", line 241, in alert
File "<string>", line 150, in mail
File "E:\Python\build\pyi.win32\TwoToneDetect43\outPYZ1.pyz/smtplib", line 604
, in login
smtplib.SMTPAuthenticationError: (535, '5.7.0 ...authentication rejected (2)')
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
File "E:\Python\build\pyi.win32\TwoToneDetect43\outPYZ1.pyz/smtplib", line 604
, in login
smtplib.SMTPAuthenticationError: (535, '5.7.0 ...authentication rejected (2)')

That means it couldn't log in to your SMTP server. Make sure your email settings (username, password, etc.) are correct. Note that when you enter your password in using the GUI it doesn't need to be encoded in base64, the program takes care of encoding it before writing it to the config file.

Andy
 

GTR8000

NY/NJ Database Guy
Database Admin
Joined
Oct 4, 2007
Messages
15,372
Location
BEE00
I'm having issues that I believe are related to the sound card I'm using. The program hangs or crashes whenever I try to select that sound card.

The sound card in question is a Creative Labs SB Live! Wave Device which relies on a background program devldr32.exe to function properly. I believe the conflict lies between TwoToneDetect and devldr32.exe.
 

Buttescan

Member
Feed Provider
Joined
Aug 21, 2009
Messages
11
Location
Chico, CA
One other thing to consider is that a number of fire agencies are trying to reduce overall radio traffic on impacted channels by cutting two-tone times in half. In our county, Cal-Fire has cut the normal 1 second by 3 second two-tone series to something like .5 seconds by 1.5 seconds. I've heard of other agencies following suit.

Mike
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
159
Location
Westminster, Ma
Is there a new py file for version 43? I copied the one from version 40 and can not get it to work.

I have the same error message about not being able to access the smtp server.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
Is there a new py file for version 43? I copied the one from version 40 and can not get it to work.

I have the same error message about not being able to access the smtp server.

The .py file is the raw source code, it's not needed to run the program. I've just been including it in the package for those who want to look at the source. You've just reminded me that I forgot to include it with v43.

Have you tried a gmail account for sending? I think your issue may be ISP-specific, but I'm not positive. I have an idea for a fix, but it's lower on the list for now.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
One other thing to consider is that a number of fire agencies are trying to reduce overall radio traffic on impacted channels by cutting two-tone times in half. In our county, Cal-Fire has cut the normal 1 second by 3 second two-tone series to something like .5 seconds by 1.5 seconds. I've heard of other agencies following suit.

Mike

That's something that could be addressed, but for now the algorithm is just targeting the standard QuickCall2 timing. The program should still be able to detect the timing you describe. The algorithm "as is" needs to see the A tone for .4 seconds, and then the B tone for .4 seconds within 4 seconds of the A tone being detected.

Places that cut the tone times down do so with the tradeoff of decreased alerting reliability/range. If the transmitter coverage is good enough, that may not be an issue for them.

In software, the tradeoff of a quicker detection time is a smaller FFT size, which results in less frequency resolution and therefore a wider tone tolerance.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
v44 Released

I just posted v44, which is just bug fix related to saving the tone tolerance parameter to the config file.

Andy
 

asmith136

Member
Joined
Aug 22, 2006
Messages
19
did you ever get a to put a list together on what modules are needed to build an exe?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,298
did you ever get a to put a list together on what modules are needed to build an exe?

Here are the "extra" modules I've installed:

Tkinter (this is packaged with Python)
ttk (this is usually packaged with Tkinter on newer Python releases)
pyaudio
pyinstaller
numpy
scipy
iniparse

Here's the script I use to build the EXE using pyinstaller:

c:\Python27\Pyinstaller\Makespec.py --onefile --tk e:\python\TwoToneDetect44.py
c:\Python27\Pyinstaller\Build.py TwoToneDetect44.spec

I hope that helps...if you make any improvements you think are worth sharing and want to get set up as a developer on SourceForge, let me know.

Andy
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
159
Location
Westminster, Ma
Have you tried a gmail account for sending? I think your issue may be ISP-specific said:
I have previously had version 40 running fine.No crashes or anything. I will do some more experimenting today. My ISP is Comcast. Also working fine on the old version, just need to reboot the computer every few days so it does not crash.Some of this may be a problem with my computer, as I can no longer get version 40 to load. The old version is running on a different computer.

John
 

asmith136

Member
Joined
Aug 22, 2006
Messages
19
I&#8217;m not looking to be a developer. I am just learning Python. This is something I always wanted to learn but never did. Your program makes it more interesting to learn. 1 of the things I would like to change is stereo record instead of mono but I can&#8217;t get the exe build I did to work. Is that something easy you can change and post?
 
Top