jerpint commited on
Commit
35db34b
·
1 Parent(s): cb166a4

update column name

Browse files
Files changed (2) hide show
  1. create_valid_csv.py +11 -7
  2. metadata-valid.csv +2 -2
create_valid_csv.py CHANGED
@@ -74,9 +74,9 @@ if __name__ == "__main__":
74
  valid_df_source["source"] = source
75
  all_dfs.append(valid_df_source)
76
 
77
- # Add is_cloned_voice column
78
  is_cloned_voice = source != "commonvoice"
79
- valid_df_source["is_cloned_voice"] = is_cloned_voice
80
 
81
  # Add fname column
82
  valid_df_source["filename"] = valid_df_source["path"]
@@ -92,8 +92,8 @@ if __name__ == "__main__":
92
  print()
93
 
94
  print("Statistics:")
95
- print("Number of original voices: ", len(all_df[all_df.is_cloned_voice == False]))
96
- print("Number of cloned voices: ", len(all_df[all_df.is_cloned_voice == True]))
97
  print("Number of TOTAL voices: ", len(all_df))
98
  print()
99
 
@@ -105,6 +105,10 @@ if __name__ == "__main__":
105
  print(all_df.gender.value_counts())
106
  print()
107
 
108
- print("Gender distribution (not cloned):")
109
- print(all_df[all_df.is_cloned_voice == False].gender.value_counts())
110
- print()
 
 
 
 
 
74
  valid_df_source["source"] = source
75
  all_dfs.append(valid_df_source)
76
 
77
+ # Add cloned_or_real column
78
  is_cloned_voice = source != "commonvoice"
79
+ valid_df_source["cloned_or_human"] = "cloned" if is_cloned_voice else "human"
80
 
81
  # Add fname column
82
  valid_df_source["filename"] = valid_df_source["path"]
 
92
  print()
93
 
94
  print("Statistics:")
95
+ print("Number of human voices: ", len(all_df[all_df.cloned_or_human == "human"]))
96
+ print("Number of cloned voices: ", len(all_df[all_df.cloned_or_human == "cloned"]))
97
  print("Number of TOTAL voices: ", len(all_df))
98
  print()
99
 
 
105
  print(all_df.gender.value_counts())
106
  print()
107
 
108
+ print("Gender distribution (human):")
109
+ print(all_df[all_df.cloned_or_human == "human"].gender.value_counts())
110
+ print()
111
+
112
+ print("Gender distribution (cloned):")
113
+ print(all_df[all_df.cloned_or_human == "cloned"].gender.value_counts())
114
+ print()
metadata-valid.csv CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2d078991bedfe4aecaca197f17f857bd395c80a3cfc39dab4a7330fa42834059
3
- size 849080
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e02789c50fa8265b537e4ab06d73d4fa2b833957dd1c5b2675ec836cd648e174
3
+ size 856672