Commit 70350a69 authored by hwangjeff's avatar hwangjeff Committed by Facebook GitHub Bot
Browse files

Amend StreamReader docs to reflect deprecation of tensor decoding (#3272)

Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/3272

Reviewed By: mthrok

Differential Revision: D45095440

Pulled By: hwangjeff

fbshipit-source-id: 135eb0f5d9047bf172563a9a05a9d2e323796d4d
parent 94f5027e
......@@ -507,7 +507,7 @@ class StreamReader:
def __init__(
self,
src: Union[str, BinaryIO, torch.Tensor],
src: Union[str, BinaryIO],
format: Optional[str] = None,
option: Optional[Dict[str, str]] = None,
buffer_size: int = 4096,
......@@ -517,7 +517,7 @@ class StreamReader:
elif hasattr(src, "read"):
self._be = torchaudio.lib._torchaudio_ffmpeg.StreamReaderFileObj(src, format, option, buffer_size)
else:
raise ValueError("`src` must be either string, Tensor or file-like object.")
raise ValueError("`src` must be either a string or file-like object.")
i = self._be.find_best_audio_stream()
self._default_audio_stream = None if i < 0 else i
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment