Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
71214b48
Unverified
Commit
71214b48
authored
Dec 27, 2020
by
Aziz
Committed by
GitHub
Dec 27, 2020
Browse files
Add `format` arg in new soundfile backend (#1129)
parent
aa56d30c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
torchaudio/backend/_soundfile_backend.py
torchaudio/backend/_soundfile_backend.py
+3
-1
No files found.
torchaudio/backend/_soundfile_backend.py
View file @
71214b48
...
...
@@ -12,7 +12,7 @@ if _mod_utils.is_module_available("soundfile"):
@
_mod_utils
.
requires_module
(
"soundfile"
)
def
info
(
filepath
:
str
)
->
AudioMetaData
:
def
info
(
filepath
:
str
,
format
:
Optional
[
str
]
=
None
)
->
AudioMetaData
:
"""Get signal information of an audio file.
Args:
...
...
@@ -20,6 +20,8 @@ def info(filepath: str) -> AudioMetaData:
This functionalso handles ``pathlib.Path`` objects, but is annotated as ``str``
for the consistency with "sox_io" backend, which has a restriction on type annotation
for TorchScript compiler compatiblity.
format (str, optional):
Not used. PySoundFile does not accept format hint.
Returns:
AudioMetaData: meta data of the given audio.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment