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()
Asked
Active
Viewed 561 times
1

Sylvester Kruin
- 3,294
- 5
- 16
- 39

Safeer Khan
- 19
- 4
-
1As 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