rahgadda commited on
Commit
42a53f6
·
1 Parent(s): d3649be

Initial Draft

Browse files
Files changed (1) hide show
  1. voice.py +32 -0
voice.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import AutoProcessor, BarkModel
3
+ import scipy
4
+
5
+ ############################
6
+ ### Variable Declaration ###
7
+ ############################
8
+
9
+ # -- UI Variables
10
+ ui_input_type=gr.Dropdown(
11
+ ["v2/en_speaker_0","v2/en_speaker_9"], label="Voice Presenter"
12
+ )
13
+ ui_input_filename=gr.Textbox(label="wav filename")
14
+ ui_input_text=gr.Textbox(lines=22,label="Input Text")
15
+ ui_output=gr.Textbox(lines=22,label="Output")
16
+
17
+ # -- Model Variables
18
+ processor = AutoProcessor.from_pretrained("suno/bark")
19
+ model = BarkModel.from_pretrained("suno/bark")
20
+
21
+ ############################
22
+ ### Processing Functions ###
23
+ ############################
24
+
25
+ # -- On Click of Submit Button in UI
26
+ def submit(type, input_text):
27
+ ui_output=""
28
+
29
+
30
+ ############################
31
+ ###### Main Program ########
32
+ ############################