dlaiu commited on
Commit
be3a34b
·
1 Parent(s): 0c0704f

fixed function

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,8 +10,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()
 
10
 
11
  def get_pitch(audio_file):
12
  sound = parselmouth.Sound(audio_file)
13
+ pitch = call(sound, "To Pitch", 0.0, 75, 500)
14
+ pitch_values = pitch.selected_array['frequency']
15
+ return pitch_values
16
 
17
  demo = gr.Interface(fn=get_pitch, inputs="audio", outputs="text")
18
  demo.launch()