Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ from io import BytesIO
|
|
| 5 |
import numpy as np
|
| 6 |
import requests
|
| 7 |
import streamlit as st
|
|
|
|
| 8 |
from pydub import AudioSegment
|
| 9 |
from streamlit import session_state as st_state
|
| 10 |
|
|
@@ -584,28 +585,32 @@ if st_state.audio_pydub is not None:
|
|
| 584 |
|
| 585 |
with vol_col:
|
| 586 |
with st.container(border=True):
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
"Adjust volume (dB)",
|
| 590 |
min_value=-10.0,
|
| 591 |
max_value=10.0,
|
| 592 |
-
|
| 593 |
step=0.1,
|
| 594 |
-
|
|
|
|
|
|
|
|
|
|
| 595 |
)
|
| 596 |
vol_button = st.button("Apply Volume Change")
|
| 597 |
|
| 598 |
# Pitch shifting
|
| 599 |
with pitch_col:
|
| 600 |
with st.container(border=True):
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
label="Adjust pitch (semitones)",
|
| 604 |
min_value=-12,
|
| 605 |
max_value=12,
|
| 606 |
-
|
| 607 |
step=1,
|
| 608 |
-
|
|
|
|
|
|
|
|
|
|
| 609 |
)
|
| 610 |
pitch_shift_button = st.button("Apply Pitch Shift")
|
| 611 |
|
|
|
|
| 5 |
import numpy as np
|
| 6 |
import requests
|
| 7 |
import streamlit as st
|
| 8 |
+
import streamlit_vertical_slider as svs
|
| 9 |
from pydub import AudioSegment
|
| 10 |
from streamlit import session_state as st_state
|
| 11 |
|
|
|
|
| 585 |
|
| 586 |
with vol_col:
|
| 587 |
with st.container(border=True):
|
| 588 |
+
volume_balance = svs.vertical_slider(
|
| 589 |
+
"Volume Balance",
|
|
|
|
| 590 |
min_value=-10.0,
|
| 591 |
max_value=10.0,
|
| 592 |
+
default_value=0.0,
|
| 593 |
step=0.1,
|
| 594 |
+
slider_color="green",
|
| 595 |
+
track_color="lightgray",
|
| 596 |
+
thumb_color="red",
|
| 597 |
+
thumb_shape="pill",
|
| 598 |
)
|
| 599 |
vol_button = st.button("Apply Volume Change")
|
| 600 |
|
| 601 |
# Pitch shifting
|
| 602 |
with pitch_col:
|
| 603 |
with st.container(border=True):
|
| 604 |
+
pitch_semitones = svs.vertical_slider(
|
| 605 |
+
label="Pitch (semitones)",
|
|
|
|
| 606 |
min_value=-12,
|
| 607 |
max_value=12,
|
| 608 |
+
default_value=0,
|
| 609 |
step=1,
|
| 610 |
+
slider_color="red",
|
| 611 |
+
track_color="lightgray",
|
| 612 |
+
thumb_color="red",
|
| 613 |
+
thumb_shape="pill",
|
| 614 |
)
|
| 615 |
pitch_shift_button = st.button("Apply Pitch Shift")
|
| 616 |
|