torchaudio 2.7.1__cp311-cp311-win_amd64.whl → 2.9.0__cp311-cp311-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 +184 -33
  2. torchaudio/_extension/__init__.py +1 -14
  3. torchaudio/_extension/utils.py +0 -47
  4. torchaudio/_internal/module_utils.py +68 -10
  5. torchaudio/_torchcodec.py +340 -0
  6. torchaudio/datasets/cmuarctic.py +1 -1
  7. torchaudio/datasets/utils.py +1 -1
  8. torchaudio/functional/__init__.py +6 -3
  9. torchaudio/functional/_alignment.py +1 -1
  10. torchaudio/functional/filtering.py +70 -55
  11. torchaudio/functional/functional.py +31 -61
  12. torchaudio/lib/_torchaudio.pyd +0 -0
  13. torchaudio/lib/libtorchaudio.pyd +0 -0
  14. torchaudio/models/decoder/__init__.py +19 -1
  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 +3 -1
  21. torchaudio/pipelines/rnnt_pipeline.py +4 -4
  22. torchaudio/transforms/__init__.py +4 -1
  23. torchaudio/transforms/_transforms.py +4 -3
  24. torchaudio/utils/__init__.py +2 -9
  25. torchaudio/utils/download.py +1 -1
  26. torchaudio/version.py +2 -2
  27. {torchaudio-2.7.1.dist-info → torchaudio-2.9.0.dist-info}/METADATA +15 -7
  28. torchaudio-2.9.0.dist-info/RECORD +85 -0
  29. {torchaudio-2.7.1.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 -317
  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 -13
  46. torchaudio/io/_effector.py +0 -347
  47. torchaudio/io/_playback.py +0 -72
  48. torchaudio/kaldi_io.py +0 -144
  49. torchaudio/prototype/__init__.py +0 -0
  50. torchaudio/prototype/datasets/__init__.py +0 -4
  51. torchaudio/prototype/datasets/musan.py +0 -67
  52. torchaudio/prototype/functional/__init__.py +0 -26
  53. torchaudio/prototype/functional/_dsp.py +0 -433
  54. torchaudio/prototype/functional/_rir.py +0 -379
  55. torchaudio/prototype/functional/functional.py +0 -190
  56. torchaudio/prototype/models/__init__.py +0 -36
  57. torchaudio/prototype/models/_conformer_wav2vec2.py +0 -794
  58. torchaudio/prototype/models/_emformer_hubert.py +0 -333
  59. torchaudio/prototype/models/conv_emformer.py +0 -525
  60. torchaudio/prototype/models/hifi_gan.py +0 -336
  61. torchaudio/prototype/models/rnnt.py +0 -711
  62. torchaudio/prototype/models/rnnt_decoder.py +0 -399
  63. torchaudio/prototype/pipelines/__init__.py +0 -12
  64. torchaudio/prototype/pipelines/_vggish/__init__.py +0 -3
  65. torchaudio/prototype/pipelines/_vggish/_vggish_impl.py +0 -233
  66. torchaudio/prototype/pipelines/_vggish/_vggish_pipeline.py +0 -82
  67. torchaudio/prototype/pipelines/hifigan_pipeline.py +0 -228
  68. torchaudio/prototype/pipelines/rnnt_pipeline.py +0 -58
  69. torchaudio/prototype/transforms/__init__.py +0 -9
  70. torchaudio/prototype/transforms/_transforms.py +0 -456
  71. torchaudio/sox_effects/__init__.py +0 -10
  72. torchaudio/sox_effects/sox_effects.py +0 -272
  73. torchaudio/utils/ffmpeg_utils.py +0 -11
  74. torchaudio/utils/sox_utils.py +0 -99
  75. torchaudio-2.7.1.dist-info/RECORD +0 -144
  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 -978
  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 -247
  91. {torchaudio-2.7.1.dist-info → torchaudio-2.9.0.dist-info}/WHEEL +0 -0
  92. {torchaudio-2.7.1.dist-info → torchaudio-2.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,247 +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
- from typing import Dict, List, Tuple
6
-
7
- import torio
8
-
9
- ffmpeg_ext = torio._extension.lazy_import_ffmpeg_ext()
10
-
11
-
12
- def get_versions() -> Dict[str, Tuple[int]]:
13
- """Get the versions of FFmpeg libraries
14
-
15
- Returns:
16
- dict: mapping from library names to version string,
17
- i.e. `"libavutil": (56, 22, 100)`.
18
- """
19
- return ffmpeg_ext.get_versions()
20
-
21
-
22
- def get_log_level() -> int:
23
- """Get the log level of FFmpeg.
24
-
25
- See :py:func:`set_log_level` for the detail.
26
- """
27
- return ffmpeg_ext.get_log_level()
28
-
29
-
30
- def set_log_level(level: int):
31
- """Set the log level of FFmpeg (libavformat etc)
32
-
33
- Arguments:
34
- level (int): Log level. The larger, the more verbose.
35
-
36
- The following values are common values, the corresponding ``ffmpeg``'s
37
- ``-loglevel`` option value and desription.
38
-
39
- * ``-8`` (``quiet``):
40
- Print no output.
41
- * ``0`` (``panic``):
42
- Something went really wrong and we will crash now.
43
- * ``8`` (``fatal``):
44
- Something went wrong and recovery is not possible.
45
- For example, no header was found for a format which depends
46
- on headers or an illegal combination of parameters is used.
47
- * ``16`` (``error``):
48
- Something went wrong and cannot losslessly be recovered.
49
- However, not all future data is affected.
50
- * ``24`` (``warning``):
51
- Something somehow does not look correct.
52
- This may or may not lead to problems.
53
- * ``32`` (``info``):
54
- Standard information.
55
- * ``40`` (``verbose``):
56
- Detailed information.
57
- * ``48`` (``debug``):
58
- Stuff which is only useful for libav* developers.
59
- * ``56`` (``trace``):
60
- Extremely verbose debugging, useful for libav* development.
61
-
62
- """
63
- ffmpeg_ext.set_log_level(level)
64
-
65
-
66
- def get_demuxers() -> Dict[str, str]:
67
- """Get the available demuxers.
68
-
69
- Returns:
70
- Dict[str, str]: Mapping from demuxer (format) short name to long name.
71
-
72
- Example
73
- >>> for k, v in get_demuxers().items():
74
- >>> print(f"{k}: {v}")
75
- ... aa: Audible AA format files
76
- ... aac: raw ADTS AAC (Advanced Audio Coding)
77
- ... aax: CRI AAX
78
- ... ac3: raw AC-3
79
- """
80
- return ffmpeg_ext.get_demuxers()
81
-
82
-
83
- def get_muxers() -> Dict[str, str]:
84
- """Get the available muxers.
85
-
86
- Returns:
87
- Dict[str, str]: Mapping from muxer (format) short name to long name.
88
-
89
- Example
90
- >>> for k, v in get_muxers().items():
91
- >>> print(f"{k}: {v}")
92
- ... a64: a64 - video for Commodore 64
93
- ... ac3: raw AC-3
94
- ... adts: ADTS AAC (Advanced Audio Coding)
95
- ... adx: CRI ADX
96
- ... aiff: Audio IFF
97
- """
98
- return ffmpeg_ext.get_muxers()
99
-
100
-
101
- def get_audio_decoders() -> Dict[str, str]:
102
- """Get the available audio decoders.
103
-
104
- Returns:
105
- Dict[str, str]: Mapping from decoder short name to long name.
106
-
107
- Example
108
- >>> for k, v in get_audio_decoders().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_audio_decoders()
117
-
118
-
119
- def get_audio_encoders() -> Dict[str, str]:
120
- """Get the available audio encoders.
121
-
122
- Returns:
123
- Dict[str, str]: Mapping from encoder short name to long name.
124
-
125
- Example
126
- >>> for k, v in get_audio_encoders().items():
127
- >>> print(f"{k}: {v}")
128
- ... comfortnoise: RFC 3389 comfort noise generator
129
- ... s302m: SMPTE 302M
130
- ... aac: AAC (Advanced Audio Coding)
131
- ... ac3: ATSC A/52A (AC-3)
132
- ... ac3_fixed: ATSC A/52A (AC-3)
133
- ... alac: ALAC (Apple Lossless Audio Codec)
134
- """
135
- return ffmpeg_ext.get_audio_encoders()
136
-
137
-
138
- def get_video_decoders() -> Dict[str, str]:
139
- """Get the available video decoders.
140
-
141
- Returns:
142
- Dict[str, str]: Mapping from decoder short name to long name.
143
-
144
- Example
145
- >>> for k, v in get_video_decoders().items():
146
- >>> print(f"{k}: {v}")
147
- ... aasc: Autodesk RLE
148
- ... aic: Apple Intermediate Codec
149
- ... alias_pix: Alias/Wavefront PIX image
150
- ... agm: Amuse Graphics Movie
151
- ... amv: AMV Video
152
- ... anm: Deluxe Paint Animation
153
- """
154
- return ffmpeg_ext.get_video_decoders()
155
-
156
-
157
- def get_video_encoders() -> Dict[str, str]:
158
- """Get the available video encoders.
159
-
160
- Returns:
161
- Dict[str, str]: Mapping from encoder short name to long name.
162
-
163
- Example
164
- >>> for k, v in get_audio_encoders().items():
165
- >>> print(f"{k}: {v}")
166
- ... a64multi: Multicolor charset for Commodore 64
167
- ... a64multi5: Multicolor charset for Commodore 64, extended with 5th color (colram)
168
- ... alias_pix: Alias/Wavefront PIX image
169
- ... amv: AMV Video
170
- ... apng: APNG (Animated Portable Network Graphics) image
171
- ... asv1: ASUS V1
172
- ... asv2: ASUS V2
173
- """
174
- return ffmpeg_ext.get_video_encoders()
175
-
176
-
177
- def get_input_devices() -> Dict[str, str]:
178
- """Get the available input devices.
179
-
180
- Returns:
181
- Dict[str, str]: Mapping from device short name to long name.
182
-
183
- Example
184
- >>> for k, v in get_input_devices().items():
185
- >>> print(f"{k}: {v}")
186
- ... avfoundation: AVFoundation input device
187
- ... lavfi: Libavfilter virtual input device
188
- """
189
- return ffmpeg_ext.get_input_devices()
190
-
191
-
192
- def get_output_devices() -> Dict[str, str]:
193
- """Get the available output devices.
194
-
195
- Returns:
196
- Dict[str, str]: Mapping from device short name to long name.
197
-
198
- Example
199
- >>> for k, v in get_output_devices().items():
200
- >>> print(f"{k}: {v}")
201
- ... audiotoolbox: AudioToolbox output device
202
- """
203
- return ffmpeg_ext.get_output_devices()
204
-
205
-
206
- def get_input_protocols() -> List[str]:
207
- """Get the supported input protocols.
208
-
209
- Returns:
210
- List[str]: The names of supported input protocols
211
-
212
- Example
213
- >>> print(get_input_protocols())
214
- ... ['file', 'ftp', 'hls', 'http','https', 'pipe', 'rtmp', 'tcp', 'tls', 'udp', 'unix']
215
- """
216
- return ffmpeg_ext.get_input_protocols()
217
-
218
-
219
- def get_output_protocols() -> List[str]:
220
- """Get the supported output protocols.
221
-
222
- Returns:
223
- list of str: The names of supported output protocols
224
-
225
- Example
226
- >>> print(get_output_protocols())
227
- ... ['file', 'ftp', 'http', 'https', 'md5', 'pipe', 'prompeg', 'rtmp', 'tee', 'tcp', 'tls', 'udp', 'unix']
228
- """
229
- return ffmpeg_ext.get_output_protocols()
230
-
231
-
232
- def get_build_config() -> str:
233
- """Get the FFmpeg build configuration
234
-
235
- Returns:
236
- str: Build configuration string.
237
-
238
- Example
239
- >>> print(get_build_config())
240
- --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
241
- """
242
- return ffmpeg_ext.get_build_config()
243
-
244
-
245
- def clear_cuda_context_cache():
246
- """Clear the CUDA context used by CUDA Hardware accelerated video decoding"""
247
- ffmpeg_ext.clear_cuda_context_cache()