torchaudio 2.7.0__cp313-cp313t-manylinux_2_28_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of torchaudio might be problematic. Click here for more details.

Files changed (148) hide show
  1. torchaudio/__init__.py +53 -0
  2. torchaudio/_backend/__init__.py +61 -0
  3. torchaudio/_backend/backend.py +53 -0
  4. torchaudio/_backend/common.py +52 -0
  5. torchaudio/_backend/ffmpeg.py +334 -0
  6. torchaudio/_backend/soundfile.py +54 -0
  7. torchaudio/_backend/soundfile_backend.py +457 -0
  8. torchaudio/_backend/sox.py +91 -0
  9. torchaudio/_backend/utils.py +317 -0
  10. torchaudio/_extension/__init__.py +74 -0
  11. torchaudio/_extension/utils.py +180 -0
  12. torchaudio/_internal/__init__.py +10 -0
  13. torchaudio/_internal/module_utils.py +113 -0
  14. torchaudio/backend/__init__.py +8 -0
  15. torchaudio/backend/_no_backend.py +25 -0
  16. torchaudio/backend/_sox_io_backend.py +294 -0
  17. torchaudio/backend/common.py +13 -0
  18. torchaudio/backend/no_backend.py +14 -0
  19. torchaudio/backend/soundfile_backend.py +14 -0
  20. torchaudio/backend/sox_io_backend.py +14 -0
  21. torchaudio/compliance/__init__.py +5 -0
  22. torchaudio/compliance/kaldi.py +813 -0
  23. torchaudio/datasets/__init__.py +47 -0
  24. torchaudio/datasets/cmuarctic.py +157 -0
  25. torchaudio/datasets/cmudict.py +186 -0
  26. torchaudio/datasets/commonvoice.py +86 -0
  27. torchaudio/datasets/dr_vctk.py +121 -0
  28. torchaudio/datasets/fluentcommands.py +108 -0
  29. torchaudio/datasets/gtzan.py +1118 -0
  30. torchaudio/datasets/iemocap.py +147 -0
  31. torchaudio/datasets/librilight_limited.py +111 -0
  32. torchaudio/datasets/librimix.py +133 -0
  33. torchaudio/datasets/librispeech.py +174 -0
  34. torchaudio/datasets/librispeech_biasing.py +189 -0
  35. torchaudio/datasets/libritts.py +168 -0
  36. torchaudio/datasets/ljspeech.py +107 -0
  37. torchaudio/datasets/musdb_hq.py +139 -0
  38. torchaudio/datasets/quesst14.py +136 -0
  39. torchaudio/datasets/snips.py +157 -0
  40. torchaudio/datasets/speechcommands.py +183 -0
  41. torchaudio/datasets/tedlium.py +218 -0
  42. torchaudio/datasets/utils.py +54 -0
  43. torchaudio/datasets/vctk.py +143 -0
  44. torchaudio/datasets/voxceleb1.py +309 -0
  45. torchaudio/datasets/yesno.py +89 -0
  46. torchaudio/functional/__init__.py +127 -0
  47. torchaudio/functional/_alignment.py +128 -0
  48. torchaudio/functional/filtering.py +1670 -0
  49. torchaudio/functional/functional.py +2535 -0
  50. torchaudio/io/__init__.py +13 -0
  51. torchaudio/io/_effector.py +347 -0
  52. torchaudio/io/_playback.py +72 -0
  53. torchaudio/kaldi_io.py +144 -0
  54. torchaudio/lib/__init__.py +0 -0
  55. torchaudio/lib/_torchaudio.so +0 -0
  56. torchaudio/lib/_torchaudio_sox.so +0 -0
  57. torchaudio/lib/libctc_prefix_decoder.so +0 -0
  58. torchaudio/lib/libtorchaudio.so +0 -0
  59. torchaudio/lib/libtorchaudio_sox.so +0 -0
  60. torchaudio/lib/pybind11_prefixctc.so +0 -0
  61. torchaudio/models/__init__.py +85 -0
  62. torchaudio/models/_hdemucs.py +1008 -0
  63. torchaudio/models/conformer.py +293 -0
  64. torchaudio/models/conv_tasnet.py +330 -0
  65. torchaudio/models/decoder/__init__.py +46 -0
  66. torchaudio/models/decoder/_ctc_decoder.py +568 -0
  67. torchaudio/models/decoder/_cuda_ctc_decoder.py +187 -0
  68. torchaudio/models/deepspeech.py +84 -0
  69. torchaudio/models/emformer.py +884 -0
  70. torchaudio/models/rnnt.py +816 -0
  71. torchaudio/models/rnnt_decoder.py +339 -0
  72. torchaudio/models/squim/__init__.py +11 -0
  73. torchaudio/models/squim/objective.py +326 -0
  74. torchaudio/models/squim/subjective.py +150 -0
  75. torchaudio/models/tacotron2.py +1046 -0
  76. torchaudio/models/wav2letter.py +72 -0
  77. torchaudio/models/wav2vec2/__init__.py +45 -0
  78. torchaudio/models/wav2vec2/components.py +1167 -0
  79. torchaudio/models/wav2vec2/model.py +1579 -0
  80. torchaudio/models/wav2vec2/utils/__init__.py +7 -0
  81. torchaudio/models/wav2vec2/utils/import_fairseq.py +213 -0
  82. torchaudio/models/wav2vec2/utils/import_huggingface.py +134 -0
  83. torchaudio/models/wav2vec2/wavlm_attention.py +214 -0
  84. torchaudio/models/wavernn.py +409 -0
  85. torchaudio/pipelines/__init__.py +102 -0
  86. torchaudio/pipelines/_source_separation_pipeline.py +109 -0
  87. torchaudio/pipelines/_squim_pipeline.py +156 -0
  88. torchaudio/pipelines/_tts/__init__.py +16 -0
  89. torchaudio/pipelines/_tts/impl.py +385 -0
  90. torchaudio/pipelines/_tts/interface.py +255 -0
  91. torchaudio/pipelines/_tts/utils.py +228 -0
  92. torchaudio/pipelines/_wav2vec2/__init__.py +0 -0
  93. torchaudio/pipelines/_wav2vec2/aligner.py +87 -0
  94. torchaudio/pipelines/_wav2vec2/impl.py +1699 -0
  95. torchaudio/pipelines/_wav2vec2/utils.py +346 -0
  96. torchaudio/pipelines/rnnt_pipeline.py +380 -0
  97. torchaudio/prototype/__init__.py +0 -0
  98. torchaudio/prototype/datasets/__init__.py +4 -0
  99. torchaudio/prototype/datasets/musan.py +67 -0
  100. torchaudio/prototype/functional/__init__.py +26 -0
  101. torchaudio/prototype/functional/_dsp.py +433 -0
  102. torchaudio/prototype/functional/_rir.py +379 -0
  103. torchaudio/prototype/functional/functional.py +190 -0
  104. torchaudio/prototype/models/__init__.py +36 -0
  105. torchaudio/prototype/models/_conformer_wav2vec2.py +794 -0
  106. torchaudio/prototype/models/_emformer_hubert.py +333 -0
  107. torchaudio/prototype/models/conv_emformer.py +525 -0
  108. torchaudio/prototype/models/hifi_gan.py +336 -0
  109. torchaudio/prototype/models/rnnt.py +711 -0
  110. torchaudio/prototype/models/rnnt_decoder.py +399 -0
  111. torchaudio/prototype/pipelines/__init__.py +12 -0
  112. torchaudio/prototype/pipelines/_vggish/__init__.py +3 -0
  113. torchaudio/prototype/pipelines/_vggish/_vggish_impl.py +233 -0
  114. torchaudio/prototype/pipelines/_vggish/_vggish_pipeline.py +82 -0
  115. torchaudio/prototype/pipelines/hifigan_pipeline.py +228 -0
  116. torchaudio/prototype/pipelines/rnnt_pipeline.py +58 -0
  117. torchaudio/prototype/transforms/__init__.py +9 -0
  118. torchaudio/prototype/transforms/_transforms.py +456 -0
  119. torchaudio/sox_effects/__init__.py +10 -0
  120. torchaudio/sox_effects/sox_effects.py +272 -0
  121. torchaudio/transforms/__init__.py +75 -0
  122. torchaudio/transforms/_multi_channel.py +467 -0
  123. torchaudio/transforms/_transforms.py +2137 -0
  124. torchaudio/utils/__init__.py +11 -0
  125. torchaudio/utils/download.py +89 -0
  126. torchaudio/utils/ffmpeg_utils.py +11 -0
  127. torchaudio/utils/sox_utils.py +99 -0
  128. torchaudio/version.py +2 -0
  129. torchaudio-2.7.0.dist-info/LICENSE +25 -0
  130. torchaudio-2.7.0.dist-info/METADATA +114 -0
  131. torchaudio-2.7.0.dist-info/RECORD +148 -0
  132. torchaudio-2.7.0.dist-info/WHEEL +5 -0
  133. torchaudio-2.7.0.dist-info/top_level.txt +2 -0
  134. torio/__init__.py +8 -0
  135. torio/_extension/__init__.py +13 -0
  136. torio/_extension/utils.py +147 -0
  137. torio/io/__init__.py +9 -0
  138. torio/io/_streaming_media_decoder.py +978 -0
  139. torio/io/_streaming_media_encoder.py +502 -0
  140. torio/lib/__init__.py +0 -0
  141. torio/lib/_torio_ffmpeg4.so +0 -0
  142. torio/lib/_torio_ffmpeg5.so +0 -0
  143. torio/lib/_torio_ffmpeg6.so +0 -0
  144. torio/lib/libtorio_ffmpeg4.so +0 -0
  145. torio/lib/libtorio_ffmpeg5.so +0 -0
  146. torio/lib/libtorio_ffmpeg6.so +0 -0
  147. torio/utils/__init__.py +4 -0
  148. torio/utils/ffmpeg_utils.py +247 -0
@@ -0,0 +1,8 @@
1
+ # NOTE:
2
+ # The entire `torchaudio.backend` module is deprecated.
3
+ # New things should be added to `torchaudio._backend`.
4
+ # Only things related to backward compatibility should be placed here.
5
+
6
+ from . import common, no_backend, soundfile_backend, sox_io_backend # noqa
7
+
8
+ __all__ = []
@@ -0,0 +1,25 @@
1
+ from pathlib import Path
2
+ from typing import Callable, Optional, Tuple, Union
3
+
4
+ from torch import Tensor
5
+ from torchaudio import AudioMetaData
6
+
7
+
8
+ def load(
9
+ filepath: Union[str, Path],
10
+ out: Optional[Tensor] = None,
11
+ normalization: Union[bool, float, Callable] = True,
12
+ channels_first: bool = True,
13
+ num_frames: int = 0,
14
+ offset: int = 0,
15
+ filetype: Optional[str] = None,
16
+ ) -> Tuple[Tensor, int]:
17
+ raise RuntimeError("No audio I/O backend is available.")
18
+
19
+
20
+ def save(filepath: str, src: Tensor, sample_rate: int, precision: int = 16, channels_first: bool = True) -> None:
21
+ raise RuntimeError("No audio I/O backend is available.")
22
+
23
+
24
+ def info(filepath: str) -> AudioMetaData:
25
+ raise RuntimeError("No audio I/O backend is available.")
@@ -0,0 +1,294 @@
1
+ import os
2
+ from typing import Optional, Tuple
3
+
4
+ import torch
5
+ import torchaudio
6
+ from torchaudio import AudioMetaData
7
+
8
+ sox_ext = torchaudio._extension.lazy_import_sox_ext()
9
+
10
+
11
+ def info(
12
+ filepath: str,
13
+ format: Optional[str] = None,
14
+ ) -> AudioMetaData:
15
+ """Get signal information of an audio file.
16
+
17
+ Args:
18
+ filepath (str):
19
+ Source of audio data.
20
+
21
+ format (str or None, optional):
22
+ Override the format detection with the given format.
23
+ Providing the argument might help when libsox can not infer the format
24
+ from header or extension.
25
+
26
+ Returns:
27
+ AudioMetaData: Metadata of the given audio.
28
+ """
29
+ if not torch.jit.is_scripting():
30
+ if hasattr(filepath, "read"):
31
+ raise RuntimeError("sox_io backend does not support file-like object.")
32
+ filepath = os.fspath(filepath)
33
+ sinfo = sox_ext.get_info(filepath, format)
34
+ return AudioMetaData(*sinfo)
35
+
36
+
37
+ def load(
38
+ filepath: str,
39
+ frame_offset: int = 0,
40
+ num_frames: int = -1,
41
+ normalize: bool = True,
42
+ channels_first: bool = True,
43
+ format: Optional[str] = None,
44
+ ) -> Tuple[torch.Tensor, int]:
45
+ """Load audio data from file.
46
+
47
+ Note:
48
+ This function can handle all the codecs that underlying libsox can handle,
49
+ however it is tested on the following formats;
50
+
51
+ * WAV, AMB
52
+
53
+ * 32-bit floating-point
54
+ * 32-bit signed integer
55
+ * 24-bit signed integer
56
+ * 16-bit signed integer
57
+ * 8-bit unsigned integer (WAV only)
58
+
59
+ * MP3
60
+ * FLAC
61
+ * OGG/VORBIS
62
+ * OPUS
63
+ * SPHERE
64
+ * AMR-NB
65
+
66
+ To load ``MP3``, ``FLAC``, ``OGG/VORBIS``, ``OPUS`` and other codecs ``libsox`` does not
67
+ handle natively, your installation of ``torchaudio`` has to be linked to ``libsox``
68
+ and corresponding codec libraries such as ``libmad`` or ``libmp3lame`` etc.
69
+
70
+ By default (``normalize=True``, ``channels_first=True``), this function returns Tensor with
71
+ ``float32`` dtype, and the shape of `[channel, time]`.
72
+
73
+ .. warning::
74
+
75
+ ``normalize`` argument does not perform volume normalization.
76
+ It only converts the sample type to `torch.float32` from the native sample
77
+ type.
78
+
79
+ When the input format is WAV with integer type, such as 32-bit signed integer, 16-bit
80
+ signed integer, 24-bit signed integer, and 8-bit unsigned integer, by providing ``normalize=False``,
81
+ this function can return integer Tensor, where the samples are expressed within the whole range
82
+ of the corresponding dtype, that is, ``int32`` tensor for 32-bit signed PCM,
83
+ ``int16`` for 16-bit signed PCM and ``uint8`` for 8-bit unsigned PCM. Since torch does not
84
+ support ``int24`` dtype, 24-bit signed PCM are converted to ``int32`` tensors.
85
+
86
+ ``normalize`` argument has no effect on 32-bit floating-point WAV and other formats, such as
87
+ ``flac`` and ``mp3``.
88
+
89
+ For these formats, this function always returns ``float32`` Tensor with values.
90
+
91
+ Args:
92
+ filepath (path-like object): Source of audio data.
93
+ frame_offset (int):
94
+ Number of frames to skip before start reading data.
95
+ num_frames (int, optional):
96
+ Maximum number of frames to read. ``-1`` reads all the remaining samples,
97
+ starting from ``frame_offset``.
98
+ This function may return the less number of frames if there is not enough
99
+ frames in the given file.
100
+ normalize (bool, optional):
101
+ When ``True``, this function converts the native sample type to ``float32``.
102
+ Default: ``True``.
103
+
104
+ If input file is integer WAV, giving ``False`` will change the resulting Tensor type to
105
+ integer type.
106
+ This argument has no effect for formats other than integer WAV type.
107
+
108
+ channels_first (bool, optional):
109
+ When True, the returned Tensor has dimension `[channel, time]`.
110
+ Otherwise, the returned Tensor's dimension is `[time, channel]`.
111
+ format (str or None, optional):
112
+ Override the format detection with the given format.
113
+ Providing the argument might help when libsox can not infer the format
114
+ from header or extension.
115
+
116
+ Returns:
117
+ (torch.Tensor, int): Resulting Tensor and sample rate.
118
+ If the input file has integer wav format and ``normalize=False``, then it has
119
+ integer type, else ``float32`` type. If ``channels_first=True``, it has
120
+ `[channel, time]` else `[time, channel]`.
121
+ """
122
+ if not torch.jit.is_scripting():
123
+ if hasattr(filepath, "read"):
124
+ raise RuntimeError("sox_io backend does not support file-like object.")
125
+ filepath = os.fspath(filepath)
126
+ return sox_ext.load_audio_file(filepath, frame_offset, num_frames, normalize, channels_first, format)
127
+
128
+
129
+ def save(
130
+ filepath: str,
131
+ src: torch.Tensor,
132
+ sample_rate: int,
133
+ channels_first: bool = True,
134
+ compression: Optional[float] = None,
135
+ format: Optional[str] = None,
136
+ encoding: Optional[str] = None,
137
+ bits_per_sample: Optional[int] = None,
138
+ ):
139
+ """Save audio data to file.
140
+
141
+ Args:
142
+ filepath (path-like object): Path to save file.
143
+ src (torch.Tensor): Audio data to save. must be 2D tensor.
144
+ sample_rate (int): sampling rate
145
+ channels_first (bool, optional): If ``True``, the given tensor is interpreted as `[channel, time]`,
146
+ otherwise `[time, channel]`.
147
+ compression (float or None, optional): Used for formats other than WAV.
148
+ This corresponds to ``-C`` option of ``sox`` command.
149
+
150
+ ``"mp3"``
151
+ Either bitrate (in ``kbps``) with quality factor, such as ``128.2``, or
152
+ VBR encoding with quality factor such as ``-4.2``. Default: ``-4.5``.
153
+
154
+ ``"flac"``
155
+ Whole number from ``0`` to ``8``. ``8`` is default and highest compression.
156
+
157
+ ``"ogg"``, ``"vorbis"``
158
+ Number from ``-1`` to ``10``; ``-1`` is the highest compression
159
+ and lowest quality. Default: ``3``.
160
+
161
+ See the detail at http://sox.sourceforge.net/soxformat.html.
162
+ format (str or None, optional): Override the audio format.
163
+ When ``filepath`` argument is path-like object, audio format is infered from
164
+ file extension. If file extension is missing or different, you can specify the
165
+ correct format with this argument.
166
+
167
+ When ``filepath`` argument is file-like object, this argument is required.
168
+
169
+ Valid values are ``"wav"``, ``"mp3"``, ``"ogg"``, ``"vorbis"``, ``"amr-nb"``,
170
+ ``"amb"``, ``"flac"``, ``"sph"``, ``"gsm"``, and ``"htk"``.
171
+
172
+ encoding (str or None, optional): Changes the encoding for the supported formats.
173
+ This argument is effective only for supported formats, such as ``"wav"``, ``""amb"``
174
+ and ``"sph"``. Valid values are;
175
+
176
+ - ``"PCM_S"`` (signed integer Linear PCM)
177
+ - ``"PCM_U"`` (unsigned integer Linear PCM)
178
+ - ``"PCM_F"`` (floating point PCM)
179
+ - ``"ULAW"`` (mu-law)
180
+ - ``"ALAW"`` (a-law)
181
+
182
+ Default values
183
+ If not provided, the default value is picked based on ``format`` and ``bits_per_sample``.
184
+
185
+ ``"wav"``, ``"amb"``
186
+ - | If both ``encoding`` and ``bits_per_sample`` are not provided, the ``dtype`` of the
187
+ | Tensor is used to determine the default value.
188
+
189
+ - ``"PCM_U"`` if dtype is ``uint8``
190
+ - ``"PCM_S"`` if dtype is ``int16`` or ``int32``
191
+ - ``"PCM_F"`` if dtype is ``float32``
192
+
193
+ - ``"PCM_U"`` if ``bits_per_sample=8``
194
+ - ``"PCM_S"`` otherwise
195
+
196
+ ``"sph"`` format;
197
+ - the default value is ``"PCM_S"``
198
+
199
+ bits_per_sample (int or None, optional): Changes the bit depth for the supported formats.
200
+ When ``format`` is one of ``"wav"``, ``"flac"``, ``"sph"``, or ``"amb"``, you can change the
201
+ bit depth. Valid values are ``8``, ``16``, ``32`` and ``64``.
202
+
203
+ Default Value;
204
+ If not provided, the default values are picked based on ``format`` and ``"encoding"``;
205
+
206
+ ``"wav"``, ``"amb"``;
207
+ - | If both ``encoding`` and ``bits_per_sample`` are not provided, the ``dtype`` of the
208
+ | Tensor is used.
209
+
210
+ - ``8`` if dtype is ``uint8``
211
+ - ``16`` if dtype is ``int16``
212
+ - ``32`` if dtype is ``int32`` or ``float32``
213
+
214
+ - ``8`` if ``encoding`` is ``"PCM_U"``, ``"ULAW"`` or ``"ALAW"``
215
+ - ``16`` if ``encoding`` is ``"PCM_S"``
216
+ - ``32`` if ``encoding`` is ``"PCM_F"``
217
+
218
+ ``"flac"`` format;
219
+ - the default value is ``24``
220
+
221
+ ``"sph"`` format;
222
+ - ``16`` if ``encoding`` is ``"PCM_U"``, ``"PCM_S"``, ``"PCM_F"`` or not provided.
223
+ - ``8`` if ``encoding`` is ``"ULAW"`` or ``"ALAW"``
224
+
225
+ ``"amb"`` format;
226
+ - ``8`` if ``encoding`` is ``"PCM_U"``, ``"ULAW"`` or ``"ALAW"``
227
+ - ``16`` if ``encoding`` is ``"PCM_S"`` or not provided.
228
+ - ``32`` if ``encoding`` is ``"PCM_F"``
229
+
230
+ Supported formats/encodings/bit depth/compression are;
231
+
232
+ ``"wav"``, ``"amb"``
233
+ - 32-bit floating-point PCM
234
+ - 32-bit signed integer PCM
235
+ - 24-bit signed integer PCM
236
+ - 16-bit signed integer PCM
237
+ - 8-bit unsigned integer PCM
238
+ - 8-bit mu-law
239
+ - 8-bit a-law
240
+
241
+ Note: Default encoding/bit depth is determined by the dtype of the input Tensor.
242
+
243
+ ``"mp3"``
244
+ Fixed bit rate (such as 128kHz) and variable bit rate compression.
245
+ Default: VBR with high quality.
246
+
247
+ ``"flac"``
248
+ - 8-bit
249
+ - 16-bit
250
+ - 24-bit (default)
251
+
252
+ ``"ogg"``, ``"vorbis"``
253
+ - Different quality level. Default: approx. 112kbps
254
+
255
+ ``"sph"``
256
+ - 8-bit signed integer PCM
257
+ - 16-bit signed integer PCM
258
+ - 24-bit signed integer PCM
259
+ - 32-bit signed integer PCM (default)
260
+ - 8-bit mu-law
261
+ - 8-bit a-law
262
+ - 16-bit a-law
263
+ - 24-bit a-law
264
+ - 32-bit a-law
265
+
266
+ ``"amr-nb"``
267
+ Bitrate ranging from 4.75 kbit/s to 12.2 kbit/s. Default: 4.75 kbit/s
268
+
269
+ ``"gsm"``
270
+ Lossy Speech Compression, CPU intensive.
271
+
272
+ ``"htk"``
273
+ Uses a default single-channel 16-bit PCM format.
274
+
275
+ Note:
276
+ To save into formats that ``libsox`` does not handle natively, (such as ``"mp3"``,
277
+ ``"flac"``, ``"ogg"`` and ``"vorbis"``), your installation of ``torchaudio`` has
278
+ to be linked to ``libsox`` and corresponding codec libraries such as ``libmad``
279
+ or ``libmp3lame`` etc.
280
+ """
281
+ if not torch.jit.is_scripting():
282
+ if hasattr(filepath, "write"):
283
+ raise RuntimeError("sox_io backend does not handle file-like object.")
284
+ filepath = os.fspath(filepath)
285
+ sox_ext.save_audio_file(
286
+ filepath,
287
+ src,
288
+ sample_rate,
289
+ channels_first,
290
+ compression,
291
+ format,
292
+ encoding,
293
+ bits_per_sample,
294
+ )
@@ -0,0 +1,13 @@
1
+ def __getattr__(name: str):
2
+ if name == "AudioMetaData":
3
+ import warnings
4
+
5
+ warnings.warn(
6
+ "`torchaudio.backend.common.AudioMetaData` has been moved to "
7
+ "`torchaudio.AudioMetaData`. Please update the import path.",
8
+ stacklevel=2,
9
+ )
10
+ from torchaudio import AudioMetaData
11
+
12
+ return AudioMetaData
13
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -0,0 +1,14 @@
1
+ def __getattr__(name: str):
2
+ import warnings
3
+
4
+ warnings.warn(
5
+ "Torchaudio's I/O functions now support par-call bakcend dispatch. "
6
+ "Importing backend implementation directly is no longer guaranteed to work. "
7
+ "Please use `backend` keyword with load/save/info function, instead of "
8
+ "calling the udnerlying implementation directly.",
9
+ stacklevel=2,
10
+ )
11
+
12
+ from . import _no_backend
13
+
14
+ return getattr(_no_backend, name)
@@ -0,0 +1,14 @@
1
+ def __getattr__(name: str):
2
+ import warnings
3
+
4
+ warnings.warn(
5
+ "Torchaudio's I/O functions now support par-call bakcend dispatch. "
6
+ "Importing backend implementation directly is no longer guaranteed to work. "
7
+ "Please use `backend` keyword with load/save/info function, instead of "
8
+ "calling the udnerlying implementation directly.",
9
+ stacklevel=2,
10
+ )
11
+
12
+ from torchaudio._backend import soundfile_backend
13
+
14
+ return getattr(soundfile_backend, name)
@@ -0,0 +1,14 @@
1
+ def __getattr__(name: str):
2
+ import warnings
3
+
4
+ warnings.warn(
5
+ "Torchaudio's I/O functions now support par-call bakcend dispatch. "
6
+ "Importing backend implementation directly is no longer guaranteed to work. "
7
+ "Please use `backend` keyword with load/save/info function, instead of "
8
+ "calling the udnerlying implementation directly.",
9
+ stacklevel=2,
10
+ )
11
+
12
+ from . import _sox_io_backend
13
+
14
+ return getattr(_sox_io_backend, name)
@@ -0,0 +1,5 @@
1
+ from . import kaldi
2
+
3
+ __all__ = [
4
+ "kaldi",
5
+ ]