File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,6 @@ class AudioEncoder {
1111
1212 AudioEncoder (
1313 const torch::Tensor& samples,
14- // TODO-ENCODING: update this comment when we support an output sample
15- // rate. This will become the input sample rate.
16- // The *output* sample rate. We can't really decide for the user what it
17- // should be. Particularly, the sample rate of the input samples should
18- // match this, and that's up to the user. If sample rates don't match,
19- // encoding will still work but audio will be distorted.
2014 int sampleRate,
2115 std::string_view fileName,
2216 const AudioStreamOptions& audioStreamOptions);
Original file line number Diff line number Diff line change 22import os
33import re
44import subprocess
5+ import sys
56from functools import partial
67from pathlib import Path
78
1213from torchcodec .encoders import AudioEncoder
1314
1415from .utils import (
16+ assert_tensor_close_on_at_least ,
1517 get_ffmpeg_major_version ,
1618 in_fbcode ,
1719 NASA_AUDIO_MP3 ,
@@ -266,9 +268,7 @@ def test_against_cli(
266268 if sample_rate != asset .sample_rate :
267269 rtol , atol = 0 , 1e-3
268270 if sys .platform == "darwin" :
269- assert_close = partial (
270- utils .assert_tensor_close_on_at_least , percentage = 99
271- )
271+ assert_close = partial (assert_tensor_close_on_at_least , percentage = 99 )
272272 elif format == "wav" :
273273 rtol , atol = 0 , 1e-4
274274 elif format == "mp3" and asset is SINE_MONO_S32 and num_channels == 2 :
You can’t perform that action at this time.
0 commit comments