dlaiu
fixed function
be3a34b
raw
history blame
455 Bytes
import gradio as gr
# def greet(name):
# return "Hello " + name + "!!"
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
# demo.launch()
import parselmouth
def get_pitch(audio_file):
sound = parselmouth.Sound(audio_file)
pitch = call(sound, "To Pitch", 0.0, 75, 500)
pitch_values = pitch.selected_array['frequency']
return pitch_values
demo = gr.Interface(fn=get_pitch, inputs="audio", outputs="text")
demo.launch()