torchaudio 2.8.0__cp312-cp312-win_amd64.whl → 2.9.0__cp312-cp312-win_amd64.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 (92) hide show
  1. torchaudio/__init__.py +179 -39
  2. torchaudio/_extension/__init__.py +1 -14
  3. torchaudio/_extension/utils.py +0 -47
  4. torchaudio/_internal/module_utils.py +12 -3
  5. torchaudio/_torchcodec.py +73 -85
  6. torchaudio/datasets/cmuarctic.py +1 -1
  7. torchaudio/datasets/utils.py +1 -1
  8. torchaudio/functional/__init__.py +0 -2
  9. torchaudio/functional/_alignment.py +1 -1
  10. torchaudio/functional/filtering.py +70 -55
  11. torchaudio/functional/functional.py +26 -60
  12. torchaudio/lib/_torchaudio.pyd +0 -0
  13. torchaudio/lib/libtorchaudio.pyd +0 -0
  14. torchaudio/models/decoder/__init__.py +14 -2
  15. torchaudio/models/decoder/_ctc_decoder.py +6 -6
  16. torchaudio/models/decoder/_cuda_ctc_decoder.py +1 -1
  17. torchaudio/models/squim/objective.py +2 -2
  18. torchaudio/pipelines/_source_separation_pipeline.py +1 -1
  19. torchaudio/pipelines/_squim_pipeline.py +2 -2
  20. torchaudio/pipelines/_tts/utils.py +1 -1
  21. torchaudio/pipelines/rnnt_pipeline.py +4 -4
  22. torchaudio/transforms/__init__.py +1 -0
  23. torchaudio/transforms/_transforms.py +2 -2
  24. torchaudio/utils/__init__.py +2 -9
  25. torchaudio/utils/download.py +1 -3
  26. torchaudio/version.py +2 -2
  27. {torchaudio-2.8.0.dist-info → torchaudio-2.9.0.dist-info}/METADATA +8 -11
  28. torchaudio-2.9.0.dist-info/RECORD +85 -0
  29. {torchaudio-2.8.0.dist-info → torchaudio-2.9.0.dist-info}/top_level.txt +0 -1
  30. torchaudio/_backend/__init__.py +0 -61
  31. torchaudio/_backend/backend.py +0 -53
  32. torchaudio/_backend/common.py +0 -52
  33. torchaudio/_backend/ffmpeg.py +0 -334
  34. torchaudio/_backend/soundfile.py +0 -54
  35. torchaudio/_backend/soundfile_backend.py +0 -457
  36. torchaudio/_backend/sox.py +0 -91
  37. torchaudio/_backend/utils.py +0 -350
  38. torchaudio/backend/__init__.py +0 -8
  39. torchaudio/backend/_no_backend.py +0 -25
  40. torchaudio/backend/_sox_io_backend.py +0 -294
  41. torchaudio/backend/common.py +0 -13
  42. torchaudio/backend/no_backend.py +0 -14
  43. torchaudio/backend/soundfile_backend.py +0 -14
  44. torchaudio/backend/sox_io_backend.py +0 -14
  45. torchaudio/io/__init__.py +0 -20
  46. torchaudio/io/_effector.py +0 -347
  47. torchaudio/io/_playback.py +0 -72
  48. torchaudio/kaldi_io.py +0 -150
  49. torchaudio/prototype/__init__.py +0 -0
  50. torchaudio/prototype/datasets/__init__.py +0 -4
  51. torchaudio/prototype/datasets/musan.py +0 -68
  52. torchaudio/prototype/functional/__init__.py +0 -26
  53. torchaudio/prototype/functional/_dsp.py +0 -441
  54. torchaudio/prototype/functional/_rir.py +0 -382
  55. torchaudio/prototype/functional/functional.py +0 -193
  56. torchaudio/prototype/models/__init__.py +0 -39
  57. torchaudio/prototype/models/_conformer_wav2vec2.py +0 -801
  58. torchaudio/prototype/models/_emformer_hubert.py +0 -337
  59. torchaudio/prototype/models/conv_emformer.py +0 -529
  60. torchaudio/prototype/models/hifi_gan.py +0 -342
  61. torchaudio/prototype/models/rnnt.py +0 -717
  62. torchaudio/prototype/models/rnnt_decoder.py +0 -402
  63. torchaudio/prototype/pipelines/__init__.py +0 -21
  64. torchaudio/prototype/pipelines/_vggish/__init__.py +0 -7
  65. torchaudio/prototype/pipelines/_vggish/_vggish_impl.py +0 -236
  66. torchaudio/prototype/pipelines/_vggish/_vggish_pipeline.py +0 -83
  67. torchaudio/prototype/pipelines/hifigan_pipeline.py +0 -233
  68. torchaudio/prototype/pipelines/rnnt_pipeline.py +0 -58
  69. torchaudio/prototype/transforms/__init__.py +0 -9
  70. torchaudio/prototype/transforms/_transforms.py +0 -461
  71. torchaudio/sox_effects/__init__.py +0 -10
  72. torchaudio/sox_effects/sox_effects.py +0 -275
  73. torchaudio/utils/ffmpeg_utils.py +0 -11
  74. torchaudio/utils/sox_utils.py +0 -118
  75. torchaudio-2.8.0.dist-info/RECORD +0 -145
  76. torio/__init__.py +0 -8
  77. torio/_extension/__init__.py +0 -13
  78. torio/_extension/utils.py +0 -147
  79. torio/io/__init__.py +0 -9
  80. torio/io/_streaming_media_decoder.py +0 -977
  81. torio/io/_streaming_media_encoder.py +0 -502
  82. torio/lib/__init__.py +0 -0
  83. torio/lib/_torio_ffmpeg4.pyd +0 -0
  84. torio/lib/_torio_ffmpeg5.pyd +0 -0
  85. torio/lib/_torio_ffmpeg6.pyd +0 -0
  86. torio/lib/libtorio_ffmpeg4.pyd +0 -0
  87. torio/lib/libtorio_ffmpeg5.pyd +0 -0
  88. torio/lib/libtorio_ffmpeg6.pyd +0 -0
  89. torio/utils/__init__.py +0 -4
  90. torio/utils/ffmpeg_utils.py +0 -275
  91. {torchaudio-2.8.0.dist-info → torchaudio-2.9.0.dist-info}/WHEEL +0 -0
  92. {torchaudio-2.8.0.dist-info → torchaudio-2.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,275 +0,0 @@
1
- """Module to change the configuration of FFmpeg libraries (such as libavformat).
2
-
3
- It affects functionalities in :py:mod:`torio.io`.
4
-
5
- .. warning::
6
- Starting with version 2.8, we are refactoring TorchAudio to transition it
7
- into a maintenance phase. As a result:
8
-
9
- - Some APIs are deprecated in 2.8 and will be removed in 2.9.
10
- - The decoding and encoding capabilities of PyTorch for both audio and video
11
- are being consolidated into TorchCodec.
12
-
13
- Please see https://github.com/pytorch/audio/issues/3902 for more information.
14
- """
15
- from typing import Dict, List, Tuple
16
-
17
- import torio
18
-
19
- ffmpeg_ext = torio._extension.lazy_import_ffmpeg_ext()
20
-
21
-
22
- from torchaudio._internal.module_utils import dropping_support
23
-
24
-
25
- @dropping_support
26
- def get_versions() -> Dict[str, Tuple[int]]:
27
- """Get the versions of FFmpeg libraries
28
-
29
- Returns:
30
- dict: mapping from library names to version string,
31
- i.e. `"libavutil": (56, 22, 100)`.
32
- """
33
- return ffmpeg_ext.get_versions()
34
-
35
-
36
- @dropping_support
37
- def get_log_level() -> int:
38
- """Get the log level of FFmpeg.
39
-
40
- See :py:func:`set_log_level` for the detail.
41
- """
42
- return ffmpeg_ext.get_log_level()
43
-
44
-
45
- @dropping_support
46
- def set_log_level(level: int):
47
- """Set the log level of FFmpeg (libavformat etc)
48
-
49
- Arguments:
50
- level (int): Log level. The larger, the more verbose.
51
-
52
- The following values are common values, the corresponding ``ffmpeg``'s
53
- ``-loglevel`` option value and desription.
54
-
55
- * ``-8`` (``quiet``):
56
- Print no output.
57
- * ``0`` (``panic``):
58
- Something went really wrong and we will crash now.
59
- * ``8`` (``fatal``):
60
- Something went wrong and recovery is not possible.
61
- For example, no header was found for a format which depends
62
- on headers or an illegal combination of parameters is used.
63
- * ``16`` (``error``):
64
- Something went wrong and cannot losslessly be recovered.
65
- However, not all future data is affected.
66
- * ``24`` (``warning``):
67
- Something somehow does not look correct.
68
- This may or may not lead to problems.
69
- * ``32`` (``info``):
70
- Standard information.
71
- * ``40`` (``verbose``):
72
- Detailed information.
73
- * ``48`` (``debug``):
74
- Stuff which is only useful for libav* developers.
75
- * ``56`` (``trace``):
76
- Extremely verbose debugging, useful for libav* development.
77
-
78
- """
79
- ffmpeg_ext.set_log_level(level)
80
-
81
-
82
- @dropping_support
83
- def get_demuxers() -> Dict[str, str]:
84
- """Get the available demuxers.
85
-
86
- Returns:
87
- Dict[str, str]: Mapping from demuxer (format) short name to long name.
88
-
89
- Example
90
- >>> for k, v in get_demuxers().items():
91
- >>> print(f"{k}: {v}")
92
- ... aa: Audible AA format files
93
- ... aac: raw ADTS AAC (Advanced Audio Coding)
94
- ... aax: CRI AAX
95
- ... ac3: raw AC-3
96
- """
97
- return ffmpeg_ext.get_demuxers()
98
-
99
-
100
- @dropping_support
101
- def get_muxers() -> Dict[str, str]:
102
- """Get the available muxers.
103
-
104
- Returns:
105
- Dict[str, str]: Mapping from muxer (format) short name to long name.
106
-
107
- Example
108
- >>> for k, v in get_muxers().items():
109
- >>> print(f"{k}: {v}")
110
- ... a64: a64 - video for Commodore 64
111
- ... ac3: raw AC-3
112
- ... adts: ADTS AAC (Advanced Audio Coding)
113
- ... adx: CRI ADX
114
- ... aiff: Audio IFF
115
- """
116
- return ffmpeg_ext.get_muxers()
117
-
118
-
119
- @dropping_support
120
- def get_audio_decoders() -> Dict[str, str]:
121
- """Get the available audio decoders.
122
-
123
- Returns:
124
- Dict[str, str]: Mapping from decoder short name to long name.
125
-
126
- Example
127
- >>> for k, v in get_audio_decoders().items():
128
- >>> print(f"{k}: {v}")
129
- ... a64: a64 - video for Commodore 64
130
- ... ac3: raw AC-3
131
- ... adts: ADTS AAC (Advanced Audio Coding)
132
- ... adx: CRI ADX
133
- ... aiff: Audio IFF
134
- """
135
- return ffmpeg_ext.get_audio_decoders()
136
-
137
-
138
- @dropping_support
139
- def get_audio_encoders() -> Dict[str, str]:
140
- """Get the available audio encoders.
141
-
142
- Returns:
143
- Dict[str, str]: Mapping from encoder short name to long name.
144
-
145
- Example
146
- >>> for k, v in get_audio_encoders().items():
147
- >>> print(f"{k}: {v}")
148
- ... comfortnoise: RFC 3389 comfort noise generator
149
- ... s302m: SMPTE 302M
150
- ... aac: AAC (Advanced Audio Coding)
151
- ... ac3: ATSC A/52A (AC-3)
152
- ... ac3_fixed: ATSC A/52A (AC-3)
153
- ... alac: ALAC (Apple Lossless Audio Codec)
154
- """
155
- return ffmpeg_ext.get_audio_encoders()
156
-
157
-
158
- @dropping_support
159
- def get_video_decoders() -> Dict[str, str]:
160
- """Get the available video decoders.
161
-
162
- Returns:
163
- Dict[str, str]: Mapping from decoder short name to long name.
164
-
165
- Example
166
- >>> for k, v in get_video_decoders().items():
167
- >>> print(f"{k}: {v}")
168
- ... aasc: Autodesk RLE
169
- ... aic: Apple Intermediate Codec
170
- ... alias_pix: Alias/Wavefront PIX image
171
- ... agm: Amuse Graphics Movie
172
- ... amv: AMV Video
173
- ... anm: Deluxe Paint Animation
174
- """
175
- return ffmpeg_ext.get_video_decoders()
176
-
177
-
178
- @dropping_support
179
- def get_video_encoders() -> Dict[str, str]:
180
- """Get the available video encoders.
181
-
182
- Returns:
183
- Dict[str, str]: Mapping from encoder short name to long name.
184
-
185
- Example
186
- >>> for k, v in get_audio_encoders().items():
187
- >>> print(f"{k}: {v}")
188
- ... a64multi: Multicolor charset for Commodore 64
189
- ... a64multi5: Multicolor charset for Commodore 64, extended with 5th color (colram)
190
- ... alias_pix: Alias/Wavefront PIX image
191
- ... amv: AMV Video
192
- ... apng: APNG (Animated Portable Network Graphics) image
193
- ... asv1: ASUS V1
194
- ... asv2: ASUS V2
195
- """
196
- return ffmpeg_ext.get_video_encoders()
197
-
198
-
199
- @dropping_support
200
- def get_input_devices() -> Dict[str, str]:
201
- """Get the available input devices.
202
-
203
- Returns:
204
- Dict[str, str]: Mapping from device short name to long name.
205
-
206
- Example
207
- >>> for k, v in get_input_devices().items():
208
- >>> print(f"{k}: {v}")
209
- ... avfoundation: AVFoundation input device
210
- ... lavfi: Libavfilter virtual input device
211
- """
212
- return ffmpeg_ext.get_input_devices()
213
-
214
-
215
- @dropping_support
216
- def get_output_devices() -> Dict[str, str]:
217
- """Get the available output devices.
218
-
219
- Returns:
220
- Dict[str, str]: Mapping from device short name to long name.
221
-
222
- Example
223
- >>> for k, v in get_output_devices().items():
224
- >>> print(f"{k}: {v}")
225
- ... audiotoolbox: AudioToolbox output device
226
- """
227
- return ffmpeg_ext.get_output_devices()
228
-
229
-
230
- @dropping_support
231
- def get_input_protocols() -> List[str]:
232
- """Get the supported input protocols.
233
-
234
- Returns:
235
- List[str]: The names of supported input protocols
236
-
237
- Example
238
- >>> print(get_input_protocols())
239
- ... ['file', 'ftp', 'hls', 'http','https', 'pipe', 'rtmp', 'tcp', 'tls', 'udp', 'unix']
240
- """
241
- return ffmpeg_ext.get_input_protocols()
242
-
243
-
244
- @dropping_support
245
- def get_output_protocols() -> List[str]:
246
- """Get the supported output protocols.
247
-
248
- Returns:
249
- list of str: The names of supported output protocols
250
-
251
- Example
252
- >>> print(get_output_protocols())
253
- ... ['file', 'ftp', 'http', 'https', 'md5', 'pipe', 'prompeg', 'rtmp', 'tee', 'tcp', 'tls', 'udp', 'unix']
254
- """
255
- return ffmpeg_ext.get_output_protocols()
256
-
257
-
258
- @dropping_support
259
- def get_build_config() -> str:
260
- """Get the FFmpeg build configuration
261
-
262
- Returns:
263
- str: Build configuration string.
264
-
265
- Example
266
- >>> print(get_build_config())
267
- --prefix=/Users/runner/miniforge3 --cc=arm64-apple-darwin20.0.0-clang --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-neon --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-libvpx --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame --pkg-config=/Users/runner/miniforge3/conda-bld/ffmpeg_1646229390493/_build_env/bin/pkg-config --enable-cross-compile --arch=arm64 --target-os=darwin --cross-prefix=arm64-apple-darwin20.0.0- --host-cc=/Users/runner/miniforge3/conda-bld/ffmpeg_1646229390493/_build_env/bin/x86_64-apple-darwin13.4.0-clang # noqa
268
- """
269
- return ffmpeg_ext.get_build_config()
270
-
271
-
272
- @dropping_support
273
- def clear_cuda_context_cache():
274
- """Clear the CUDA context used by CUDA Hardware accelerated video decoding"""
275
- ffmpeg_ext.clear_cuda_context_cache()