> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# updateMicrophone

> updateMicrophone method for the RoomSessionDevice class.

### updateMicrophone

▸ **updateMicrophone**(`constraints`): `Promise<void>`

Replaces the current microphone stream with the one coming from a different device.

#### Parameters

**`constraints`** `MediaTrackConstraints` — required

Specify the constraints that the device should satisfy. See [MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints).

---

#### Returns

`Promise<void>`

#### Example

```javascript
await roomDevice.updateMicrophone({
  deviceId: "/o4ZeWzroh+8q0Ds/CFfmn9XpqaHzmW3L/5ZBC22CRg=",
});
```