class_docstr: HDF5Writer
  
  Examples:
      >>> with HDF5Writer('ark:out.h5', compress=True) as f:
      ...     f['key'] = array
code: def __init__(self, wspecifier, write_num_frames=None, compress=False):
      spec_dict = parse_wspecifier(wspecifier)
      self.filename = spec_dict["ark"]
  
      if compress:
          self.kwargs = {"compression": "gzip"}
      else:
          self.kwargs = {}
      self.writer = h5py.File(spec_dict["ark"], "w")
      if "scp" in spec_dict:
          self.writer_scp = open(
              spec_dict["scp"], "w", encoding="utf-8"
          )
      else:
          self.writer_scp = None
      if write_num_frames is not None:
          self.writer_nframe = get_num_frames_writer(write_num_frames)
      else:
          self.writer_nframe = None
  
imports: from pathlib import Path
  from typing import Dict
  import h5py
  import kaldiio
  import numpy
  import soundfile
  from espnet.utils.cli_utils import assert_scipy_wav_style
  from espnet.utils.io_utils import SoundHDF5File
label_desc: Use image node_id 1 to create a new HDF5Writer object from inherited base classes: BaseWriter with example: obj = HDF5Writer(wspecifier, write_num_frames, compress)