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

# updateSpeaker

> updateSpeaker method for the RoomSession class.

### updateSpeaker

* **updateSpeaker**(`opts`): `Promise<undefined>`

Replaces the current speaker with a different one.

> 📘
> Some browsers do not support output device selection. You can check by calling [WebRTC.supportsMediaOutput](/docs/browser-sdk/v3/js/reference/webrtc#supportsmediaoutput).

#### Parameters

Object containing the parameters of the method.

Id of the new speaker device.

#### Returns

`Promise<undefined>`

#### Example

Replaces the current speaker:

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