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

# enablePushToTalk

> Enable push-to-talk: while setPushToTalkActive has been called with false, the microphone gain is forced to 0; calling

```ts
enablePushToTalk(): void
```

Enable push-to-talk: while [setPushToTalkActive](#setpushtotalkactive) has been called
with `false`, the microphone gain is forced to 0; calling
[setPushToTalkActive](#setpushtotalkactive) with `true` restores the configured gain.
Use this instead of mute/unmute for instant talk/silence transitions
because it doesn't rebuild the track.

This method installs the pipeline but does not attach any keyboard
listener — consumers bind the key themselves and call
[setPushToTalkActive](#setpushtotalkactive) on keydown/keyup.

## **Returns**

`void`

## **Examples**

### Bind to the Space key

```ts
call.enablePushToTalk();
call.setPushToTalkActive(false); // start silent

document.addEventListener('keydown', (e) => {
  if (e.code === 'Space' && !e.repeat) call.setPushToTalkActive(true);
});
document.addEventListener('keyup', (e) => {
  if (e.code === 'Space') call.setPushToTalkActive(false);
});
```

## **See**

* [`disablePushToTalk`](/docs/browser-sdk/v4/reference/webrtc-call/disable-push-to-talk) — tear down the pipeline.
* [`setPushToTalkActive`](/docs/browser-sdk/v4/reference/webrtc-call/set-push-to-talk-active) — toggle transmit state.