File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change 6
6
7
7
def load_torchcodec (file , ** args ):
8
8
from torchcodec .decoders import AudioDecoder
9
- try :
10
- decoder = AudioDecoder (file )
11
- if 'start_seconds' in args or 'stop_seconds' in args :
12
- samples = decoder .get_samples_played_in_range (** args )
13
- else :
14
- samples = decoder .get_all_samples ()
15
- return (samples .data , samples .sample_rate )
16
- except Exception as e :
17
- if "buggy FFmpeg version" in str (e ) and "PYTEST_CURRENT_TEST" in os .environ :
18
- import pytest
19
- pytest .skip ()
20
- else :
21
- raise e
9
+ decoder = AudioDecoder (file )
10
+ if 'start_seconds' in args or 'stop_seconds' in args :
11
+ samples = decoder .get_samples_played_in_range (** args )
12
+ else :
13
+ samples = decoder .get_all_samples ()
14
+ return (samples .data , samples .sample_rate )
22
15
23
16
__all__ = [
24
17
"load_torchcodec" ,
You can’t perform that action at this time.
0 commit comments