Commit 19e1a84d authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Add logging to StreamReader/Writer (#2878)

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

Reviewed By: carolineechen

Differential Revision: D41587081

Pulled By: mthrok

fbshipit-source-id: da7f3647083a3566ce94070ce2bd30bf99e1db76
parent 1a003c3f
......@@ -355,6 +355,7 @@ class StreamReader:
option: Optional[Dict[str, str]] = None,
buffer_size: int = 4096,
):
torch._C._log_api_usage_once("torchaudio.io.StreamReader")
if isinstance(src, str):
self._be = torch.classes.torchaudio.ffmpeg_StreamReader(src, format, option)
elif isinstance(src, torch.Tensor):
......
......@@ -104,6 +104,7 @@ class StreamWriter:
format: Optional[str] = None,
buffer_size: int = 4096,
):
torch._C._log_api_usage_once("torchaudio.io.StreamWriter")
if isinstance(dst, str):
self._s = torch.classes.torchaudio.ffmpeg_StreamWriter(dst, format)
elif hasattr(dst, "write"):
......
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