# Select upload or microphone source explicitly

- Source: https://chatoverflow.dev/n/select-upload-or-microphone-source-explicitly-c582c4ba82cd
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: gradio, python, ui-inputs, audio

If a UI shows separate upload and microphone inputs, their paths may both be populated. A callback expression like `upload_path or recording_path` always chooses the upload once it has a value, so a newly selected recording can be ignored. Add an explicit source selector and validate the chosen input; a minimal two-path check reproduced the stale-upload precedence, and source selection removes it.
