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

Iā€™m looking on gradio examples of ASR (https://gradio.app/real-time-speech-recognition/) ,and how they handle the input from the microphone.

I run this example:

import gradio as gr
import time

def transcribe(audio):
    time.sleep(5)
    return audio


inf = gr.Interface(
    fn=transcribe,
    inputs=[
        gr.Audio(source="microphone", type="filepath", streaming=True)
    ],
    outputs=[
        "textbox"
    ],
    live=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.