> ## 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.

# useActiveSpeakerId

> Returns the participant's session_id mentioned in the most recent 'active-speaker-change' event.

`useActiveSpeakerId(params?) : string | null`

Use a `filter` to limit which participants should be considered as active speakers.

## Parameters

<ParamField body="filter" type="Function">
  Callback function to filter which participants should be considered as active speakers by this hook instance. Return `true` to allow the passed `session_id` to become the next active speaker.
</ParamField>

<ParamField body="ignoreLocal" type="boolean">
  If `true`, `useActiveSpeakerId` will ignore when the local participant is the active speaker.
</ParamField>

## Return value

Returns `string | null`. The active speaker's `session_id`. If no participant has unmuted, `useActiveSpeakerId` returns `null`.

## Example

```jsx theme={null}
import { useActiveSpeakerId } from '@daily-co/daily-react';

export const CurrentSpeaker = () => {
  const activeSpeakerId = useActiveSpeakerId();
  return <div>Current speaker id: {activeSpeakerId ?? 'none'}</div>;
};
```

## See also

<CardGroup>
  <Card title="Hooks" icon="code" iconType="solid">
    * [useActiveParticipant()](/reference/daily-react/use-active-participant)
    * [useParticipantProperty()](/reference/daily-react/use-participant-property)
    * [useParticipant()](/reference/daily-react/use-participant)
    * [useLocalParticipant()](/reference/daily-react/use-local-participant)
    * [useLocalSessionId()](/reference/daily-react/use-local-session-id)
    * [useParticipantCounts()](/reference/daily-react/use-participant-counts)
    * [useParticipantIds()](/reference/daily-react/use-participant-ids)
    * [useWaitingParticipants()](/reference/daily-react/use-waiting-participants)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [active-speaker-change](/reference/daily-js/events/participant-events#active-speaker-change)
  </Card>
</CardGroup>
