Phoenixak99 commited on
Commit
4d89550
·
verified ·
1 Parent(s): 6f0c333

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -10
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
- st.markdown("### Volume Balance")
588
- volume_balance = st.slider(
589
- "Adjust volume (dB)",
590
  min_value=-10.0,
591
  max_value=10.0,
592
- value=0.0,
593
  step=0.1,
594
- help="Adjust the volume level in decibels"
 
 
 
595
  )
596
  vol_button = st.button("Apply Volume Change")
597
 
598
  # Pitch shifting
599
  with pitch_col:
600
  with st.container(border=True):
601
- st.markdown("### Pitch Shift")
602
- pitch_semitones = st.slider(
603
- label="Adjust pitch (semitones)",
604
  min_value=-12,
605
  max_value=12,
606
- value=0,
607
  step=1,
608
- help="Shift pitch up or down by semitones"
 
 
 
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