TwoToneDetect New TwoToneDetect in the works - Python based

brian

DB Administrator
Database Admin
Joined
Dec 10, 2000
Messages
2,142
Location
South Carolina
That's a tricky one. What you'll want to try to accomplish is to get the recording from the first page stopped before the second tone triggers. If the second tone triggers while the first one is still recording, it will wipe the audio prior to the second tone from the first recording. So to do this, you'll want the Record Time set fairly short (slightly longer than the longest time it takes them to start talking after the page is sent...maybe 10 seconds?), and also set the Record Release Time pretty short - maybe 1.5 seconds or 2 seconds instead of the default 3 seconds.

If you can't get a good combination of those settings working, let me know and I'll think about how to implement some additional timing logic in the stacked recording feature to address this.

Andy

Thanks for your reply, Andy. I figured that's what you would say. If at any time during a recording another set of tones is detected, it is assumed to be a stacked page, even if there was voice audio in between.

I have recording time set to 40s because sometimes there are situations where the voice dispatch is delayed quite a long time after the tones drop. Sometimes 10 seconds or more, with some particular dispatchers, which is quite annoying. If I shorten the record time, I'll miss those voice dispatches.

Now that you have verified the logic of how it works, I'll play with it and see how to optimize it. I assume the checkbox for "Extended Recording for Stacked Pages" disables the stacked page feature when it is unchecked? That's probably what I'll opt for given the variability with the way dispatches occur here.
 

gcfiremedic

Newbie
Joined
Jan 9, 2017
Messages
1
trouble receiving recorded pages on phone

OK, so I have played with this software for most the day and I can now send admin emails through the system. More importantly though I still have not had any luck getting it to recognize/ forward to any cellular devices any test pages that I have our dispatch center send. Please let me know where I may be going wrong here as the main focus for us here is to be able to receive the recorded dispatch message on our cellular devices. I'm sure this is probably something simple but I'm not finding it at this point and i have tried to read through your message boards to help find a solution. I am running windows 7 professional software if that makes a difference.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,311
Thanks for your reply, Andy. I figured that's what you would say. If at any time during a recording another set of tones is detected, it is assumed to be a stacked page, even if there was voice audio in between.

I have recording time set to 40s because sometimes there are situations where the voice dispatch is delayed quite a long time after the tones drop. Sometimes 10 seconds or more, with some particular dispatchers, which is quite annoying. If I shorten the record time, I'll miss those voice dispatches.

Now that you have verified the logic of how it works, I'll play with it and see how to optimize it. I assume the checkbox for "Extended Recording for Stacked Pages" disables the stacked page feature when it is unchecked? That's probably what I'll opt for given the variability with the way dispatches occur here.

40 seconds is a pretty long time for that setting. Keep in mind that the value in that setting is a minimum record time, and that the program will continue recording after that time as long as it continues to see audio without a silence longer than the "record release time". Unless you could potentially have a delay of 40 seconds between tone and start of the voice transmission, I'd reduce that considerably.

Andy
 

chieftech77

Member
Joined
Dec 15, 2016
Messages
5
Hello again! My setup in testing is working pretty well. I haven't rolled it out to the department yet, as I want to make sure it is 100% (or, well close anyway). So I noticed a couple of things that I could use some assistance on:

First, can the system silence/exclude/treat as stacked tones/etc DTMF tones that are included in the page broadcast? (Sounds like an old touch tone phone dialing) - These tones come right after the pager tones and are for the siren activation.

Second, I haven't fully recreated this scenario every time, but (at times) during mutiple sets of tones, (We have separate tones for fire, ambulance, and paramedics) The voice will only record on one of the mp3s. So like the other day there was a wreck and they toned out all three.The first tone/mp3 recorded silence (well you could hear remnants of the tone at the beginning and the radio click) The second tone/mp3 was the DTMF for the siren then the third tone/mp3 recorded the voice broadcast. At times it behaves correctly and puts the voice broadcast on all three mp3s.

Thanks again for the help!
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,311
First, can the system silence/exclude/treat as stacked tones/etc DTMF tones that are included in the page broadcast? (Sounds like an old touch tone phone dialing) - These tones come right after the pager tones and are for the siren activation.

No, TTD does not do any DTMF detection.

Second, I haven't fully recreated this scenario every time, but (at times) during mutiple sets of tones, (We have separate tones for fire, ambulance, and paramedics) The voice will only record on one of the mp3s. So like the other day there was a wreck and they toned out all three.The first tone/mp3 recorded silence (well you could hear remnants of the tone at the beginning and the radio click) The second tone/mp3 was the DTMF for the siren then the third tone/mp3 recorded the voice broadcast. At times it behaves correctly and puts the voice broadcast on all three mp3s.

This could be to some configuration settings that need to get tweaked, or it could be a sound card issue. What are your settings for Record Time, Record Release Time, Record Delay, and are you using the stacked tone recording extension setting?

Andy
 

chieftech77

Member
Joined
Dec 15, 2016
Messages
5
This could be to some configuration settings that need to get tweaked, or it could be a sound card issue. What are your settings for Record Time, Record Release Time, Record Delay, and are you using the stacked tone recording extension setting?

Andy

Here are my settings in config:

record_seconds = 15
record_delay = 6
tone_tolerance = 0.03
audio_threshold = 54
tone_offset = 0.0
release_time=3.0
stacked_extend_record = 1
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,311
Here are my settings in config:

record_seconds = 15
record_delay = 6
tone_tolerance = 0.03
audio_threshold = 54
tone_offset = 0.0
release_time=3.0
stacked_extend_record = 1

Those settings seem reasonable. I would suggest trying a different sound card and see if you get any different results. Some sound cards have issues with multiple processes attempting to access data at the same time.

Andy
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,311
v69 Released

v69 is available here. I haven't created on link on the website yet, I'll wait a few days and get feedback from everyone here before making it the "official" latest release.

I've also spent some time working on a version of TTD that will accept audio data via stdin rather than a sound card, which should allow it to work with RTL dongles running rtl_fm. So far I haven't had luck doing this in Windows, but am getting close to getting it running on a Raspberry Pi. Still more work to do, and it may have some quirks and limitations, so not sure how useful it'll end up being, we'll see.

Version 69 Release Notes
- Added additional parameter to config.cfg to allow emails to be sent sequentially (individually) to each email in a separate message rather than as a group email.
- email_send_sequential = [“none”, “all”, or “Verizon”]
- When set to “none”, a single email is sent to the group.
- When set to “all”, individual emails are sent to all users.
- When set to “Verizon”, individual emails are sent to @vzwpix.com and @vtext.com addresses, and a single email is sent to all other users.​
- Added additional parameter to config.cfg to allow more flexibility with email SMTP settings.
- SSL, STARTTLS are no longer tied to a specific email port, but can be chosen for any port.
- email_security = [“SSL”,”STARTTLS”, or “none”]
- email_authentication = [“1” or “0”] (unchanged from v65 – set to 0 to use with a local SMTP server that does not require username/password authentication)​
- Added a start_minimized parameter to config.cfg to start the program minimized to the taskbar for automatic restart applications. To start the program minimized, use start_minimized = 1
- Added an instance_id parameter to config.cfg to add custom text to the title bar of the program to allow easy differentiation of multiple instances of the programming running on the same PC. For example, instance_id = Clark County Fire will put “Clark County Fire” in the title bar next to “TwoToneDetect”
- Added option to allow text-only emails to be sent before or after (or both) audio recording. This allows a text email to be sent containing a hyperlink to an audio file that has been uploaded to a web server using the post_email_command parameter. This option specified indivudually for each tone set in tones.cfg using the text_email_send parameter. Valid values are ‘before record’, ‘after record’, or ‘both’. For example: text_email_send = after record
- Packaged ftpuploader.exe and ftpuploader.py along with TwoToneDetect to simplify uploading audio files to a web server via FTP. See this page for usage details.
- Misc. bug fixes and debugging output changes
 
Last edited:

BigRedBox80

Member
Feed Provider
Joined
Apr 23, 2015
Messages
172
v69 is available here.

Version 69 Release Notes

- Added a start_minimized parameter to config.cfg to start the program minimized to the taskbar for automatic restart applications. To start the program minimized, use start_minimized = 1
- Added an instance_id parameter to config.cfg to add custom text to the title bar of the program to allow easy differentiation of multiple instances of the programming running on the same PC. For example, instance_id = Clark County Fire will put “Clark County Fire” in the title bar next to “TwoToneDetect”


Absolutely FANTASTIC, THANK YOU!
 

BigRedBox80

Member
Feed Provider
Joined
Apr 23, 2015
Messages
172
Running right from the extracted folder I get this, same with the debug (except it closes right away).
 

Attachments

  • 22223315012017.png
    22223315012017.png
    5.6 KB · Views: 242

Dygear

Member
Joined
Nov 18, 2010
Messages
74
Location
Levittown, NY
I've also spent some time working on a version of TTD that will accept audio data via stdin rather than a sound card, which should allow it to work with RTL dongles running rtl_fm. So far I haven't had luck doing this in Windows, but am getting close to getting it running on a Raspberry Pi. Still more work to do, and it may have some quirks and limitations, so not sure how useful it'll end up being, we'll see.

Did that feature land in TTD v69, and what must we do in order to make that work?

Running right from the extracted folder I get this, same with the debug (except it closes right away).

http://stackoverflow.com/questions/24517754/python-official-installer-missing-python27-dll

Looks like you need to install python from the msi package from here ... https://www.python.org/downloads/
 

JH49

Member
Joined
Jun 22, 2016
Messages
13
I'm getting the following error on the Raspberry Pi running Ubuntu Mate.

pi@ttd:~/TTD$ python TonesEditor8c.pyc
Traceback (most recent call last):
File "TonesEditor8c.py", line 30, in <module>
ImportError: No module named TTD

python TwoToneDetect69Pi.pyc
Traceback (most recent call last):
File "TwoToneDetect69Pi.py", line 40, in <module>
ImportError: No module named TTD
 

Westernbound

Member
Joined
Aug 11, 2014
Messages
35
Location
Dickens TX
No Email

v69 is available here. I haven't created on link on the website yet, I'll wait a few days and get feedback from everyone here before making it the "official" latest release.

I can not send test emails using the tones editor in v69. I tried and it works fine in v68 but not in v69. I use Gmail and I have tried using 2 different configurations. I have tried Port 465 using SSL and also using port 587 and STARTTLS. Both of those configurations show the emails have been sent but they do not appear in my sent items folder and they are not received. Also for all of these tests I am set to "email_send_sequential = all". I am using my testing tone and have only 1 address(mine) in the txt, amr, & mp3 boxes.

Thanks - Marvin
 
Last edited:

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,311
I'm getting the following error on the Raspberry Pi running Ubuntu Mate.

pi@ttd:~/TTD$ python TonesEditor8c.pyc
Traceback (most recent call last):
File "TonesEditor8c.py", line 30, in <module>
ImportError: No module named TTD

python TwoToneDetect69Pi.pyc
Traceback (most recent call last):
File "TwoToneDetect69Pi.py", line 40, in <module>
ImportError: No module named TTD

doh. I forgot to package TTD.pyc in the .zip file. I just uploaded a new .zip (same link) that contains that file. Grab that one and try it.

Andy
 
Top