parameters: (matrix: np.ndarray)
docstring: Get scale factor for quantization using utterance matrix
docstring_summary: Get scale factor for quantization using utterance matrix
docstring_tokens: Get scale factor for quantization using utterance matrix
function: def get_scale_factor(matrix: np.ndarray) -> float:
      """Get scale factor for quantization using utterance matrix"""
      # Max to find scale factor
      target_max = 16384
      max_val = np.max(matrix)
      if max_val == 0:
          return 1.0
      else:
          return target_max / max_val
function_tokens: def get_scale_factor ( matrix : np . ndarray ) -> float : # Max to find scale factor target_max = 16384 max_val = np . max ( matrix ) if max_val == 0 : return 1.0 else : return target_max / max_val