1

I need to create a "morse code decoder" for Android, very similar to this app: https://play.google.com/store/apps/details?id=org.jfedor.morsecode

My app must listen a sounds (morse code) from the microphone. And translate the code in original text.

To be honest, this feature is part of a larger project. My intent is create a system:

  • ENCODE: a Java Application that translate a text in sound (in this case I have chosen the morse code... we don't have much time for create a our "alphabet"...). So, it is text-to-sound.
  • DECODE: an Android App for "listen" this sound (the morse code) and obtain the original text. So, sound-to-text.

Creating the java application isn't problem, but it is for the android app... to listen the sound is ok, but TO UNDERSTAND IT is the issue.

Just break the problem down into the parts. There's:

1) recording from the microphone [ok, no problem]

2) detecting the start times of the tones

3) building up this into a sequence of dots and dashes.

4) translating this into text

I would start from step 2)... thought to act like this: I set the app to listen to the sound at a certain frequency and speed. Must recognize morse code... translate it and print the original text for the user... but how? I do not know where to start. Any ideas?

Gioce90
  • 554
  • 2
  • 10
  • 31
  • 1
    Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist – LionC Dec 06 '13 at 11:24
  • 1
    Also if your going to link to an app to which you want your app to be 'very similar' too it might help if you explained why you don't just use that one. – Paul Brindley Dec 06 '13 at 11:25
  • My intent is create a system: 1) a Java Application that translate a text in sound (in this case I have chosen the morse code...). So, it is text-to-sound. 2) An Android App for "listen" this sound (the morse code) and obtain the original text. So, sound-to-text. Creating the java application isn't problem, but it is for the android app... to listen the sound is ok, but TO UNDERSTAND IT is the issue. Is there any APIs (or snippets) that could help me? – Gioce90 Dec 06 '13 at 12:06
  • I would not use morse code for this - that's a "codec" designed for humans, not for machines. Instead, look at modem signaling schemes, and error correcting (or at least detecting!) codes. Morse code sent with machine regularity will be easier to decode than human sent, but still it's probably a harder problem than some sort of FSK (or PSK or related) binary-derived signaling as typically used for automated data communication. – Chris Stratton Dec 06 '13 at 15:59

1 Answers1

0

Just break the problem down into the parts. There's :

1) recording from the microphone

2) detecting the start times of the tones

3) building up this into a sequence of dots and dashes.

4) translating this into text

None of those seems particularly difficult on its own. 2) and 3) are probably hardest, especially if the speed of the signal varies a lot or if you need to handle errors. So perhaps you could start there with some pre-recorded audio files.

Нет войне
  • 1,139
  • 1
  • 11
  • 21
  • Exactly. For recording part no problem. The other parts instead are more problematic. I thought to act like this: I set the app to listen to and understand the sound at a certain frequency and speed. But I do not know where to start. – Gioce90 Dec 06 '13 at 12:45
  • Seems like it would be slow, surely something more akin to a modem would be faster? – Paul Brindley Dec 06 '13 at 13:09
  • @Gioce90 do you know how to detect amplitude in an audio signal? That's your starting point, I think. – Нет войне Dec 06 '13 at 14:14