class_docstr: ViSQOL wrapper to run ViSQOL from Python using a pre-installed binary.
  
  To learn more about ViSQOL and how to build ViSQOL binary using bazel, please refer to the
  instructions available in the open source repository: https://github.com/google/visqol
  
  ViSQOL is capable of running in two modes:
  
  Audio Mode:
      When running in audio mode, input signals must have a 48kHz sample rate. Input should be resampled to 48kHz.
      Input signals can be multi-channel, but they will be down-mixed to mono for performing the comparison.
      Audio mode uses support vector regression, with the maximum range at ~4.75.
  
  Speech Mode:
      When running in speech mode, ViSQOL uses a wideband model. It therefore expects input sample rates of 16kHz.
          Input should be resampled to 16kHz.
      As part of the speech mode processing, a root mean square implementation for voice activity detection
          is performed on the reference signal to determine what parts of the signal have voice activity and
          should therefore be included in the comparison. The signal is normalized before performing the voice
          activity detection.
      Input signals can be multi-channel, but they will be down-mixed to mono for performing the comparison.
      Speech mode is scaled to have a maximum MOS of 5.0 to match previous version behavior.
  
  For more details, check the guidelines: https://github.com/google/visqol#general-guidelines-for-input
  
  Args:
      visqol_bin (str): Path to the ViSQOL binary.
      mode (str): ViSQOL computation mode, expecting "audio" or "speech".
      model (str): Name of the model to use for similarity to quality model.
      debug (bool): Whether to also get debug metrics from ViSQOL or not.
class_docstr_tok: ["ViSQOL","wrapper","to","run","ViSQOL","from","Python","using","a","pre-installed","binary",".","To","learn","more","about","ViSQOL","and","how","to","build","ViSQOL","binary","using","bazel",",","please","refer","to","the","instructions","available","in","the","open","source","repository",":","https",":","\/\/github.com\/google\/visqol","ViSQOL","is","capable","of","running","in","two","modes",":","Audio","Mode",":","When","running","in","audio","mode",",","input","signals","must","have","a","48kHz","sample","rate",".","Input","should","be","resampled","to","48kHz",".","Input","signals","can","be","multi-channel",",","but","they","will","be","down-mixed","to","mono","for","performing","the","comparison",".","Audio","mode","uses","support","vector","regression",",","with","the","maximum","range","at","~4.75",".","Speech","Mode",":","When","running","in","speech","mode",",","ViSQOL","uses","a","wideband","model",".","It","therefore","expects","input","sample","rates","of","16kHz",".","Input","should","be","resampled","to","16kHz",".","As","part","of","the","speech","mode","processing",",","a","root","mean","square","implementation","for","voice","activity","detection","is","performed","on","the","reference","signal","to","determine","what","parts","of","the","signal","have","voice","activity","and","should","therefore","be","included","in","the","comparison",".","The","signal","is","normalized","before","performing","the","voice","activity","detection",".","Input","signals","can","be","multi-channel",",","but","they","will","be","down-mixed","to","mono","for","performing","the","comparison",".","Speech","mode","is","scaled","to","have","a","maximum","MOS","of","5.0","to","match","previous","version","behavior",".","For","more","details",",","check","the","guidelines",":","https",":","\/\/github.com\/google\/visqol","#","general-guidelines-for-input","Args",":","visqol_bin","(","str",")",":","Path","to","the","ViSQOL","binary",".","mode","(","str",")",":","ViSQOL","computation","mode",",","expecting","``","audio","''","or","``","speech","''",".","model","(","str",")",":","Name","of","the","model","to","use","for","similarity","to","quality","model",".","debug","(","bool",")",":","Whether","to","also","get","debug","metrics","from","ViSQOL","or","not","."]
code: def _collect_debug_data(
      self, debug_json_path: tp.Union[Path, str]
  ) -> dict:
      # collect debug data for the visqol inference.
      with open(debug_json_path, "r") as f:
          data = json.load(f)
          return data
  
file_path: audiocraft/audiocraft/metrics/visqol.py
imports: import csv
  import json
  import logging
  from pathlib import Path
  import tempfile
  import typing
  import subprocess
  import shutil
  import torch
  import torchaudio
label_desc: Use image node_id 6 for calling the ViSQOL obj's underlying member method code with example usage: obj._collect_debug_data(debug_json_path) and returns: data