question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🚀 Feature

I would like to propose adding of A-Law to torchaudio.transforms

Motivation

A-law is a companding algorithm similar to mu-law (that is already in torchaudio). It is used in European 8-bit PCM systems. By convention, A-law is used for an international connection if at least one country uses it. With these transforms torchaudio would enable even wider modelling capabilities of telephony audio.

Pitch

I imagine the API could be almost identical to MuLaw with one caveat - the compression parameter A would be an additional parameter. So at the end there would be two additional transforms ALawEncoding and ALawDecoding.

Additional context

I have already written the code and would be happy to open a PR.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dvisockascommented, Sep 30, 2020

The only reference implementation I seem to find is the wikipedia graph: image Running a linspace vector through unquantized A law encoding yields: image

0reactions
vincentqbcommented, Oct 7, 2020

Does the TODO in PR #930 look good?

I’ve updated the comment to make it clearer what’s entailed 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

A-law algorithm - Wikipedia
An A-law algorithm is a standard companding algorithm, used in European 8-bit PCM digital communications systems to optimize, i.e. modify, the dynamic range ......
Read more >
What is a Law? - Ben's Guide
Laws teach us how to behave properly and inform us of the rules we all must follow. So first, we need to know...
Read more >
LAW | definition in the Cambridge English Dictionary
a rule, usually made by a government, that is used to order the way in which a society behaves: There are laws against...
Read more >
How Laws Are Made and How to Research Them - USA.gov
Learn how laws, regulations, and executive orders are made and how to look them up.
Read more >
Law Definition & Meaning - Merriam-Webster
a · a rule of conduct or action laid down and enforced by the supreme governing authority (as the legislature) of a community...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found