> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# setLocalAudio()

> Mutes or unmutes the local microphone.

`setLocalAudio(enabled, options?)`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

Requires `join()` or `startCamera()` to be called first.

## Parameters

<ParamField body="enabled" type="boolean" required>
  `true` to unmute the microphone, `false` to mute it.
</ParamField>

<ParamField body="options.forceDiscardTrack" type="boolean" default="false">
  When `true`, the mic track is fully discarded when muting — releasing the hardware and hiding browser/OS mic-in-use indicators.

  By default, `setLocalAudio(false)` mutes without discarding the track so the hardware stays warm. This lets the user unmute instantly without the first few words getting clipped while the mic reinitializes. **This is strongly recommended for most apps.**

  If you only need to suppress the mic indicator before the user's *first* unmute (when starting with `startAudioOff: true`), use the [`alwaysIncludeMicInPermissionPrompt: false`](/reference/daily-js/types/daily-call-options#param-always-include-mic-in-permission-prompt) call option instead.
</ParamField>

## Return value

Returns `this` for chaining.

## Audio-only pricing

<Note>
  For a call to be considered audio-only, it must contain no video tracks at any point. You can ensure this by starting with video disabled when creating the room, setting `videoSource: false` when initializing the call object, or restricting video via meeting token permissions.

  If even one participant has an active video track at any point, the call will be classified and billed as a video call. Contact [help@daily.co](mailto:help@daily.co) to enable audio-only pricing for your account.
</Note>

## Example

```javascript theme={null}
// Mute the mic, keeping hardware warm for fast unmute
call.setLocalAudio(false);

// Mute and fully release the microphone hardware
call.setLocalAudio(false, { forceDiscardTrack: true });
```

## See also

<CardGroup>
  <Card title="Types" icon="t" iconType="solid">
    * [DailyCallOptions: startAudioOff](/reference/daily-js/types/daily-call-options#param-start-audio-off)
    * [DailyCallOptions: alwaysIncludeMicInPermissionPrompt](/reference/daily-js/types/daily-call-options#param-always-include-mic-in-permission-prompt)
    * [DailyTrackState](/reference/daily-js/types/daily-track-state)
  </Card>

  <Card title="Methods" icon="code" iconType="solid">
    * [localAudio()](/reference/daily-js/instance-methods/local-audio)
    * [setLocalVideo()](/reference/daily-js/instance-methods/set-local-video)
    * [setInputDevicesAsync()](/reference/daily-js/instance-methods/set-input-devices-async)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [participant-updated](/reference/daily-js/events/participant-events#participant-updated)
    * [track-started](/reference/daily-js/events/media-events#track-started)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Audio and video](/docs/daily-js/guides/audio-video)
  </Card>
</CardGroup>
