class_docstr: read the kaldi ark format file
class_docstr_tok: ["read","the","kaldi","ark","format","file"]
docstr: splice the feature
  args:
      feat_array: the input feature
      left_context: int type and must >= 0
      right_context: int type and must >= 0
  return:
      -1, array: failed
      0, array: success
docstr_tok: ["splice","the","feature","args",":","feat_array",":","the","input","feature","left_context",":","int","type","and","must",">","=","0","right_context",":","int","type","and","must",">","=","0","return",":","-1",",","array",":","failed","0",",","array",":","success"]
code: def splice_frames(self, feat_array, left_context, right_context):
      """
      splice the feature
      args:
          feat_array: the input feature
          left_context: int type and must >= 0
          right_context: int type and must >= 0
      return:
          -1, array: failed
          0, array: success
      """
      if left_context < 0 or right_context < 0:
          return -1, np.array([])
  
      feat_row, feat_dim = feat_array.shape
      length_for_per_feat = 1 + left_context + right_context
      # aim_feat_dim = feat_dim * length_for_per_feat
      output_list = []
      for row_number in range(feat_row):
          read_row_number_begin = row_number - left_context
          read_row_number_end = row_number + right_context
          if (
              read_row_number_begin < 0
              or read_row_number_end >= feat_row
          ):
              tmp_output_list = []
              for tmp_row_number in range(length_for_per_feat):
                  read_row_number = (
                      row_number + tmp_row_number - left_context
                  )
                  if read_row_number < 0:
                      read_row_number = 0
  
                  if read_row_number >= feat_row:
                      read_row_number = feat_row - 1
  
                  tmp_output_list.append(feat_array[read_row_number])
              tmp_output_array = np.hstack(tmp_output_list)
              output_list.append(tmp_output_array)
          else:
              output_list.append(
                  feat_array[
                      read_row_number_begin : read_row_number_end + 1
                  ].flatten()
              )
      output_array = np.vstack(output_list)
      return 0, output_array
  
file_path: delta/delta/data/utils/htk_reader_lib.py
imports: import os
  import math
  import numpy
label_desc: Use image node_id 7 for calling the HtkReaderIO obj's underlying member method code with example usage: obj.splice_frames(feat_array, left_context, right_context) and returns: int,  output_array, unknown,  np