Commit d850ff61 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Unset BPS when using sox vorbis (#3359)

Summary:
When saving audio with vorbis, BPS should not be specified, otherwise warnings that cannot be turned off are shown.

Address: https://github.com/pytorch/audio/issues/3358

Pull Request resolved: https://github.com/pytorch/audio/pull/3359

Reviewed By: nateanl

Differential Revision: D46095037

Pulled By: mthrok

fbshipit-source-id: 6885a12dc3ec84bf39f0159ee58d1a2a87cff7e4
parent 2255a0fc
...@@ -313,7 +313,7 @@ std::tuple<sox_encoding_t, unsigned> get_save_encoding( ...@@ -313,7 +313,7 @@ std::tuple<sox_encoding_t, unsigned> get_save_encoding(
TORCH_CHECK( TORCH_CHECK(
bps == BitDepth::NOT_PROVIDED, bps == BitDepth::NOT_PROVIDED,
"vorbis does not support `bits_per_sample` option."); "vorbis does not support `bits_per_sample` option.");
return std::make_tuple<>(SOX_ENCODING_VORBIS, 16); return std::make_tuple<>(SOX_ENCODING_VORBIS, 0);
case Format::AMR_NB: case Format::AMR_NB:
TORCH_CHECK( TORCH_CHECK(
enc == Encoding::NOT_PROVIDED, enc == Encoding::NOT_PROVIDED,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment