code: def read_sinhala_data(audio_csv, sentences_csv, export_csv):
      sent_df = pd.read_csv(sentences_csv)
      data = pd.read_csv(audio_csv)
      output_df = []
  
      if not os.path.exists("wavs"):
          os.mkdir("wavs")
  
      for i in range(len(sent_df)):
          intent, intent_details, inflection, transcript = (
              sent_df.iloc[i]["intent"],
              sent_df.iloc[i]["intent_details"],
              sent_df.iloc[i]["inflection"],
              sent_df.iloc[i]["sentence"],
          )
  
          for j in range(len(data)):
              wav_name, intent_, inflection_ = (
                  data.iloc[j]["audio_file"],
                  data.iloc[j]["intent"],
                  data.iloc[j]["inflection"],
              )
              if intent_ == intent and inflection_ == inflection:
                  # clean transcript
                  # export audio of for the crop with wav_path_start_duration
                  export_path = os.path.join("wavs", wav_name)
                  # Append to output_df
                  output_df.append(
                      [
                          export_path,
                          "unknown",
                          transcript,
                          intent_details.replace(" ", ""),
                      ]
                  )
  
      X = pd.DataFrame(
          output_df,
          columns=["path", "speakerId", "transcription", "task_type"],
      )
      Y = X.pop("task_type").to_frame()
      X_train, X_test, y_train, y_test = train_test_split(
          X, Y, stratify=Y, test_size=0.20, random_state=42
      )
      X_test, X_val, y_test, y_val = train_test_split(
          X_test,
          y_test,
          stratify=y_test,
          test_size=0.50,
          random_state=42,
      )
      pd.concat([X_train, y_train], axis=1).to_csv("train.csv")
      pd.concat([X_test, y_test], axis=1).to_csv("test.csv")
      pd.concat([X_val, y_val], axis=1).to_csv("validation.csv")
  
file_path: espnet/egs2/sinhala/asr1/local/data_prep.py
imports: import os
  import re
  import sys
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: read_sinhala_data(audio_csv, sentences_csv, export_csv) without return types