How to open microphone on the client and not on the server?

I’m looking on gradio examples of ASR ( ,and how they handle the input from the microphone.

I run this example:

import gradio as gr
import time

def transcribe(audio):
    return audio

inf = gr.Interface(
        gr.Audio(source="microphone", type="filepath", streaming=True)

if __name__ == "__main__":
    inf.launch(share=True, debug=False)

I run the app from my PC and connect from another PC.

It seems that the microphone is opened on the server and not on client, because all the wav files are quiet.

What do I need to change in order to run this app and open the microphone on the client side ?

hi @laro1 ,

All the UI is happening on the frontend, client side. On your example the microphone would be coming from the client and sent to the server, on your case the PC running the main Gradio App.