Skip to content

Commit 9e0e89a

Browse files
committed
Load torchcodec lazily
1 parent 1255bd1 commit 9e0e89a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/torchaudio/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from . import sox_utils
44
from .download import download_asset
55
import os
6-
from torchcodec.decoders import AudioDecoder
76

87
def load_torchcodec(file, **args):
8+
from torchcodec.decoders import AudioDecoder
99
try:
1010
decoder = AudioDecoder(file)
1111
if 'start_seconds' in args or 'stop_seconds' in args:

0 commit comments

Comments
 (0)