ookMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
WaveFile waveFile = SpectrumAnalyzer.readWaveFile(inputFile);
short data[] = SharedDSPFunctions.extractWaveFileData(waveFile);
CwDemod demod = new CwDemod(data);
String morse = demod.demodulate();
int speed = demod.getWpm();
JOptionPane.showMessageDialog(frame, "Speed: " + speed + " WPM\n" + morse);
}
});
demodMenu.add(ookMenuItem);