1
def detect(audio):
    chime_threshold = 0.5
    prediction = detect_triggerword(audio)
    chime_on_activate(your_filename, prediction, chime_threshold)
    return IPython.display.Audio("./chime_output.wav")

detect=gr.Interface(fn=detect, inputs='audio', outputs='audio')
detect.launch()

As you can see I'm able to add the audio file as input which is in WAV format but when I try to submit the file it shows me an error.

it is the error it shows

Sylvester Kruin
  • 3,294
  • 5
  • 16
  • 39
  • 1
    As the error says, `gr.Interface` expects a file name. You are passing an `IPython.display.Audio` object. You should return `"../chime_output.wav"`, if that's what you want. – Tim Roberts Jan 04 '22 at 04:14

0 Answers0