Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Ask Slashdot: How To Build a Morse Code Audio Library For Machine Learning?

timothy posted about 4 months ago | from the wax-cylinders-all-the-way dept.

AI 79

New submitter mni12 writes "I have been working on a Bayesian Morse decoder for a while. My goal is to have a CW decoder that adapts well to different ham radio operators' rhythm, sudden speed changes, signal fluctuations, interference, and noise — and has the ability to decode Morse code accurately. While this problem is not as complex as speaker-independent speech recognition, there is still a lot of human variation where machine learning algorithms such as Bayesian probabilistic methods can help. I posted a first alpha release yesterday, and despite all the bugs one first brave ham reported success. I would like to collect thousands of audio samples (WAV files) of real world CW traffic captured by hams via some sort of online system that would allow hams not only to upload captured files but also provide relevant details such as their callsign, date & time, frequency, radio / antenna used, software version, comments etc. I would then use these audio files to build a test library for automated tests to improve the Bayesian decoder performance. Since my focus is on improving the decoder and not starting to build a digital audio archive service I would like to get suggestions of any open source (free) software packages, online services, or any other ideas on how to effectively collect large number of audio files and without putting much burden on alpha / beta testers to submit their audio captures. Many available services require registration and don't support metadata or aggregation of submissions. Thanks in advance for your suggestions."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered


Try the NSA (0)

Anonymous Coward | about 4 months ago | (#45788005)

They like collecting stuff

Re:Try the NSA (5, Informative)

ColdWetDog (752185) | about 4 months ago | (#45788069)

They like collecting stuff

Na, amateur radio transmissions are some of the most boring conversations known to man (and I am a ham radio operator). No sex, drugs and rock and rock - no eavesdropping. Besides, we're mostly harmless.

Back to the topic. Because the bands are proscribed, ie, there are frequencies that are just CW (and phone or digital or whatever), it would seem an easy job to just record a band for a while to grab some samples. Use a software defined reciever (to allow for easy scripting), work the grey line [qsl.net] in your area. Even if your software isn't tuned well yet, I would hazard a guess that it is smart enough to detect CW vs. radio noise. Use that to start and stop the file. You probably don't need WAV, that's sort of overkill for CW. Even cruddy ol MP3 ought to give you more than enough headroom for further processing.

Re:Try the NSA (3, Interesting)

ColdWetDog (752185) | about 4 months ago | (#45788081)

Grrr. No editing.

And if you don't have a receiver handy, get a Fun Cube [funcubedongle.com] (not to be confused with the Time Cube) and hook it up to you computer with a random wire or dipole antenna.

Re:Try the NSA (0)

Anonymous Coward | about 4 months ago | (#45788177)

Fun Cubes don't do HF, and they're horribly overpriced (like most ham gear) for what they do.

Re:Try the NSA (1)

ColdWetDog (752185) | about 4 months ago | (#45788249)

150 kHz to roughly 2 GHz does happen to encompass the ham bands. There is a small region around 1.27 MHz where the local oscillator won't lock, but that doesn't jibe with a amateur band (IIRC, too lazy to look it up).

It's not free. It's a low volume device, so it costs a bit (125 GBP). Life is hard.

Re:Try the NSA (1)

Goody (23843) | about 4 months ago | (#45792665)

They do HF, quite well, and they're fairly sensitive. $250 isn't a bad deal for a DC to daylight software defined receiver.

Re:Try the NSA (2)

RabidReindeer (2625839) | about 4 months ago | (#45788163)

It's really kind of overkill to do all that.

A simple phase-locked loop circuit is generally adequate to discriminate between tone/no-tone and you can buy them for pennies.

Once you have that done, tie your input data line to the PLL output and measure the widths of the tone pulses. A dash is going to average about 3 times as long as a dot, the inter-tone spaces are going to be about 1 dot-width with inter-character spacing being 1 dash-length. Actual dot and dash timing can be expected to vary from about 5WPM to 100WPM (IIRC), and anything faster than that is likely a machine.

CWG is correct in the main. Even before the Internet, typical Morse exchanges tended to consist of call sign, location, antenna type and local weather.

CW is mostly about just being able to contact other people briefly just to say you did it. And for beacons, such as the recent space experiments. For more interesting content, there's voice, RTTY and TV.

The Linux OS has a large suite of amateur radio programs, including decoders, loggers and equipment controllers. I think there are even special ham distros.

Re:Try the NSA (1)

ctrl-alt-canc (977108) | about 4 months ago | (#45789517)

Totally agree. Ham radio has become one of the most boring things one can do in his spare time.
Years ago I was into it, and I was developing some advanced DSP stuff (sort of what is known now as software defined radio, but the algorithms I was using were different and better performing than those used by radio amateurs). As I started leaking some details about what I was developing, I suddenly realized that radio amateurs were not interested into experimenting new technologies: they just wanted to buy high tech toys. So I gave up everything: I wanted people to learn science, not how to fill up a check and buy a pre-built kit. I heartily suggest you to invest your skills and your spare time into something that is much more useful than ham radio. For example I give science seminars in the high school and serve in the board of a nationwide science association, just look around: there are plenty of opportunities.

Re:Try the NSA (1)

K. S. Kyosuke (729550) | about 4 months ago | (#45790887)

I suddenly realized that radio amateurs were not interested into experimenting new technologies

I'm not a radio amateur but I certainly am interested in experimenting with new technologies. The other day, I was thinking whether it would be possible to combine a GPS unit, a PRNG, frequency hopping, exotic modulation schemes and SDR into a low-bandwidth, virtually undetectable means of clandestine communication. But I suspect that this is not exactly what amateurs are allowed to do anyway.

Re:Try the NSA (0)

Anonymous Coward | about 4 months ago | (#45792751)

It isn't boring at all, not everyone is interested in software defined radios. Just like not everyone wants to build all their "electronics" projects with a microcontroller.
The future is analog!

Re:Try the NSA (1)

davester666 (731373) | about 4 months ago | (#45789803)

Great. You have now told our enemy, namely, the general population, that a.r.t. isn't monitored by the NSA. North America will now be awash in terrorists.

Re:Try the NSA (0)

Anonymous Coward | about 4 months ago | (#45792155)

Na, amateur radio transmissions are some of the most boring conversations known to man (and I am a ham radio operator).

Please use fewer 'junk' characters. Here are some characters that are apparently not junk:

Re:Try the NSA (0)

Anonymous Coward | about 4 months ago | (#45795123)


Re:Try the NSA (1)

Goody (23843) | about 4 months ago | (#45792655)

Na, amateur radio transmissions are some of the most boring conversations known to man (and I am a ham radio operator). No sex, drugs and rock and [roll]

Listen to the guys on 80 meter AM and you'll get that. :-) And 14.313 Mhz has people on drugs....

Re:Try the NSA (1)

ColdWetDog (752185) | about 4 months ago | (#45792747)

Huh. I mostly do satellite stuff (when I'm active at all). Guess I'll have to try the lower bands if I want some excitement....

Re:Try the NSA (1)

Goody (23843) | about 4 months ago | (#45792793)

Cool. I've been wanting to get into satellites. I'm building a homebrew az/el rotation system controlled by Arduinos. With all the cubesats that have recently launched, satellite is where it's at.

Re:Try the NSA (0)

Anonymous Coward | about 4 months ago | (#45794661)

Listen to the guys on 80 meter AM and you'll get that. :-) And 14.313 Mhz has people on drugs....

Yes and 14.195 has a Sicilian dead beat clogging it up and no one has the balls to have it eradicated ..

Re: Try the NBA. Been there.... (0)

Anonymous Coward | about 4 months ago | (#45788161)

Ah, the happy memories of about 100 Morse Intercept Ops using R390s and SP600s along with Underwood manual typewriters and 6ply paper, as well as a rhombic antenna with each leg 1000 feet long, listening to some of the most poorly trained (and some of the best, too) cw operators in the (undisclosed evil empire). We didn't. Need no seeking Bayside filters, just lots a coffee.

Re: Try the NBA. Been there.... (0)

Anonymous Coward | about 4 months ago | (#45788273)

SP600s? A real old timer. Of course, we were still using R390s and mills in the 80s.....at least at a U/I little operation behind a certain snack bar. The bigger place nearby had migrated to KSRs and touch typing, and phased out the R390s in 1983 or 84...

Email? (0)

Anonymous Coward | about 4 months ago | (#45788037)

I'd recommend using e-mail. It's open to everyone to use, and they probably already have registered one. They can provide any and all metadata in the free-form text field known as "body", and it even supports multiple file attachments!

Re:Email? (1)

vidarlo (134906) | about 4 months ago | (#45788079)

I'd recommend using e-mail. It's open to everyone to use, and they probably already have registered one. They can provide any and all metadata in the free-form text field known as "body", and it even supports multiple file attachments!

But it also means getting the metadata as free-form-text, which is likely to need interpreting before processing. A HTML form on the other hand will provide, by comparison, quite standardised data format. It also provides an easy file upload facility.

Writing something in PHP/Python that accepts uploads and stores metadata in a database is not very much work to hack together. The main work will be deciding the fields and so on. A form can require an entry in the field for antenna type, whilst in e-mail it's easy to forget a field.

The main challenge I guess is to get people to submit information...

NSA? (0)

Anonymous Coward | about 4 months ago | (#45788047)

Now NSA is targeting ham radios too?

Re:NSA? (0)

Anonymous Coward | about 4 months ago | (#45790625)

The big vacuum cleaner approach.That way, if terrorists are masquerading as hams, they can claim "We had that". After the incident, of course, because nobody bothered to look at the stuff collected....

are you asking how to receive the HF ham bands? (0)

Anonymous Coward | about 4 months ago | (#45788059)

What you need is an HF receiver and a long wire dangling out of the window as high as possible.

Or use one of the receivers with web interfaces.

You are aware that there are several projects for decoding Morse, yes?

Doctor will not see you now-Obamacare (-1)

Anonymous Coward | about 4 months ago | (#45788067)

Good luck seeing your doctor, as they move to an all cash model to escape the bumfuckery of Obamacare. Why did anyone ever think that asking the doctors to accept deep cuts and more paperwork was the answer to our problems? This is deeply troubling that we would do this to ourselves. You reap what you sow. Enjoy.
http://www.foxnews.com/politics/2013/12/26/doctor-wont-see-analysts-warn-obamacare-plans-could-resemble-medicaid/ [foxnews.com]

Re:Doctor will not see you now-Obamacare (1)

ColdWetDog (752185) | about 4 months ago | (#45788107)

You know, you could hardly pick a less controversial topic than amateur radio. If you want to get everyone all wound up about your favorite boogyman, at least start off on one of the more irritable subjects we tend to yammer on about. The level of angst here is likely to be too low to channel.

Re:Doctor will not see you now-Obamacare (1, Redundant)

CohibaVancouver (864662) | about 4 months ago | (#45788255)

You replied, though. The Troll achieved success.

Re:Doctor will not see you now-Obamacare (0)

Anonymous Coward | about 4 months ago | (#45788377)

Indeed. I'd never have seen the GGP if GP hadn't taken the bait. Let the moderation system do its job.

Posting AC for obvious reasons.

Re:Doctor will not see you now-Obamacare (0)

Anonymous Coward | about 4 months ago | (#45799411)

Tell that to the lady next door who is positive that I'm the reason her 20 year old TV works like shit.

It's like you're not even trying. (0)

Anonymous Coward | about 4 months ago | (#45788085)

Go to any websdr during a CW contest weekend and, well, there you go. Sure most of it is computer generated but the rest will be hand-keyed.

Re:It's like you're not even trying. (2)

n6gn (851311) | about 4 months ago | (#45788127)

I agree. Got to a WebSDR like http://websdr.ewi.utwente.nl:8901/ [utwente.nl] and automate the process. You can get a large amount of OTA signals to examine, in the correct ratios, styles and weightings. This requires you to decide whether or not the signal under test is CW or not but that's part of your algorithm anyway. n6gn

Re:It's like you're not even trying. (1)

mni12 (451821) | about 4 months ago | (#45788313)

I have already many samples of CW contest traffic recorded from my Flex3000. Because most of it is computer generated the decoding challenge is mostly related to signal-to-noise ratio and interference, not so much on personal rhythm variances when people are using straight key.

The idea presented was to collect many different kinds of CW samples. I am looking more for variation than uniformity. Having an adaptive decoder algorithm that adjusts itself automatically to all kinds of CW is a challenge.

Picasa (2)

symes (835608) | about 4 months ago | (#45788087)

Picasa came to mind - this service supports audio files and, last time I looked, allows you to share stuff. Although I should add that it has been a while since I looked at this service. Complements on your your clearly written post... days of /. gone by

NSA trying to monitor Morse code automatically... (0)

Anonymous Coward | about 4 months ago | (#45788093)

I wouldn't be surprised at all....

Skimmer (2)

dbc (135354) | about 4 months ago | (#45788095)

So.... I guess you've never heard of skimmer, the various remote receivers out there, and the SDR's that people are using to record large swathes of shortwave spectrum? You know people have been working on the problem for a while, as in decades? Skimmer decodes multiple streams of morse at once. Wake me when your stuff outperforms skimmer.

Re:Skimmer (4, Informative)

mni12 (451821) | about 4 months ago | (#45788265)

I am using CW skimmer fairly actively - in fact I have been corresponding with Alex, VE3NEA who wrote the CW Skimmer. He gave me the idea of pursuing Bayesian framework [blogspot.com] as I have been progressing in developing a well working CW decoder. The main difference here is that I am focusing on improving FLDIGI [w1hkj.com] which is open source software while CW Skimmer is a commercial software package. I do agree with you that CW skimmer does a great job decoding multiple streams simultaneously. Once the algorithm works decoding multiple streams [blogspot.com] is not that difficult.

Re:Skimmer (1)

dbc (135354) | about 4 months ago | (#45788375)

So it isn't that hard to record 200 KHz wide segments of an HF band using something like this: http://rfspace.com/RFSPACE/SDR-IQ.html [rfspace.com] How many hours of test audio do you need? If you had a few volunteer owners of SDRs do some recording for you, you would have a large test base quickly. Unless I complete misunderstand the scale of the test base that you are going after. But it seems to me that 100 or 200 hours should not be difficult to get from volunteers -- and 200 hours times 200 KHz is a lot of CW audio.

Re:Skimmer (1)

mni12 (451821) | about 4 months ago | (#45788489)

I have two SDR receivers myself and using them actively. The problem is not in the volume of data but having a set of data with a lot of variability to find out limits where the decoder stops working correctly. I integrated the decoder to FLDIGI with the hope that I get other hams to try this out and report back [eham.net] when they observe conditions where decoder stops working.

I have also created many synthetic Morse files with different speed and Signal-to-noise ratio in order to plot the performance of the decoder under controlled conditions. [blogspot.com] Testing all variations manually is pretty labor intensive work even though I have written some automated scripts to run these test sequences and plot the results.

Re:Skimmer (1)

plover (150551) | about 4 months ago | (#45789339)

So to get this variety, what you really need is a network of volunteers with SDRs set up in listening posts around the globe. I think you'll get the most participation by making a solution as turn-key as possible for volunteers. Perhaps what you could do is to wrap up a software package that you could distribute to all these people. It could install the SDR drivers, and run the capture program on the appropriate frequencies. Set up a server where your volunteers can upload their captures. Set up the capture software to automatically upload the data to your server every 24 hours.

You could even consider buying a volume discounted quantity of wideband SDR receivers and distributing them to promising volunteers. Once you're ready, advertise for help on ham forums, or ask for help on the amateur bands.

Re:Skimmer (0)

Anonymous Coward | about 4 months ago | (#45790129)

Interesting stuff on that page -- you're to be commended for your attention to methodological detail. :) You should think about writing up a summary of the eventual results for QEX.

Re:Skimmer (1)

dbc (135354) | about 4 months ago | (#45793251)

Synthetic files at least have the advantage of automatically generated expected results files to go with them. Coming up with a good noise model seems to be the hard part. Perhaps record off-the-air noise and summing that into clean computer generated CW receive audio is a way to get a reasonable start on a channel model that has a more realistic HF noise model. Fading is easy enough to add to a propagation model, which could be extended to auroral flutter and backscatter.. Of course, you also need a sender model if you want to deal with poor hand-key sent code, badly-adjusted-bug code, and strangely-weighter-keyer code. Then you need a transmitter model to deal with mushy or clicky attack. An interference model could deal with adjacent and zero-beat interfering transmitters. One of the problems with the interference model is that you need to model the AGC profile of the receiver -- agressive AGC will make all stations in the passband equally loud, a more useful AGC will retain more of the signal strength difference (which is why contesters dumped FT-1000MP's when the Elecraft radios came out.)

All that modelling sounds nasty, but I think that is an easier way to get a test base than recording off-the-air. Getting enough of all of those test cases to fill in a test matrix is a huge cataloging effort. And then you need go create expected results. The synthetic audio files at least have the virtue of precisely controlled test conditions and give you expected results for free.

SDR's are your friend? (0)

Anonymous Coward | about 4 months ago | (#45788133)

I'd go about it completely different... Either setup a cheap SDR can record the CW yourself... You should be able to do this for well less than $100... Or setup a receiver (or SDR) on a specific freq, and ask ham operators to send morse code to you on that freq then correct via a web interface any mistakes.

Either way should be easier and more realistic than having hams send your CW recordings....

Use an HF receiver (1)

Bill_the_Engineer (772575) | about 4 months ago | (#45788167)

You can collect a lot of morse code traffic in the wild. Just get yourself a good HF receiver with some filtering (notch filter and a DSP). Set up a dipole as your receive antenna cut to 1/4 the wavelength of the band you will be monitoring. Here is a handy band plan [arrl.org] to guide you to where you will be able to find morse code which is normally called CW for continuous wave communications.

I recommend this over any attempt to collect samples directly from hams. I know I do morse code differently when using the radio for casual contacts than I do making exam tapes back when I was a volunteer examiner.

Another attribute that will affect morse code transmission is the type of morse key being used. I use either a straight key which is completely manual and my dots and dashes do vary depending on fatigue, or a paddle key where one paddle makes a dot and the other key makes a dash. The dots and dashes are consistent in duration but the space between them will vary depending on fatigue. I did try using a vibroplex key. The dash will vary in duration but the dots are constant in both duration and time between each dot. Most of my friends still use them (A mutual acquaintance owns the company), but I found myself constantly having to slow down because I would let that pendulum swing speed up my keying.

Happy hunting and 73.

Re:Use an HF receiver (1)

Bill_the_Engineer (772575) | about 4 months ago | (#45788179)

Clarification: Each leg of a dipole is 1/4 wave in length. I went ahead and linked an ARRL reference on how to make one [arrl.org].

Re:Use an HF receiver (0)

Anonymous Coward | about 4 months ago | (#45788737)

Clarification: Each leg of a dipole is 1/4 wave in length. I went ahead and linked an ARRL reference on how to make one [arrl.org].

For receiving, a random wire antenna works just as well. A proper dipole for 40m, for example, can be unwieldy.

Ask ARRL and AMSAT members (2)

Dishwasha (125561) | about 4 months ago | (#45788181)

Write an article and submit to ARRL's QST [arrl.org] and join and post to the AMSAT mailing lists [amsat.org] as there are quite a few keys there as well. Talk to your local amateur radio club and get the word out and you might even talk to your area coordinator.

Re:Ask ARRL and AMSAT members (1)

ColdWetDog (752185) | about 4 months ago | (#45788263)

Probably the best idea yet. Your signal to noise (so to speak) is going to be much higher there than on Slashdot......

Re:Ask ARRL and AMSAT members (0)

Anonymous Coward | about 4 months ago | (#45789077)

some companies used to sell morse code training cassette tapes

i didnt know where to post this comment

Try freesound.org (0)

Anonymous Coward | about 4 months ago | (#45788209)

Freesound would be best place for audio, just make a unique tag and all submissions can be found. Encode all metadata as tags and it is machine parsable too.

Re:Try freesound.org (1)

mni12 (451821) | about 4 months ago | (#45788385)

Great suggestion - thank you! Looks like the site requires registration but it has been created exactly for this kind of audio related research. It has even APIs to access the data. I will investigate this a bit further.

Congratulations (1)

hax4bux (209237) | about 4 months ago | (#45788259)

I wrote a similar application in the late 1980's using a backpropagation neural net, and it was difficult to complete.

Asking for volunteer submissions is the easiest and obvious answer. There is a group of commercial operators at http://www.radiomarine.org/ [radiomarine.org] who might have tapes for you.

Some of the CONET project recordings feature morse, but the ones that I have heard sound mechanically generated.

Finally, you can collect for yourself. HF is a desert these days, the last time I tried the only hams were active (there has not been commercial morse for decades). This also means the equipment is dirt cheap on eBay so if you have any outside space at all for just a long wire antenna you can collect your own samples.

Also, you might not be aware but there are several regional variations of international morse. Cyrillic operators have 5 extra characters, the Chinese have an abbreviated numeric system, etc.

Try HMMs (4, Informative)

SnowZero (92219) | about 4 months ago | (#45788373)

The thesis you are basing your work is from 1977; while no doubt current when it was written, there is has been a lot of work on human signal decoding since then.

I'd strongly suggest looking at Hidden Markov Models:
    http://en.wikipedia.org/wiki/Hidden_Markov_model [wikipedia.org]
While some recent methods have gone beyond HMMs for speech recognition, that's been the baseline "good" solution for the past decade.

Since this is a binary signal problem another approach to consider would be Markov Random Fields (MRFs) which could be used as an initial de-noising pass or even as a full decoder if you set the cost functions right.

Your idea of user adaptation is pretty reasonable, but my guess is the primary thing that matters would be an overall speed scaling. IOW for good decoding you probably just need to normalize the average letter rate between users.

Good luck.

Re:Try HMMs (2)

mni12 (451821) | about 4 months ago | (#45788633)

Thanks @SnowZero. I have looked at HMMs and in fact I wrote a simplistic decoder version using RubyHMM just to learn more how HMM really works. You would be surprised on the mathematical rigor of the original thesis [archive.org]. Many of the ideas are very relevant today, just much easier to implement with current generation of computers.

The current decoder actually uses Markov Model - the software calculates conditional probabilities based on 2nd order Markov symbol transition matrix. The framework itself allows to add additional components. The de-noising is done by a set of Kalman filters that are used in the first pass before all possible paths are labeled and control is passed to trellis calculation and eventual letter translation.

I am not yet at the stage for overall speed scaling. The algorithm itself needs to work well before I want to pursue scaling this up.


Re:Try HMMs (1)

SocratesJedi (986460) | about 4 months ago | (#45789725)

You might also like to have a look at this paper on using HMMs to convert a (continuous) chromatographic signal into (discrete) base pairs "calls" during DNA sequencing: Link [mit.edu]. The problem seems similar to the one you are working on, in many respects.

Pilotmorse (0)

Anonymous Coward | about 4 months ago | (#45788529)

Little plug for some windows shareware that i used: pilotmorse - pilotmorse.com. There are quite a few cw titles out there, some free as in beer, but this little guy for 20 bucks taught me the letters better than any of them. This will not teach you to listen to cw from actual hams.. Its much more basic than that in some sense (its designed for pilots). But, if your goal is to know the letters, its money well spent.

Two Pass (0)

Anonymous Coward | about 4 months ago | (#45788819)

I would guess that you could do a standard detect, to calibrate and run a second pass on each signal to improve accuracy. Unless of course you are trying to do near real time.

You're doing it all wrong.... (1)

jfalcon (163956) | about 4 months ago | (#45788933)

Obviously you realize there are differences in how people send CW. While I applaud your drive to make a smarter decoder - the reality is that you need to make sure it works on live traffic. So in that respect, you should hook it into some kind of SDR software like HRD or even make your own that can decode multiple streams of CW. If you don't have a radio, I suggest maybe a SoftRock receiver?

1. It gives you actual live conversations with all the mistakes and alterations. Not everyone uses computer generated CW. In fact, most brass pounders dislike it because it's boring to listen to and dry to copy.
2. There are sanctioned CW events all the time... QSO parties, commemorative stations and even at the beginning of next month there are straight key nights where people put the paddles away and break out the straight key.
3. I'm going to assume the end goal is to put this listening to live feeds anyways. You should work toward that goal now as then you can write code to compensate for QRM and QRN/fading.

Having people feed you 'tapes' won't accomplish your goal. You need to have it work with the real source.

Re:You're doing it all wrong.... (1)

mni12 (451821) | about 4 months ago | (#45789285)

@jfalcom -- I do realize the differences between live traffic and recordings. The example links I provided above demonstrated a live feed from ARRL W1AW code bulletin on 12/24 at 3.58105 MHz that I decoded using experimental version of FLDIGI v3.21.75 connected via SignaLink USB to Elecraft KX3 radio.

However, there is a difference between debugging software and listening live feeds. I posted this question to figure out ways how to get a test set of boundary conditions captured by other hams so that I could re-run those errors in a controlled environment to replicate observed software bugs & decoding errors. Trying to debug a live feed is very hard and unfortunately beyond my skill level.

My goal is obviously to make the software to work well with a real source and be capable to self-adjust automatically to different band conditions, operators and traffic styles. Your proposal on listening straight key nights is actually a real good suggestion -- those events are the opportunity to see the real human variety of hand keyed Morse code. Thanks for your suggestion.

This is a problem everywhere (1)

cfulton (543949) | about 4 months ago | (#45789343)

This is a problem that effect all kinds of machine learning. It is always very difficult to collect enough samples to teach good recognition skills. Whether it is hand writing, speech or as in this case Morse Code. I'm wondering if some open library that could be uploaded to for this kind of thing might not exist, or if not, it might be a good idea.

Just gotta say (0)

Anonymous Coward | about 4 months ago | (#45789373)

I know I am being an (anonymous) asshole here, but how hard can this be? Morse code was designed to definitively decipherable based on pauses between letters. Sure they vary but is that variance greater than the inter-word dot/dash silence even given two different operators?

I mean, write a normal program that runs multiple hypothesis about inter-letter pauses for a while and accumulates the inter-letter pause average. The hypothesis is rejected when parsing using that inter-letter average results in words like: ghksdjhf .

When go all Bayesian, just because you can? This is a good target for GOFAI.

Morse code? (0)

Anonymous Coward | about 4 months ago | (#45789499)

isn't that something that retired people use with vacuum tubes? don't think i've ever seen Morse code except in the movie Balto 1 and 3.

oh, and ham is a cut of meat. http://en.wikipedia.org/wiki/Ham

Not trying to start an argument, but why are people Morse code Skype and text messaging is available? Trying to relive the days of Balto by tapping dits and dashes with your finger over long wires in Alaska? 4G internet access is available in most of the United States and Canada, right? IRC and chat rooms are still popular.

enlighten me please

Re:Morse code? (1)

NikeHerc (694644) | about 4 months ago | (#45791149)

enlighten me please

Internet access is pretty cool, irrespective of the delivery method, but get back to me on how well that works without power (storms or other disasters). If you have a ham license and a battery-backed transceiver, you can communicate easily over long distances. Because of its narrow bandwidth, CW works very well.

During a recent contest, a ham in the northeast U.S. communicated with Wake Island using CW and four watts of power. Pretty impressive.

Not everyone foams at the mouth over the latest toys.

PRNG? (1)

eyenot (102141) | about 4 months ago | (#45789529)

Couldn't you just create a computer generator for this audio, that uses a PRNG to intersperse pauses and other variations? You could create a much wider variety of conditions to put your parser through by controlling how much variation is in the length of each beep, pauses between beeps, pauses between letters. You could create a really bungling case or create a perfect case, and anything in between. Why not just do that?

Re:PRNG? (1)

mni12 (451821) | about 4 months ago | (#45791563)

Great idea and in fact I have been using this strategy to create a number of different synthetic test cases. I have synthetic audio files with various Signal-to-Noise levels, with different speeds and so on. The variable timing (rhythm) is more difficult to simulate as there is no clear distribution (like Gaussian) to use as a model. Only if you aggregate over many users and normalize by speed you can start to observe some sort of Gaussian distribution in dits and dahs. I wrote about this problem when I was investigating what kind of classifier would work well for individual ham operators.

While this seems like a great strategy the real world signals are more complex than I am able to generate with my Octave based Morse generator tool. Also, real world signals tend to have a random mixture of all kinds issues that the decoder needs to be able to handle simultaneously. For example, in typical CW contest many stations give their call signs at one speed, say 23 WPM. When responding to other stations they might give signal report (5NN) at 40 WPM. Then you add some interference from other stations and a lot of noise to this. Perhaps the best simulator I have seen so far [dxatlas.com] is written by Alex, VE3NEA and it produces very realistic sounding audio.

Did this a couple decades ago (2)

Dan East (318230) | about 4 months ago | (#45790245)

First off, thank you Slashdot UI, for having me retype this whole thing again.

I did this back in the early 90s with my Amiga. The hardware interface consisted of a transistor, filter capacitor, and variable resistor (I don't remember the exact design I came up with) to interface to the Amiga's joystick port (which used standard Atari controller wiring). I wrote the software decoder in Blitz Basic, and it used a scrolling window of 20-30 seconds over which it would average the pulses to determine the current dit and dah length. Any pulses deviating significantly from the current dit and dah length indicate a likely change in operator (one station finished keying and the other began their response), and the window would be positioned using that as as the edge point.

The system worked extremely well, and was far more accurate than my AEA PK-232MBX when it came to decoding morse code. It decoded most anything I threw at it. Decoded output was sometimes delayed until it had received enough code to determine the current transmission rate and style, and then it would output a chunk of text at one time as it decoded the whole buffer at once. Then it would output real-time until a deviation in dit-dah lengths had been exceeded and the window repositioned so the dit and dah length could be recalculated.

There are two discreet problems to address, and it sounds like you're lumping them together, which may not be a good way to proceed. First is the audio filtering / notch filter which tries to isolate a specific morse code signal out of other transmissions in the adjoining frequencies and general background noise. The other is simply decoding of the morse code message. Ideally, step 1 should be the analog portion, and step 2 should be purely digital.

And I did almost the same thing as my first projec (0)

Anonymous Coward | about 4 months ago | (#45790587)

when I began my CS studies. Your algorithm was probably more sophisticated than mine and my input was simply mouse clicking by the user. I wrote it in 1998 and got the idea for my CS 101 project from my interest to learn Morse code and at the time I couldn't find any software for that purpose. My algorithm took input and tried matching it to characters and until if managed to get a match, it assumed differences in length just to be lack of user skill but once it found a match, it assumed that it knew the rate. The data structure with characters as bytes with 1 = dit and 0 = dah made so much sense that it seemed almost as if Mr. Morse had thought of binary when designing the system. My software would not have handled changes in the rate but the most interesting discovery was how bad a mouse is as a "telegraph" since your hand perceives the press as much longer than the actual time the mouse has signaled "button down" simply because of how most mice are designed. An improvement I could have made to improve the mouse as an interface was to calculate an "offset" to add to each dit or dah before processing it.

FANN Neural Net (0)

Anonymous Coward | about 4 months ago | (#45790471)

Looks like you could benefit from FANN neural nets if I understand the question correctly.

Re:FANN Neural Net (2)

mni12 (451821) | about 4 months ago | (#45791403)

I did some testing using classifiers in WEKA package [waikato.ac.nz]but was quite disappointed on the results. My next attempt was to leverage PNN (Probabilistic Neural Network) [blogspot.com] and got somewhat better results. In the test runs with noisy audio files with Morse code I got up to 90% accuracy in classifying dits and dahs. I have not used FANN package a lot though I installed it on my development machine 1-2 years ago. What are your thought about FANN exactly? How would you go about using the package?

FANN (0)

Anonymous Coward | about 4 months ago | (#45806053)

Build a Neural Net to do what you wanted to do. Look at the example projects out there some include sound...

do it, and MFJ (0)

Anonymous Coward | about 4 months ago | (#45791013)

will have a cheaper device out lickety–split!

my two cents (0)

Anonymous Coward | about 4 months ago | (#45791035)

It sounds like you're an old fart that finally retired and wants to tinker. Good for you. :)

I suggest looking at modern papers on speech recognition. You're essentially solving the same problem except you're using a simpler input, so don't bother trying to come up with your own algorithm. Just lift an algorithm from a paper. Yeah you'll have to train it, but it'll work 1000x better than anything you're likely to come up with unless you have a PhD in a related field.

Re:my two cents (1)

mni12 (451821) | about 4 months ago | (#45791713)

Thanks for your advice, junior. I am not retired but just happen to be interested in Machine Learning methods and this problem seems to be difficult enough since only few people have created anything that would even closely perform at skilled human operator level. I did investigate some speech recognition algorithms such as HMM and SOM. I have spent also some time collecting data and training software to recognize real world noisy and messy signals. In fact the current shipping version of FLDIGI package [blogspot.com] has one of these algorithms (SOM) built in.

I don't have a PhD in related field but I have studied signal processing and even wrote some software for MRI image reconstruction and processing earlier in my career. The papers I have read on speech recognition over the last 20 years have certainly improved the state of the art but the methods are more incremental improvements than some ground breaking new discoveries.

BTW - How is that Siri working for you in a noisy car with windows open at highway speed? Humans can still understand each others in this kind of conditions.


Re:my two cents (1)

msobkow (48369) | about 4 months ago | (#45792007)

As others have posted, I think you're making the problem far more complex than it needs to be by insisting on using "machine learning" techniques. All you need to do is some basic filtering to identify the beeps from the background noise, some averaging over a time window to determine which are dashes and dots, and the rest is just simple lookup tables.

I made the same mistake back in university. We applied machine learning techniques to playing a game (I forget which one), but it turned out that after three rounds of playing the game, the system just built a static lookup table and won all the time. The game just wasn't as random or intuitive as it seemed at first, so our solution to it was serious overkill for the problem at hand.

You are way too late for the party (1)

DF5JT (589002) | about 4 months ago | (#45794341)

CW is dead, buddy.

Dead as in "There are few people left on the planet who actively work CW on a high proficiency level without using a keyboard and a screen reader".

Today you can see ham shacks without a CW keyer as a norm, and if you see a CW keyer, the owner only in rare cases can go beyond 20wpm without breaking a sweat, making lots of errors all along the way and getting frustrated at hearing others do perfect CW, albeit with a keyboard.

To give you a sense of scale: There are no more than roughly 4-500 hams worldwide, who can use an electronic keyer in such a way that they can hold a meaningful conversation on the air at more than 40wpm at an acceptable error rate and who at the same time can follow such a conversation with their ears easily.

I know quite a few members of that minority and they are all like dinosaurs about to die out. The future lies in predictive keying by a computer, high resolution SDRs for decoding and give it another 10 years even the most ardent pro-CW people will make way for other digital modes that can handle all the distinct advantages of CW operating (FullBK/QSK, pile ups and propagation resilience) just as good or better.

Speaking for myself, by now I am fed up with going on the air and either listen to either machine CW or inept operators who never were afforded the luxury of good tutoring and coaching to make their CW better, more precise and fluent.

So, let me rephrase my initial sentence: CW may not be dead, but the true CW operator is a dying species and I can't see any merits to your project when the future is machine-only anyway.

WAV files? (0)

Anonymous Coward | about 4 months ago | (#45801351)

Are you truly wedded to WAV files? It seems to me that using an audio file format that supports embedded tags, such as MP3 (or AIFF, or many others), would allow you to keep the data and metadata together in a single entity.

Since you have a small collection of alpha/beta testers that will be submitting audio samples to you, is it much of a burden for you to provide them with a tool with a metadata input UI that packages it with the audio before upload to your favourite file repository?

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account