TwoToneDetect TwoToneDetect on a Raspberry Pi - How To

Status
Not open for further replies.

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,555
Location
Massachusetts
Thanks DC31,

Figured it was normal, since I was getting detections... Already expanded the file system and setup a reboot command...just going to work on implementing the Audio folder dump.

Another Question....I have a 7.1 Surround Sound card hooked into the rPi and this sound card has 2 inputs ( 1 Input and 1 Mic) I have TTD hooked into the Mic. Can I hook another audio source to Input and use another instance of TDD and also Darkice?

The pi sees the usb sound card as one device, I believe so I don't think you can put multiple streams into the single sound card. You can, however, easily plug in a second usb sound card for a different audio source. You can also stream to darkice and TTD using the same sound card. They just listen to the same audio. Mine run this way 24/7.

Somewhere back in the archives of this forum there are instructions on how to set up two usb sound cards.
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Thanks again DC31,

I guess i'll just buy one of the cheap sound cards and use that. I'm just trying to get it all setup and working like I had on the pc. 1TTD For my local FD, and 1TTD and Scanner Cast for the enitre region. I hoping to code a few more items into the Pi...
 

huffy2404

Member
Joined
Jan 22, 2015
Messages
3
Well I finally pulled the trigger, after a couple years running TTD on my windows machine I figured i'd give RPI a try. From what I can see I have gotten TTDpi up and running on the RPI B+ following the instructions, with a few edits of my own. and over the past night had a few calls detected correctly. Audio sounds great...I say better than my windows machine. But I am still baffled as to why its working so good.

...

Hi Taylor, do you mind explaining what you did to get TTD running on a B+? I am struggling with this myself.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,555
Location
Massachusetts
Hi Taylor, do you mind explaining what you did to get TTD running on a B+? I am struggling with this myself.

Huffy,

As I recall, setting the B+ up from scratch either can't be done or is complicated by something. The way that I have gotten TTD running on a B+ is to take a working image from a Model B, upgrade the OS to the current, then install the image in the B+. Of course, doing it this way requires that you have a Model B at your disposal...

If you would like a copy of my working B+ image, shoot me a Private Message with your email and I will send you the link to the image and instructions.

Jim
 

hazard78

Member
Feed Provider
Joined
Apr 1, 2003
Messages
49
Location
St Clair, mi
format

does anyone have this already written in a file they can send. im just looking for format, i can change to my info just looking for format.:)
 

huffy2404

Member
Joined
Jan 22, 2015
Messages
3
Huffy,

As I recall, setting the B+ up from scratch either can't be done or is complicated by something. The way that I have gotten TTD running on a B+ is to take a working image from a Model B, upgrade the OS to the current, then install the image in the B+. Of course, doing it this way requires that you have a Model B at your disposal...

If you would like a copy of my working B+ image, shoot me a Private Message with your email and I will send you the link to the image and instructions.

Jim

Jim,
I ran into the same issues when trying to set this up on my Model B, so I would like to give your image a try. I don't have permission to PM you, I guess due to my low post count, so I'll just give you my junk email address here. It's huffy2404@yahoo.com. Thanks for your willingness to help.
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Sorry for the delay, haven't been following this post to closely.

huffy2404, I honestly do not remember exactly how I got it up and running. I mainly followed the steps provided on the twotonedetect.net site, and when I ran into a road block looked it up on google...I do remember some issues with the jackd server but for the life of me remember what it was.

I can say that after getting it running, everything seems to work perfectly. I just got two instances of TTD running following the steps previously in the thread and I am also rebroadcasting one to broadcastify using the liquidsoap app (Seemed easier then following the steps for darkice).
 

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
Thanks for the help from everyone I now have v67 running on my pi and streaming with darkice working for 5 days straight. But, it takes almost a full minute to decode 30 sec of audio file. Wav to mp3 and amr. On desktop it only takes seconds. Anything thoughts on how to get the decode faster? -- Here is the log file DC31 (i cut out most of the freq and level info to save space)

Township Fire All Pi Tone Set Found
delay timer Township Fire All Pi 12:00:20 on 02/02/15
Freq: 1005.0 Level: 32766.1301978
2.5
Freq: 1005.0 Level: 32766.1301978
Freq: 1005.0 Level: 32766.9822488
Freq: 1010.0 Level: 2895.07791738
delay done Township Fire All Pi 12:00:23 on 02/02/15
waiting for audio Township Fire All Pi 12:00:23 on 02/02/15
mono
Freq: 1010.0 Level: 2573.64205113
threshold exceeded
recording audio Township Fire All Pi 12:00:23 on 02/02/15
Freq: 387.0 Level: 21959.6763023
Waiting for Silence Township Fire All Pi 12:00:51 on 02/02/15
Done recording Township Fire All Pi 12:01:06 on 02/02/15
Freq: 1010.0 Level: 3791.49889791
Freq: 1010.0 Level: 3870.40592549
done writing WAV Township Fire All Pi 12:01:07 on 02/02/15
Succesfully retrieved local tone info at 12:01:26 on 02/02/15
Tone1
done converting to MP3 Township Fire All Pi 12:01:43 on 02/02/15
done converting to AMR Township Fire All Pi 12:02:33 on 02/02/15
MP3 Email sent! Township Fire All Pi page received at 12:00:19 on 02/02/15 12:02:43 12:02:43 on 02/02/15
AMR Email sent! Township Fire All Pi Page Received at 12:00:19 on 02/02/15 12:02:46 12:02:46 on 02/02/15
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,555
Location
Massachusetts
Thanks for the help from everyone I now have v67 running on my pi and streaming with darkice working for 5 days straight. But, it takes almost a full minute to decode 30 sec of audio file. Wav to mp3 and amr. On desktop it only takes seconds. Anything thoughts on how to get the decode faster? -- Here is the log file DC31 (i cut out most of the freq and level info to save space)

Township Fire All Pi Tone Set Found
delay timer Township Fire All Pi 12:00:20 on 02/02/15
Freq: 1005.0 Level: 32766.1301978
2.5
Freq: 1005.0 Level: 32766.1301978
Freq: 1005.0 Level: 32766.9822488
Freq: 1010.0 Level: 2895.07791738
delay done Township Fire All Pi 12:00:23 on 02/02/15
waiting for audio Township Fire All Pi 12:00:23 on 02/02/15
mono
Freq: 1010.0 Level: 2573.64205113
threshold exceeded
recording audio Township Fire All Pi 12:00:23 on 02/02/15
Freq: 387.0 Level: 21959.6763023
Waiting for Silence Township Fire All Pi 12:00:51 on 02/02/15
Done recording Township Fire All Pi 12:01:06 on 02/02/15
Freq: 1010.0 Level: 3791.49889791
Freq: 1010.0 Level: 3870.40592549
done writing WAV Township Fire All Pi 12:01:07 on 02/02/15
Succesfully retrieved local tone info at 12:01:26 on 02/02/15
Tone1
done converting to MP3 Township Fire All Pi 12:01:43 on 02/02/15
done converting to AMR Township Fire All Pi 12:02:33 on 02/02/15
MP3 Email sent! Township Fire All Pi page received at 12:00:19 on 02/02/15 12:02:43 12:02:43 on 02/02/15
AMR Email sent! Township Fire All Pi Page Received at 12:00:19 on 02/02/15 12:02:46 12:02:46 on 02/02/15


A couple more questions:
1. in your config.cfg what is the bitrate?
2. are you hosting your tones.cfg remotely?
3. Have you tried disabling darkice? It almost looks like something else is using resources.
4. Have you expanded the file system to fill the SD card?

Mine takes about 15 seconds from the "Done writing WAV" to the Email sent. And I am running darkice also.

In the past I experienced delays when hosting tones.cfg remotely. Do all your decodes have the "Successfully retrieved" line in there? I thought that the program now only retrieved the email information at a set interval not every time a tone is decoded.

Jim
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Quick question,

Does anyone have a working Image for a B+, Just wondering if I could try it out. I am running into some issues with liquidsoap requiring a restart every 12 hrs. Plus I think there may be more efficent ways at running everything on the pi
 

aliby19

Member
Feed Provider
Joined
Mar 10, 2005
Messages
147
Location
Indianapolis, IN
Just upgraded from a Raspberry Pi B to a B+ for TwoToneDetect (and two scanner feeds). For some reason, on the B+, the CPU utilization goes to 100% almost instantaneously after boot, with PulseAudio showing as the biggest consumer of CPU.

This definitely has an effect on TwoToneDetect when it's running -- It ends up being anywhere between 5-30 seconds behind in detecting the tone audio, and because of this, ends up missing pages, or never sending the email. If the email does go out, it ends up with blank audio.

Any idea why this might be? This seemingly happens right away on boot, even when none of the applications are running (TTD, Darkice, etc.)

Thanks!
 

aliby19

Member
Feed Provider
Joined
Mar 10, 2005
Messages
147
Location
Indianapolis, IN
FYI for anyone having similar CPU issues - I modified the bitrate settings in the respective darkice configurations of my two scanner feeds. That seems to have helped alleviate the 100% CPU usage issue.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,555
Location
Massachusetts
I downloaded your img to try it out. I disk part the sd card and used win32 disk imager to install the img. But, when i try to start my pi up, the green light flashes two times and then nothing. I have a B+ pi.

Same thing here, Andy.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,303
For those who tried the image, what size SD card did you try it with? I think I may have found the issue, and it appears that the image works with 8 GB and larger cards, but not 4 GB. I'll try to get a 4GB compatible image out soon.

Andy
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,555
Location
Massachusetts
For those who tried the image, what size SD card did you try it with? I think I may have found the issue, and it appears that the image works with 8 GB and larger cards, but not 4 GB. I'll try to get a 4GB compatible image out soon.

Andy

My failed attempt was with an 8 gb card.
 
Status
Not open for further replies.
Top