Closed mcogoni closed 5 years ago
I was able to decode a WAV file by using ft8.py. The problem I have is that it doesn't work with the sound card: no decodes at all.
marco
Can you tell me more about your setup? What operating system? What's being fed into the sound card? What command did you type? What output does ft8.py produce when you run it with no arguments?
Thanks, Robert
Hi Robert, I'm using a Debian 10 testing on a Thinkpad T450S, internal sound card. The same happens with a Thinkpad X200 with Linux Mint. The receiver is a Kenwood TS-940 and the same setup works perfectly with WSJT-X 2.0.1 on both pcs. When running ft8.py I get the following:
mcogoni@thinkpad:~/radio/weakmon$ python ft8.py Usage: ft8.py -card CARD CHAN ft8.py -file fff [-chan xxx] ft8.py -bench ft8files/xxx.txt ft8.py -opt ft8files/xxx.txt sound card numbers for -card and -out: 0: HDA Intel HDMI: 0 (hw:0,3), channels=0 1: HDA Intel HDMI: 1 (hw:0,7), channels=0 2: HDA Intel HDMI: 2 (hw:0,8), channels=0 3: HDA Intel HDMI: 3 (hw:0,9), channels=0 4: HDA Intel HDMI: 4 (hw:0,10), channels=0 5: HDA Intel PCH: ALC3232 Analog (hw:1,0), channels=2 44100 48000 6: hdmi, channels=0 7: pulse, channels=32 11025 12000 16000 22050 44100 48000 8: default, channels=32 11025 12000 16000 22050 44100 48000 9: /dev/dsp1, channels=16 or -card sdrip IPADDR or -card sdriq /dev/SERIALPORT or -card eb200 IPADDR or -card sdrplay sdrplay
The command I'm trying to run without success is: python ft8i.py -card 5 0 -out 0 -band 20
I tried various cards/channel combinations but nothing happens. On the screen every now and then appears something like: [5, 0] pya_callback status 2
[5, 0] pya expected 33079 got 11025
I tried to read the code of the pya_callback function but I'm not familiar with pyaudio yet.
Thanks! marco
Robert, I was able to make it work. Apparently there was something wrong in the mixer settings. By putting the budget parameter to 10 s and increasing the Costas arrays search I get more decodes than with WSJT-X. Very good!
I'm currently trying to use FT8 data for something like this: https://github.com/mcogoni/APET for which I'm using just WSPR. FT8 would allow me a much larger statistics. The problem I have with WSJT-X comes from the way Joe computes the SNR: he does a baseline polynomial fit to guess noise level while for WSPR he just computes the 30-th percentile of the levels. Of course to compute antenna patterns the SNR definition that I need is different and I can easily tailor it on your excellent code.
If I could use the virtual audio cable by connecting input to output of the sound card it would be great.
ciao! marco / IS0KYB
Hi Robert, I forked the code and added a new function to compute background noise level for the 10-th percentile of the distribution of power. This way the SNR is conceptually similar to what is done for WSPR. I kept the standard SNR: I added a global variable to select which algorithm to use. Maybe a command line switch is the way to go. I believe that in FT8 and other digimodes there should be two SNRs: one to indicate how strong a signal is wrt background, and another signalling how strong adjacent interference is (the standard WSJT SNR). Together they could mimic the classic RST: how strong you are, how well I can copy you in the presence of other nearby stations. One could improve it further by taking into account fading and signal distortion/irregular drift.
One question: Since I'm not done yet studying your code, I was wondering if the m79 matrices contain signal levels already taking into account signal subtraction... I believe the m79 associated to strongest signals also contain the feeble ones, but these ones, being decoded later in general, have already been cleaned up.
If you're interested in this stuff I may create a PR.
73, marco
Marco,
I will look into virtual audio cable.
process0() runs a few "passes". During the first pass, m79 doesn't reflect any subtraction. Most decodes happen in the first pass. But in the subsequent passes, the signals decoded in previous passes have been subtracted. So signals decoded in the second &c passes will (from the point of view of computing SNR) have incorrect noise levels in m79.
Robert
OK Robert, "VAC" capability would be very helpful for most SDR users. I don't understand why PyAudio doesn't do that already since PortAudio on Linux does it.
Regarding SNR and m79 subtractions I believe that the SNR values after strong signals have been removed may be wrong in a Shannon sense, but it's exactly what I want to evaluate how strong each signal carrier is with respect to baseline noise.
I really appreciate your effort to explain how these digimodes work. Joe Taylor did a great job at developing this stuff, but his code is so complex and with so few comments that for almost everybody is just like closed source. Moreover, in our hobby few hams can build an SSB modulator, but the number of them able to write the code to operate on FT8 is less than the fingers on one hand. Your basicft8 "literate programming" effort really deserves praise!
73, marco
Can you tell me how to tell linrad on Linux to send output to jack? I have installed linrad, and am running it, and it shows input from my sound card. But I don't know what to type at this point.
Thank you, Robert
Hi, you should press U in the main Linrad screen and then B to choose the output device. You should now reply Yes when it asks for PortAudio. Of course for it to work you should have compiled Linrad with Portaudio support. Here you'll find the complete guide by Leif: http://www.sm5bsz.com/linuxdsp/install/luiparm.htm
Tell me if you need something else.
marco
Il giorno mer 8 mag 2019 alle ore 17:01 Robert Morris < notifications@github.com> ha scritto:
Can you tell me how to tell linrad on Linux to send output to jack? I have installed linrad, and am running it, and it shows input from my sound card. But I don't know what to type at this point.
Thank you, Robert
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rtmrtmrtmrtm/weakmon/issues/8#issuecomment-490522275, or mute the thread https://github.com/notifications/unsubscribe-auth/ABD3XIABIJPQR6CRFN7ABZLPULTMBANCNFSM4HJ5YKNA .
-- marco cogoni CRS4 http://sibamanna DOT duckdns DOT org
For me, ft8.py can hear input from jack without modification. I run qjackctl and use the Setup menu to tell it to take input from my radio. When I run ft8.py with no arguments, it lists "system, channels=2 44100" as one of the available sound cards (it is number 15 for me). That is really the jack virtual audio connection. I run ft8.py -card 15 0. Now PortAudio shows up in the qjack Connections display. I tell qjack to connect my radio to PortAudio, and ft8.py starts seeing decodes.
On the other hand I cannot get this to work with linrad. qjack shows linrad and PortAudio, and connects them, but the samples that ft8.py sees are all zeros. Maybe I don't know how to tell linrad to generate audio output correctly.
Hi Robert, now I'm at work and I've got no perseus to try, but apparently I've got LINRAD working with jack. I added to jack configuration a post-start script as suggested in the last option here: https://github.com/jackaudio/jackaudio.github.com/wiki/WalkThrough_User_PulseOnJack I also installed pulseaudio-module-jack that I didn't have before.
I'm using the soundcard as input in linrad and the output is going to jack. Then I'm printing the np.max(samples) in the gocard function and it reacts to volume changes in linrad... So i'll tell you later this afternoon if it works. For now I can tell you that using my remote kiwiSDR (audio out from Firefox -> Jack) things work smooth.
I don't understand how WJST-X sees the "audio card output monitor" directly, without using jack, just with pulseaudio I believe.
Thanks for you effort, marco
OK Robert, I can confirm that LINRAD works perfectly with ft8.py via Jack and the procedure indicated above. So, after setting up Jack with the post-start script above, one should FIRST start Jack and then LINRAD. In LINRAD one should choose Portaudio and then Pulse as the device, then play with mixer settings to direct the audio output to Jack Sink. Set up your levels and you're ready to go with ft8.py.
Maybe you could add a description like this to the README.
73, marco
Hi, thanks for the excellent software and for the detailed comments making it possible to understand much more than the original WSJT-X. I'm trying to run it with LINRAD and a few SDRs, so I'd like to use as input the "audio monitor" of the output of the sound card as in Portaudio.
Is it possible to do it? Does the software support direct WAV decoding?
Thanks, marco / IS0KYB