Skip to content

Record viewer expects two-channel WAV files #7

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions