Skip to content
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

Record viewer expects two-channel WAV files #7

Open
ghost opened this issue Sep 10, 2015 · 1 comment
Open

Record viewer expects two-channel WAV files #7

ghost opened this issue Sep 10, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 10, 2015

Feeding a standard mono-channel WAV file will make numpy extremely unhappy:

Traceback (most recent call last):
  File "./pysdr-recviewer", line 5, in <module>
    main()
  File ".../pysdr/recviewer.py", line 168, in main
    sample_rate, signal = read_file(sys.argv[1])
  File ".../pysdr/recviewer.py", line 145, in read_file
    return (sample_rate, audio[:,0] + 1j * audio[:,1])
IndexError: too many indices

And converting a mono-channel WAV to two channels will produce unreliable results depending on the tool. If both channels contain the same samples, the resulting spectrogram will be an incorrect representation of the signal.

@kaklik
Copy link
Member

kaklik commented Oct 23, 2015

We always have two-channel complex data eg. I and Q so we do not work with mono wav files. Working with wav mono data is the same as I/Q data stream with identical channels. You should make a wav file with two identical channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant