Skip to content

Backend inconsistency with torch.load #902

@timlod

Description

@timlod

🐛 Bug

sox and soundfile backends use the parameter normalization, whereas sox_io uses normalize.
Code defaulting on one and falling back on another therefore will throw errors due to a wrong keyword argument.
Similarly, sox_io uses frame_offset instead of offset.

To Reproduce

Steps to reproduce the behavior:

  1. torchaudio.set_audio_backend("sox_io")
  2. torchaudio.load(..., normalization=False)

Expected behavior

Consistent keyword naming across backends.

Environment

torchaudio 0.6.0

Additional context

I saw some typos in the new documentation and may make a pull request for the lot if I get the time soon.
While I actually prefer normalize, normalization is probably preferred for backwards compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions