docstr: Tensor of various dtypes can be saved as wav format.
docstr_tok: ["Tensor","of","various","dtypes","can","be","saved","as","wav","format","."]
code: def test_valid_audio_muxer_and_codecs_wav(
      self, src_fmt, sample_rate, num_channels
  ):
      """Tensor of various dtypes can be saved as wav format."""
      path = self.get_dst("test.wav")
      s = StreamWriter(path, format="wav")
      s.set_metadata(
          metadata={"artist": "torchaudio", "title": self.id()}
      )
      s.add_audio_stream(sample_rate, num_channels, format=src_fmt)
  
      chunk = get_audio_chunk(src_fmt, sample_rate, num_channels)
      with s.open():
          s.write_audio_chunk(0, chunk)
  
imports: import io
  import math
  import torch
  import torchaudio
  from parameterized import parameterized, parameterized_class
  from torchaudio.io import CodecConfig, StreamReader, StreamWriter
  from torchaudio_unittest.common_utils import get_asset_path, get_sinusoid, nested_params, rgb_to_yuv_ccir, skipIfNoFFmpeg, skipIfNoModule, TempDirMixin, TorchaudioTestCase
  from .common import lt42
label_desc: Use image node_id 6 for calling the StreamWriterInterfaceTest obj's underlying member method code with example usage: obj.test_valid_audio_muxer_and_codecs_wav(src_fmt, sample_rate, num_channels) without return types