update
Browse files- main.py +5 -2
- ring_vad_examples.json +10 -10
main.py
CHANGED
@@ -95,9 +95,12 @@ def click_ring_vad_button(audio: Tuple[int, np.ndarray],
|
|
95 |
plt.plot(time, signal / 32768, color="b")
|
96 |
plt.plot(time, speech_probs, color="gray")
|
97 |
|
|
|
|
|
|
|
98 |
for start, end in vad_segments:
|
99 |
-
plt.axvline(x=start, ymin=0.15, ymax=0.85, color="g", linestyle="--"
|
100 |
-
plt.axvline(x=end, ymin=0.15, ymax=0.85, color="r", linestyle="--"
|
101 |
|
102 |
temp_image_file = temp_directory / "temp.jpg"
|
103 |
plt.savefig(temp_image_file)
|
|
|
95 |
plt.plot(time, signal / 32768, color="b")
|
96 |
plt.plot(time, speech_probs, color="gray")
|
97 |
|
98 |
+
plt.axhline(y=start_ring_rate, xmin=0.0, xmax=1.0, color="gray", linestyle="-")
|
99 |
+
plt.axhline(y=start_ring_rate, xmin=0.0, xmax=frame_length_ms / 1000 / len(signal) * sample_rate, color="red", linestyle="-")
|
100 |
+
|
101 |
for start, end in vad_segments:
|
102 |
+
plt.axvline(x=start, ymin=0.15, ymax=0.85, color="g", linestyle="--")
|
103 |
+
plt.axvline(x=end, ymin=0.15, ymax=0.85, color="r", linestyle="--")
|
104 |
|
105 |
temp_image_file = temp_directory / "temp.jpg"
|
106 |
plt.savefig(temp_image_file)
|
ring_vad_examples.json
CHANGED
@@ -25,42 +25,42 @@
|
|
25 |
],
|
26 |
[
|
27 |
"data/early_media/3300999628164852605.wav",
|
28 |
-
"call_voice", 3, 600, 30, 300, 300, 0.
|
29 |
],
|
30 |
[
|
31 |
"data/early_media/62/3300999628999191096.wav",
|
32 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
33 |
],
|
34 |
[
|
35 |
"data/early_media/62/33009996287818451333.wav",
|
36 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
37 |
],
|
38 |
[
|
39 |
"data/call_monitor/id-ID/noise/00a0a2a3-14ff-4a84-8aee-b18b2fb65355_id-ID_1680237229413.wav",
|
40 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
41 |
],
|
42 |
[
|
43 |
"data/call_monitor/id-ID/noise/000ad44a-fbad-4a22-ba5a-c6dc855779b2_id-ID_1672040947119.wav",
|
44 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
45 |
],
|
46 |
[
|
47 |
"data/call_monitor/id-ID/noise/000da369-6652-4601-b241-33ffbd52a224_id-ID_1676000326981.wav",
|
48 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
49 |
],
|
50 |
[
|
51 |
"data/call_monitor/id-ID/voicemail/00a20d31-e1cb-4c70-821b-6fd151b260ae_id-ID_1671762897272.wav",
|
52 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
53 |
],
|
54 |
[
|
55 |
"data/call_monitor/id-ID/voicemail/000b03b3-172e-4784-8510-24cf37e205ba_id-ID_1672193551438.wav",
|
56 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
57 |
],
|
58 |
[
|
59 |
"data/call_monitor/id-ID/voice/000a3f9a-b2bf-46fd-9c69-477fc62cda51_id-ID_1671935534167.wav",
|
60 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
61 |
],
|
62 |
[
|
63 |
"data/call_monitor/id-ID/voice/000cb369-a0ee-44aa-a213-18b036f1baf7_id-ID_1678762306513.wav",
|
64 |
-
"call_voice", 3, 600, 30, 120, 300, 0.
|
65 |
]
|
66 |
]
|
|
|
25 |
],
|
26 |
[
|
27 |
"data/early_media/3300999628164852605.wav",
|
28 |
+
"call_voice", 3, 600, 30, 300, 300, 0.5, 0.2, 2.0, 0.3
|
29 |
],
|
30 |
[
|
31 |
"data/early_media/62/3300999628999191096.wav",
|
32 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
33 |
],
|
34 |
[
|
35 |
"data/early_media/62/33009996287818451333.wav",
|
36 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
37 |
],
|
38 |
[
|
39 |
"data/call_monitor/id-ID/noise/00a0a2a3-14ff-4a84-8aee-b18b2fb65355_id-ID_1680237229413.wav",
|
40 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
41 |
],
|
42 |
[
|
43 |
"data/call_monitor/id-ID/noise/000ad44a-fbad-4a22-ba5a-c6dc855779b2_id-ID_1672040947119.wav",
|
44 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
45 |
],
|
46 |
[
|
47 |
"data/call_monitor/id-ID/noise/000da369-6652-4601-b241-33ffbd52a224_id-ID_1676000326981.wav",
|
48 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
49 |
],
|
50 |
[
|
51 |
"data/call_monitor/id-ID/voicemail/00a20d31-e1cb-4c70-821b-6fd151b260ae_id-ID_1671762897272.wav",
|
52 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
53 |
],
|
54 |
[
|
55 |
"data/call_monitor/id-ID/voicemail/000b03b3-172e-4784-8510-24cf37e205ba_id-ID_1672193551438.wav",
|
56 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
57 |
],
|
58 |
[
|
59 |
"data/call_monitor/id-ID/voice/000a3f9a-b2bf-46fd-9c69-477fc62cda51_id-ID_1671935534167.wav",
|
60 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
61 |
],
|
62 |
[
|
63 |
"data/call_monitor/id-ID/voice/000cb369-a0ee-44aa-a213-18b036f1baf7_id-ID_1678762306513.wav",
|
64 |
+
"call_voice", 3, 600, 30, 120, 300, 0.5, 0.2, 2.0, 0.3
|
65 |
]
|
66 |
]
|