code: def cal_eer_from_textfiles(gt_file, pred_file):
      gt_data = np.genfromtxt(gt_file, dtype=str)
      gt_scores = gt_data[:, 1].astype(np.float)
      pred_data = np.genfromtxt(pred_file, dtype=str)
      pred_scores = pred_data[:, 1].astype(np.float)
      # pred_scores = 1/(1 + np.exp(-pred_scores))
      assert len(pred_scores) == len(gt_scores)
      fpr, tpr, _ = roc_curve(gt_scores, pred_scores, pos_label=1)
      cm_eer = brentq(
          lambda x: 1.0 - x - interp1d(fpr, tpr)(x), 0.0, 1.0
      )
      return cm_eer
  
file_path: espnet/egs2/acesinger/svs1/pyscripts/utils/asvspoof_score.py
imports: import argparse
  import os
  import warnings
  import numpy
  from scipy.interpolate import interp1d
  from scipy.optimize import brentq
  from sklearn.metrics import roc_curve
label_desc: Use image node_id 1 for calling a global function with example usage: cal_eer_from_textfiles(gt_file, pred_file) and returns: cm_eer