TwoToneDetect New TwoToneDetect in the works - Python based

asmith136

Member
Joined
Aug 22, 2006
Messages
19
On V44 I setup the edit config info and saved it. when I exit the program with the exit button I get this error and the config file clears out.

Exception in Tkinter callback
Traceback (most recent call last):
File "E:\Python\build\pyi.win32\TwoToneDetect44\outPYZ1.pyz/Tkinter", line 141
0, in __call__
File "<string>", line 462, in exit
NameError: global name 'tone_tolerance' is not defined
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
On V44 I setup the edit config info and saved it. when I exit the program with the exit button I get this error and the config file clears out.

Exception in Tkinter callback
Traceback (most recent call last):
File "E:\Python\build\pyi.win32\TwoToneDetect44\outPYZ1.pyz/Tkinter", line 141
0, in __call__
File "<string>", line 462, in exit
NameError: global name 'tone_tolerance' is not defined

ah crud...another bug, I'll try to get it fixed tonight or tomorrow.

Andy
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
159
Location
Westminster, Ma
I have been having trouble getting version 43 and 44 to load properly. I have been using v40 with no problems, but now cannot seem to get that to load either.

Here is the error message I get when starting the program -

C:\twotonedetect44>twotonedetect44.exe
Traceback (most recent call last):
File "<string>", line 590, in <module>
File "<string>", line 444, in start
File "<string>", line 249, in Atone1
File "<string>", line 174, in record
File "E:\Python\build\pyi.win32\TwoToneDetect44\outPYZ1.pyz/pyaudio", line 714
, in open
File "E:\Python\build\pyi.win32\TwoToneDetect44\outPYZ1.pyz/pyaudio", line 396
, in __init__
IOError: [Errno Unanticipated host error] -9999

Could it have something to do with the sound card? Version 40 automatically choose my second sound card and there were no issues?

Any thoughts?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
I’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’t get the exe build I did to work. Is that something easy you can change and post?

If you have Python on your computer you should be able to run the .py file without building an executable. This lets you test code a lot faster without having to build each time. If you aren't able to run the .py file, check the errors that it gives, you're probably missing a module.

Changing to stereo record will take a few minor modifications. Normally it would be as easy as changing the "CHANNELS" parameter from 1 to 2. However, the same record function is used for the tone detection and the recording, and only mono should be used for tone detection. To get what you want, we need to make the CHANNELS parameter something that gets passed to the record function, which is very easy to do, and I can include that in the next release.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
I have been having trouble getting version 43 and 44 to load properly. I have been using v40 with no problems, but now cannot seem to get that to load either.

Here is the error message I get when starting the program -

C:\twotonedetect44>twotonedetect44.exe
Traceback (most recent call last):
File "<string>", line 590, in <module>
File "<string>", line 444, in start
File "<string>", line 249, in Atone1
File "<string>", line 174, in record
File "E:\Python\build\pyi.win32\TwoToneDetect44\outPYZ1.pyz/pyaudio", line 714
, in open
File "E:\Python\build\pyi.win32\TwoToneDetect44\outPYZ1.pyz/pyaudio", line 396
, in __init__
IOError: [Errno Unanticipated host error] -9999

Could it have something to do with the sound card? Version 40 automatically choose my second sound card and there were no issues?

Any thoughts?

Yikes that's an ugly one. Try manually editing your config file and set both the record and playback devices to zero (0) and see what happens.
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
159
Location
Westminster, Ma
OK, I have solved the problem. I have been accessing the computer via Remote Desktop and apparently you do not have complete control when using remote desktop. At the computer, there was no problem starting the program and I have it running now.

The audio thermometer seems a little high compared to the other versions. Will see how it works out.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
v45 Released

I just posted v45, which should correct the remaining issues with saving to the config file through the GUI. I think. Hopefully.

Andy
 

Jay911

Silent Key (April 15th, 2023)
Feed Provider
Joined
Feb 15, 2002
Messages
9,378
Location
Bragg Creek, Alberta
Not 2 instants after I installed 45, I had a page come through, and all appears to work fine. I even saved the configs thru the GUI, stopped, and restarted it - all OK.
 

Forts

Mentor
Database Admin
Joined
Dec 19, 2002
Messages
6,981
Location
Ontario, Canada
Is it just me, or is the new version fairly more CPU intensive than the previous LabView versions?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
Is it just me, or is the new version fairly more CPU intensive than the previous LabView versions?

What kind of numbers are you getting from Task Manager for the two? I've been getting similar if not lower numbers from the new versions as compared to the old.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
Is it just me, or is the new version fairly more CPU intensive than the previous LabView versions?

Did some more checking, and it looks like one of the instances of svchost.exe really starts gobbling up CPU when the program starts. I'll try to track down what's going on there, but no promises, I'm not a professional programmer or even a "good" one :D

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
Did some more checking, and it looks like one of the instances of svchost.exe really starts gobbling up CPU when the program starts. I'll try to track down what's going on there, but no promises, I'm not a professional programmer or even a "good" one :D

Andy

I think I found the problem, and should have it fixed in the next release. I had it opening and closing the audio stream every time it sampled, which was processor intensive. Instead I'll open the audio stream at the start of the program and leave it open, should reduce CPU load considerably.

Andy
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
159
Location
Westminster, Ma
Using TwoToneDetect with audio stream over the internet

I was curious if it would be possible to use the program with audio that streams over the internet. I assuming that my sound card would need that option on the recording side. Is that correct? Is does not look like any of my sound cards have that capability.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
v46 Released

I just posted v46, which should very significantly reduce CPU load when the program is running. I'd highly recommend grabbing this version.

v46 also adds SCAN/HOLD control functionality for Uniden DMA scanners, similar to the old Labview version. This will force the scanner to keep scanning (therefore skipping busy channels) until a valid tone set is detected. It will then hold the scanner on that channel until recording is finished, and then resume scanning. This allows a single DMA scanner to monitor multiple channels for pages, but this obviously raises the possibility of missing pages if two channels are active with pages at the same time.

I think my next step is going to be adding a radio frequency field to the tone definitions for use with the scanner control. This will allow filtering of tone sets by radio frequency so that if the same tone set is used on multiple channels the correct one can be identified.

Andy
 

johnmac

Member
Feed Provider
Joined
Oct 6, 2003
Messages
159
Location
Westminster, Ma
Anybody else have problems downloading v46? With me, it downloads a small amount of data and then stops. I have tried it on two different computers.
 

Jay911

Silent Key (April 15th, 2023)
Feed Provider
Joined
Feb 15, 2002
Messages
9,378
Location
Bragg Creek, Alberta
I use GetRight to download - it kept resuming it every minute or two and eventually downloaded.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,307
Anybody else have problems downloading v46? With me, it downloads a small amount of data and then stops. I have tried it on two different computers.

I've been having trouble uploading the files to SourceForge also, I think the problem is on that end.

Andy
 

Jay911

Silent Key (April 15th, 2023)
Feed Provider
Joined
Feb 15, 2002
Messages
9,378
Location
Bragg Creek, Alberta
I've been having trouble uploading the files to SourceForge also, I think the problem is on that end.

Andy

Entirely possible someone is nailing SourceForge with a DOS attack or some heavy downloading/uploading. Version 46 did run for me once it was actually downloaded.
 
Top