Update app.py
Browse files
app.py
CHANGED
@@ -88,9 +88,9 @@ target = target[:packet_size * (len(target) // packet_size)]
|
|
88 |
st.subheader('Original audio')
|
89 |
st.audio(uploaded_file)
|
90 |
|
91 |
-
st.subheader('Choose
|
92 |
-
|
93 |
-
loss_percent = float(
|
94 |
mask_gen = MaskGenerator(is_train=False, probs=[(1 - loss_percent, loss_percent)])
|
95 |
lossy_input = target.copy().reshape(-1, packet_size)
|
96 |
mask = mask_gen.gen_mask(len(lossy_input), seed=0)[:, np.newaxis]
|
|
|
88 |
st.subheader('Original audio')
|
89 |
st.audio(uploaded_file)
|
90 |
|
91 |
+
st.subheader('Choose expected packet loss rate')
|
92 |
+
slider = [st.slider("Expected loss rate for Markov Chain loss generator", 0, 100, step=1)]
|
93 |
+
loss_percent = float(slider[0])/100
|
94 |
mask_gen = MaskGenerator(is_train=False, probs=[(1 - loss_percent, loss_percent)])
|
95 |
lossy_input = target.copy().reshape(-1, packet_size)
|
96 |
mask = mask_gen.gen_mask(len(lossy_input), seed=0)[:, np.newaxis]
|