dlaiu commited on
Commit
a01aab6
·
1 Parent(s): e701383

changed to pitch processing

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -1,7 +1,18 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
 
 
 
 
 
7
  demo.launch()
 
 
1
  import gradio as gr
2
 
3
+ # def greet(name):
4
+ # return "Hello " + name + "!!"
5
 
6
+ # demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ # demo.launch()
8
+
9
+ import parselmouth
10
+
11
+ def get_pitch(audio_file):
12
+ sound = parselmouth.Sound(audio_file)
13
+ pitch = sound.to_pitch()
14
+ return pitch
15
+
16
+ demo = gr.Interface(fn=get_pitch, inputs="audio", outputs="text")
17
  demo.launch()
18
+