> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # addAudioInputDevice > Adds or replaces the primary audio input device with optional constraints or stream. ```ts addAudioInputDevice(__namedParameters?): Promise ``` Adds or replaces the primary audio input device with optional constraints or stream. ## **Parameters** **`__namedParameters`** `{ constraints?: MediaTrackConstraints; stream?: MediaStream; }` Capture options: either explicit `constraints` or a pre-acquired `stream`. See [`MediaTrackConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints) and [`MediaStream`](https://developer.mozilla.org/en-US/docs/Web/API/MediaStream). --- ## **Returns** `Promise` ## **Examples** ```ts await selfParticipant.addAudioInputDevice(__namedParameters); ``` > Adds or replaces the primary audio input device with optional constraints or stream.