DeepRTTY 0.5.7 - neural RTTY decoder and sender
by OE1MWW & Claude.ai

FILES
  deeprtty.py       the program
  rtty_common.py    shared with the training pipeline (must stay identical)
  rtty.onnx         neural model (v2). rtty_demo.onnx is used only if rtty.onnx is missing.
  deeprtty.ico      program icon (window + EXE)
  test_rtty.wav     47 s test QSO (DL2ABC calling) for testing without signals
  run_deeprtty.bat  start with Python  (first: pip install -r requirements.txt)
  build_exe.bat     build DeepRTTY.exe with Nuitka (keep .onnx and .ico next to the .exe)
  transport.cmd     copies DeepRTTY to an external drive
  DeepRTTY.ini      created at the first start

RIG CONTROL: OMNIRIG ONLY (since 0.4)
  DeepRTTY talks to the radio only through OmniRig, Rig 1 or Rig 2. OmniRig
  knows Yaesu, Kenwood, Icom, Elecraft and many more, so DeepRTTY works with
  all of them. Install OmniRig and set up the radio there (rig type, COM port,
  baud rate). DeepRTTY then uses OmniRig for PTT, mode and frequency.

FIRST START
  1. Settings > Audio: receive and transmit = the radio's USB audio codec.
  2. Settings > Radio (OmniRig): Rig 1 or Rig 2, PTT method OmniRig.
     The header shows e.g. "OmniRig 2  COM12  IC-705-DATA" (red while the radio
     is not on-line): rig number, COM port and the OmniRig rig file. The COM
     port is read from OmniRig's settings file, %APPDATA%\Afreet\Products\OmniRig\OmniRig.ini.
  3. Radio menu: data-mode audio source = USB. Start with transmit level 0.3
     and raise it until ALC just stays low.

SETTINGS > RADIO (OMNIRIG)
  PTT method               OmniRig (default), RTS or DTR on a separate COM port, or None (VOX).
                           The COM port field appears only for RTS or DTR.
  Switch to DATA-U before transmitting
  When the radio comes on-line:  switch to DATA-U, Rig initialize commands
  When Exit is pressed:          mode (restore the mode from start / USB / LSB /
                                 USB above 10 MHz, LSB below / leave as it is),
                                 Rig initialize commands
  Rig initialize commands go to the radio through OmniRig in its own CAT language:
    Yaesu / Kenwood / Elecraft: text, several in a row      MD0C;RF02;
    Icom: hex bytes, spaces optional, several frames        FE FE A4 E0 1A 05 01 31 00 FD ...
          (sent to OmniRig as a byte array; A4 = IC-705, 94 = IC-7300)
    {BRxxx} = pause of xxx milliseconds between commands     MD0C;{BR150}RF02;
  The field scrolls sideways for long command lines. The [EXIT] section in
  DeepRTTY.ini understands the same format (one or more commands per line).
  "Open the OmniRig settings" opens OmniRig's own dialog.

  Settings window: "Save and apply" stores the changes, "Cancel" discards them.
  Closing the window with X after a change asks first: Save and apply, or
  Cancel (keep the previous settings).

  ICOM IC-705 IN OMNIRIG: use the rig file IC-705-DATA.ini. It switches to USB-D
  for the data mode, which DeepRTTY needs (audio through USB). The plain
  IC-705.ini selects RTTY-R, the radio's FSK RTTY mode.

  The Setup RTTY button is gone (its job is done by the on-line options).
  The window X closes without the Exit commands.
  In DATA-L or LSB the mark/space polarity follows automatically.

TEST WITHOUT A SIGNAL ON THE BAND
  Settings > Audio > "Play a WAV file into the decoder" > test_rtty.wav.
  Then click the waterfall between the two traces at about 1500 Hz.

OPERATION
  Click the waterfall in the middle between the two traces (mouse wheel = +-5 Hz).
  The receive row shows the centre and the signal frequency (Centre 1500 Hz = 7.046500 MHz);
  "mark" and "space" are labelled at the foot of the two red lines.
  Send while typing : PTT goes on with the first key; it drops after the idle
                      time (Settings > Transmit, default 5 s) or with Esc.
                      Backspace removes characters that are not sent yet.
  Type first        : write the text, then "Send text" / Ctrl+Enter. PTT drops after it.
  F1 ... F8         : macros ({MYCALL} {MYNAME} {MYQTH} {CALL} {NR}), editable in Settings.
  F9 (blue button)  : contest counter - sends its text (default {CALL} 599 {NR} {NR}),
                      then counts up. Right click = one step back.
  Double-click a callsign in the receive window to put it into the Call field.
  Colours: transmit window green = sent, white = waiting; own text echoed in yellow.

BAUD RATE AND SHIFT (0.5)
  Left of the waterfall: 45.45 / 170 (amateur), 75 / 170, 50 / 450 (DWD weather),
  plus two fields Baud and Shift for anything else (30-150 Bd, 85-1000 Hz).
  Mouse wheel on Baud: next standard rate (31.25 45.45 50 56.88 75 100 110 150),
  Ctrl+wheel 0.01 Bd. Mouse wheel on Shift: 10 Hz, Ctrl+wheel 1 Hz.
  Typed values are taken with Enter. The setting applies to receive AND transmit
  and is saved. No extra model files: the spectrogram is scaled so that every
  signal looks like 45.45 Bd / 170 Hz to the trained network.
  Wide shifts (850 Hz): keep the centre between about 1000 and 2500 Hz.
  Receiver filter: it must be wider than the shift plus a margin -
  170 Hz: 500 Hz or wider, 450 Hz: 1.2 kHz minimum, better 2.4 kHz (IC-705 FIL1),
  850 Hz: 2.4 kHz or wider. 0.5.1 levels out the filter edges, so a narrow
  filter no longer produces streams of R and Y on noise.
