stats update
Browse files- data/stats.json +1 -1
- test.png +0 -0
- test.py +21 -12
data/stats.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"mean_pitch": 166.
|
|
|
|
| 1 |
+
{"mean_pitch": [166.35569763183594, 50.2285041809082], "std_pitch": [28.150461196899414, 12.998950004577637], "mean_energy": [0.1212499812245369, 0.033803604543209076], "std_energy": [0.0933549553155899, 0.024853786453604698], "mean_duration": [1.417181324063708, 0.3717550478609409], "std_duration": [0.9026830676267007, 0.09262743799230512], "mean_dvec": [-0.003188301809132099, 0.0046525378711521626], "std_dvec": [0.05742684751749039, 0.0044458359479904175]}
|
test.png
CHANGED
|
|
test.py
CHANGED
|
@@ -44,12 +44,15 @@ mean_energys = []
|
|
| 44 |
std_energys = []
|
| 45 |
mean_durations = []
|
| 46 |
std_durations = []
|
|
|
|
|
|
|
| 47 |
|
| 48 |
for item in tqdm(dataloader):
|
| 49 |
result = vocex.model(item["mel"], inference=True)
|
| 50 |
pitch = result["measures"]["pitch"]
|
| 51 |
energy = result["measures"]["energy"]
|
| 52 |
va = result["measures"]["voice_activity_binary"]
|
|
|
|
| 53 |
mean_pitch = pitch.mean()
|
| 54 |
std_pitch = pitch.std()
|
| 55 |
mean_energy = energy.mean()
|
|
@@ -64,22 +67,28 @@ for item in tqdm(dataloader):
|
|
| 64 |
std_energys.append(std_energy)
|
| 65 |
mean_durations.append(mean_duration)
|
| 66 |
std_durations.append(std_duration)
|
|
|
|
|
|
|
| 67 |
|
| 68 |
-
mean_pitch = np.mean(mean_pitchs)
|
| 69 |
-
std_pitch = np.mean(std_pitchs)
|
| 70 |
-
mean_energy = np.mean(mean_energys)
|
| 71 |
-
std_energy = np.mean(std_energys)
|
| 72 |
-
mean_duration = np.mean(mean_durations)
|
| 73 |
-
std_duration = np.mean(std_durations)
|
|
|
|
|
|
|
| 74 |
|
| 75 |
# save the stats
|
| 76 |
stats = {
|
| 77 |
-
"mean_pitch":
|
| 78 |
-
"std_pitch":
|
| 79 |
-
"mean_energy":
|
| 80 |
-
"std_energy":
|
| 81 |
-
"mean_duration":
|
| 82 |
-
"std_duration":
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
with open("data/stats.json", "w") as f:
|
|
|
|
| 44 |
std_energys = []
|
| 45 |
mean_durations = []
|
| 46 |
std_durations = []
|
| 47 |
+
mean_dvecs = []
|
| 48 |
+
std_dvecs = []
|
| 49 |
|
| 50 |
for item in tqdm(dataloader):
|
| 51 |
result = vocex.model(item["mel"], inference=True)
|
| 52 |
pitch = result["measures"]["pitch"]
|
| 53 |
energy = result["measures"]["energy"]
|
| 54 |
va = result["measures"]["voice_activity_binary"]
|
| 55 |
+
dvec = result["dvector"]
|
| 56 |
mean_pitch = pitch.mean()
|
| 57 |
std_pitch = pitch.std()
|
| 58 |
mean_energy = energy.mean()
|
|
|
|
| 67 |
std_energys.append(std_energy)
|
| 68 |
mean_durations.append(mean_duration)
|
| 69 |
std_durations.append(std_duration)
|
| 70 |
+
mean_dvecs.append(dvec.mean())
|
| 71 |
+
std_dvecs.append(dvec.std())
|
| 72 |
|
| 73 |
+
mean_pitch = [float(np.mean(mean_pitchs)), float(np.std(mean_pitchs))]
|
| 74 |
+
std_pitch = [float(np.mean(std_pitchs)), float(np.std(std_pitchs))]
|
| 75 |
+
mean_energy = [float(np.mean(mean_energys)), float(np.std(mean_energys))]
|
| 76 |
+
std_energy = [float(np.mean(std_energys)), float(np.std(std_energys))]
|
| 77 |
+
mean_duration = [float(np.mean(mean_durations)), float(np.std(mean_durations))]
|
| 78 |
+
std_duration = [float(np.mean(std_durations)), float(np.std(std_durations))]
|
| 79 |
+
mean_dvec = [float(np.mean(mean_dvecs)), float(np.std(mean_dvecs))]
|
| 80 |
+
std_dvec = [float(np.mean(std_dvecs)), float(np.std(std_dvecs))]
|
| 81 |
|
| 82 |
# save the stats
|
| 83 |
stats = {
|
| 84 |
+
"mean_pitch": mean_pitch,
|
| 85 |
+
"std_pitch": std_pitch,
|
| 86 |
+
"mean_energy": mean_energy,
|
| 87 |
+
"std_energy": std_energy,
|
| 88 |
+
"mean_duration": mean_duration,
|
| 89 |
+
"std_duration": std_duration,
|
| 90 |
+
"mean_dvec": mean_dvec,
|
| 91 |
+
"std_dvec": std_dvec,
|
| 92 |
}
|
| 93 |
|
| 94 |
with open("data/stats.json", "w") as f:
|