-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset decoder states on resync #31
Conversation
@tmiw ☝️ |
This looks like it partially helps based on tests using the recording I sent over. I did notice that it could take a bit before it goes fully out of sync, though. I did try this change on my local copy to reduce the duration of the sound further, but I don't know if there are any negative side effects: if candidate:
self.valid_count = self.Nmf_unsync
else:
self.valid_count -= 1
+ model.core_decoder_statefull.module.reset()
if unsync_enable and self.valid_count == 0:
next_state = "search" Re: FARGAN reset, I tried calling As for freedv-gui, I really do suspect it's related to doing tests on Wi-Fi rather than Ethernet (my Flex 6300 is connected via TCP/IP). I'm going to listen for a bit on the air this morning and see if I can get another RADE recording to look at. |
Yep - Wifi sounds like a bad idea. As per email, I'd avoid OTA signals. We really need a way to detect this problem automatically and give a go/no-go result, for example so we can test that Ethernet is working properly. Manual listening is tedious and won't pick up short gaps (a few 10's of samples) that will kill the link but we can't hear. A way for end users to test/pick up this issue would be useful too, e.g. documentation, instructions on a simple listening test. I feel we need nail the dropout issue first, then we can return to the howling issues with a known good signal. Another possibility is something on the tx side getting into a weird state. Once again - if we can reproduce the issue with a clean, dropout free signal, we will have an easier time tracking it down. For example we might see NANs from the decoder, or a repeating sequence of output features, or the modem re-syncing for no reason.
There's a timer that counts errors over a few seconds and resets the sync state machine. You can see the |
If it helps, I'm able to duplicate the noise issue with the following: Creating transmit audio file
Add gaps to audio
Test decode
Unfortunately it's not exactly automated but it's at least repeatable. In theory one could save the resulting audio from "Add gaps to audio" and use that in a RADE ctest or something. There might also be a way to use Re: dropouts, I didn't see any obvious ones when I followed "Creating transmit audio file" above, either at light load (~90% idle) or after starting something like 14 BTW we might not even need to go that far to duplicate the howling noise. Simply stopping playback in Audacity (causing FreeDV to receive silence) triggered it, I think without even needing to add gaps in the audio first. |
I'm not fully sure how the use of Ethernet/some sort of reliable datalink could be reliably detected without introducing a lot of OS-specific dependencies (and potentially special radio-specific logic). Given that most users use USB connected radios, I suspect this can be deferred. |
Figured out a possible way to duplicate the dropouts in a RADE ctest:
I'm not sure what loss should be, though, but if I use 0.1 instead of 0.25 in the sox call:
and 0:
|
Hi @tmiw - thanks for working on those demos. I can't seem to reproduce the "OP" howling bug. There are some transient issues when a gap is introduced as:
I wondering if the number of gaps in the OP sample was so large that it caused continual issues. This does highlights the need to make sure the audio stream (on tx and rx) is gap free - gaps are death to any modern mode like 700X or RADE. Do you have a way to repdroduce the howling issue using the command line tools? Any further examples from off air recordings? I tried your example above:
Then checked out the loss, and listened with:
It sounds OK, except for some transients due to the gap and re-sync. Key point it recovers - my understanding of the bug was that it lead to some sort of long term instability? The loss from the |
Thanks @tmiw - I can reproduce the issue here. It's def the RADE decoder, here is a mesh plot of the I'll dig in some more. |
During alpha testing of freedv-gui + RADE Mooneer and Walter reporting a howling sound from decoder that could be reset by re-initialing RADE. This may be due to the decoder being kicked into bad states where it gets stuck. As a precaution, this PR resets the decoder states on re-sync.
TODO
dsp.py
? Does anything go crazy when it gets zeros fed into it?