Files
gradio-webrtc/docs/faq.md
Freddy Boulton b1e4326ae3 Add FAQ on EchoCancellation (#33)
* code

* code

* code
2024-12-09 17:43:39 -08:00

1.0 KiB

Demo does not work when deploying to the cloud

Make sure you are using a TURN server. See deployment.

Recorded input audio sounds muffled during output audio playback

By default, the microphone is configured to do echoCancellation. This is what's causing the recorded audio to sound muffled when the streamed audio starts playing. You can disable this via the track_constraints (see advanced configuration) with the following code:

	audio = WebRTC(
		label="Stream",
		track_constraints={
                "echoCancellation": False,
                "noiseSuppression": {"exact": True},
                "autoGainControl": {"exact": True},
                "sampleRate": {"ideal": 24000},
                "sampleSize": {"ideal": 16},
                "channelCount": {"exact": 1},
            },
		rtc_configuration=None,
		mode="send-receive",
		modality="audio",
	)